Skip to navigation
Setting up KVM/QEMU and Migrating VMs on Void Linux
02.07.26
# Setting up KVM/QEMU and Migrating VMs on Void Linux ### 1. Install Dependencies ```bash sudo xbps-install -S virt-manager qemu libvirt dnsmasq bridge-utils ``` ### 2. Enable Services Link the services to the runit service directory to ensure they start automatically: ```bash sudo ln -s /etc/sv/libvirtd /var/service/ sudo ln -s /etc/sv/virtlockd /var/service/ ``` ### 3. Configure User Permissions Add your user to the `libvirt` group to manage virtual machines without needing root privileges: ```bash sudo usermod -aG libvirt veto ``` --- ### Migrating a VM Follow these steps to transfer and define a VM from a remote host to your current machine. **1. Copy the disk image:** ```bash scp /var/lib/libvirt/images/tiny10.qcow2 root@192.168.43.3:/var/lib/libvirt/images/ ``` **2. Export the VM configuration:** ```bash ssh root@192.168.43.3 'virsh dumpxml tiny10' > tiny10.xml ``` **3. Define the VM on the new host:** ```bash virsh define tiny10.xml ``` --- *Note: Ensure that the libvirtd service is running on both machines before attempting the migration commands.*
Reply
Anonymous
in debian you may need to setup networking first ``` sudo virsh net-start default sudo virsh net-autostart default ```
02.07.26
Reply
Anonymous
Information Epoch 1784069946
Avoid hand-hacking, write programs to write programs when you can.
Home
Notebook
Contact us