Linux KVM - how to export and import VM (virtual machine)
Hello, I use KVM virtualization on Ubuntu at work and I would like to bring the virtual from Windows work to my home. How do I export and transfer this virtual? And how to import? Thanks
PS: And I was also wondering if VM with WIndows 10 will stay activated when I transfer it from desktop PC to laptop. I think it's deactivated.
Hello,
how to export and import VM from KVM? Here's how:
1.) Copy file with virtual disk eg w10pro.vdi
2.) Export VM configuration
3.) Copy the virtual disk file eg w10pro.vdi to a new location and edit the path to the w10pro.vdi file in the vm.xml config (if it is different now)
4.) Import VM configuration to new location:
5.) Start VM
PS: Windows VM remains activated
PS: And I was also wondering if VM with WIndows 10 will stay activated when I transfer it from desktop PC to laptop. I think it's deactivated.
REPLY
Hello,
how to export and import VM from KVM? Here's how:
1.) Copy file with virtual disk eg w10pro.vdi
2.) Export VM configuration
virsh dumpxml my_vm > vm.xml
3.) Copy the virtual disk file eg w10pro.vdi to a new location and edit the path to the w10pro.vdi file in the vm.xml config (if it is different now)
4.) Import VM configuration to new location:
virsh define vm.xml
5.) Start VM
PS: Windows VM remains activated