How do I transfer a KVM VM to a different PC?

I have Zorin OS 18 Core on my old Lenovo ThinkBook with KVM that has Windows 11 VM. I just got a new laptop that I have installed Zorin OS 18 Core on with KVM. How do I transfer the Windows 11 VM from my old laptop to the new one?

Hi, what program did you use to create the VM of Windows 11?

Virtual Machine Manager

OK so if you used virt-manager on a different distro then it should play on Zorin. Two things to bear-in-mind.

  1. When you created it was it using .qcow or .qcow2?

  2. By default, the 'pool' defaults to /var/lib/libvirt/images

The second part is more crucial as var is locked and owned by 'root'. To access this you are going to have to temporarily take ownership of /var/lib/libvirt/images so:

sudo chown [your username] /var/lib/libvirt/images

You will be asked for your password to elevate you to root. Next use the graphical interface to go to /var/lib/libvirt/images and copy the .qcow file to an external device.

Now I have just learned that the .config files are stored in /etc:

So you may need to copy these too.

Lastly, when setting up virt-manager from new I create a new pool and call it 'storage' as a folder within /home as /var usually only allows space for one VM. I then delete the default location that virt-manager points to in the virt-manager interface.

1 Like