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:
To start, you need to install the necessary packages for KVM and virt-manager
.
sudo pacman -Syu
sudo pacman -S virt-manager virt-viewer qemu-base qemu-system-aarch64 edk2-aarch64 dnsmasq
Once the packages are installed, enable and start the libvirtd
service:
sudo systemctl enable --now libvirtd
To verify that the service is running:
sudo systemctl status libvirtd
libvirt
Group 👥To avoid needing root privileges for managing VMs, add your user to the libvirt
group:
sudo usermod -aG libvirt $(whoami)
After adding yourself to the group, log out and log back in for the changes to take effect.
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
Now that everything is set up, you can start virt-manager
:
virt-manager
This will open the virt-manager
GUI where you can create and manage virtual machines.
To enable XML editing (Needed later) you need to open virt-manager
go to Edit then Preferences and enable XML editing
virt-manager
.On the RK3588 you can allocate max 4 cores per vm due to the little big architecture
5. On CPUs with the little.big architecture like the RK3588 you need to check "Customize configuration before install" and edit the xml responsible for allocating cpu cores
Click Finish
Open the CPUs configuration and then the XML tab
Locate <vcpu>XYZ</vcpu>
and replace it with
<vcpu placement='static' cpuset='0-1'>2</vcpu>
Where cpu set is the cores you want to use 0-3 are the E cores on the rk3588 and 4-7 are the performance cores and the number of cores. In the example above the vm will have 2 cores with them being efficiency cores aka cores 1 and 2 on the die itself.
Head back to the VM page, press "Add Hardware".
Then from the window that will appear select "Video" and from the model selection, select "ramfb" and click "Finish".
Now to add the graphics server, select "Add hardware" again, "Graphics" and click "Finish".
Now for keyboard and mouse, repeat the same procedure by selecting:
"Input" -> "USB Keyboard"
and
"Input" -> "EvTouch USB Graphics Tablet"
virsh
:virsh list --all
virsh start <vm-name>
virsh shutdown <vm-name>
libvirt
group and that the libvirtd
service is running.virsh
network is running.You have successfully set up virt-manager
on BredOS and are ready to create and manage virtual machines!