This guide will help you set up and manage virtual machines using virt-manager on BredOS.
Before you begin, ensure that you have the following:
sudo privilegesqemu and virt-manager.sudo pacman -Syu virt-manager virt-viewer qemu-base qemu-system-aarch64 edk2-aarch64 dnsmasq
While
qemuis your hypervisor,virt-manageris a GUI-based tool for managing it.
libvirtd service:sudo systemctl enable --now libvirtd
sudo systemctl status libvirtd
libvirt Grouplibvirt group:sudo usermod -aG libvirt $(whoami)
This does allow managing VMs from user-level. This can be dangerous!
virt-manager uses dnsmasq for network management. You may want to ensure libvirt is set up with default network settings:sudo virsh net-start default
sudo virsh net-autostart default
virt-manager:virt-manager
virt-manager GUI where you can create and manage virtual machines.
If you have not added your user to the group
libvirtyou need to enter your password now.
virt-manager, then navigate to Edit then Preferences and Enable XML editing.Inside virt-manager click on the display icon or navigate to File -> Create virtual machine to create a new virtual machine.
Select the installation source (Local install media or Network Install).
If you choose local installation media, use the wizard to select your .iso file.
Follow the wizard to allocate CPU, RAM, and storage for your VM.
On the RK3588 you can allocate max 4 cores per vm due to the little big architecture.
Before you click Finish you need to check "Customize configuration before install" and edit the xml responsible for allocating cpu cores.
Click Finish
A new window opens, allowing you to edit the settings of your virtual machine before creating it. Open the CPUs configuration and then the XML tab.
<vcpu>XYZ</vcpu> and replace it with:<vcpu placement='static' cpuset='0-1'>2</vcpu>
Where
cpu setis, the cores you may want to use are 0-3 (the E cores) on the RK3588, or 4-7 for the performance cores.
In the example above, the VM will have 2 cores, which are efficiency cores (cores 1 and 2 on the die itself).
There we have it. Now you can run Bred inside Bred!
virsh:virsh list --all
virsh start <vm-name>
virsh shutdown <vm-name>