how do I migrate my KVM settings to a new desktop
- 
 Scenario: Fedora 25 + Cinnamon desktop (crashes when upgraded to 26 have not tried 27). 
 512GB SSD + 4TB HDD
 Has KVM setup and single local Windows 10 VM with a bunch of in progress SQL development happening.
 VM is located in /home/kvm_store
 /home is mounted from the 4TB HDDNew Desktop 
 Fedora 27 + Cinnamon
 256GB m.2 SSD + existing 4TB HDD will be relocated here
 /home will remain mounted on the SSD
 /home/kvm_store will be mounted to the HDDUser is the same. group ID was setup the same. what can I do to ensure that this VM continues to run? Where are the KVM settings stored so I can migrated them? 
 Should I export the qcow2 and just set things up again?
 Can I just move the disk and mount things and hope it powers up?
- 
 Not sure how to backup KVM Host settings but here's how I backed up my VM # Backup VM config and copy qcow2 image sudo virsh dumpxml vmname > /media/backup/vmname.xml sudo cp /home/user/libvirt/vmname.qcow2 /media/backup # Restore VM config and copy qcow2 image sudo cp /media/backup/vmname.qcow2 /home/user/libvirt sudo virsh define --file /media/backup/vmname.xml
- 
 @jaredbusch said in how do I migrate my KVM settings to a new desktop: Scenario: Fedora 25 + Cinnamon desktop (crashes when upgraded to 26 have not tried 27). 
 512GB SSD + 4TB HDD
 Has KVM setup and single local Windows 10 VM with a bunch of in progress SQL development happening.
 VM is located in /home/kvm_store
 /home is mounted from the 4TB HDDNew Desktop 
 Fedora 27 + Cinnamon
 256GB m.2 SSD + existing 4TB HDD will be relocated here
 /home will remain mounted on the SSD
 /home/kvm_store will be mounted to the HDDUser is the same. group ID was setup the same. what can I do to ensure that this VM continues to run? Where are the KVM settings stored so I can migrated them? 
 Should I export the qcow2 and just set things up again?
 Can I just move the disk and mount things and hope it powers up?I've reloaded a few times from scratch, and all I ever did was copied the .qcow2 or .img file, nothing more. Then reloaded, and copied back the virtual disks to where I wnat them... usually /home/uername/vms. All I did was recreated the virtual machines using existing virtual disk and merrily went on my way. If they don't boot, it's either because I forgot to change from IDE to SATA, or forgot to change from BIOS to UEFI. Other than that never had an issue. 
- 
 @jaredbusch said in how do I migrate my KVM settings to a new desktop: Can I just move the disk and mount things and hope it powers up? Yeah that's basically what I said above. Move your disks, reload, move them back... re-setup your VM using existing disk. 
- 
 @black3dynamite said in how do I migrate my KVM settings to a new desktop: Not sure how to backup KVM Host settings but here's how I backed up my VM # Backup VM config and copy qcow2 image sudo virsh vmname > /media/backup/vmname.xml cp /home/user/libvirt/vmname.qcow2 /media/backup # Restore VM config and copy qcow2 image cp /media/backup/vmname.qcow2 /home/user/libvirt sudo virsh define --file /media/backup/vmname.xmlI'll try this next time I need to reload or something. Looks a little quicker than setting things back up again manually. 
- 
 @tim_g said in how do I migrate my KVM settings to a new desktop: I've updated my response with some corrections. To backup the VM config, you have to use sudo virsh dumpxml vmnameand addedsudoin front ofcp.
- 
 That is kind of what I expected, but I had not done it yet. 
- 
 @black3dynamite said in how do I migrate my KVM settings to a new desktop: Not sure how to backup KVM Host settings but here's how I backed up my VM # Backup VM config and copy qcow2 image sudo virsh dumpxml vmname > /media/backup/vmname.xml sudo cp /home/user/libvirt/vmname.qcow2 /media/backup # Restore VM config and copy qcow2 image sudo cp /media/backup/vmname.qcow2 /home/user/libvirt sudo virsh define --file /media/backup/vmname.xmlThis was perfect. I did not copy the qcow2 as I moved the actual drive to the machine. I did edit the XML to point the vdisk to the new location. Imported the xml, booted the VM. Perfection. 
- 
 Can you "virsh dumpxml vmname" while the vm is running? 
- 
 @fateknollogee said in how do I migrate my KVM settings to a new desktop: Can you "virsh dumpxml vmname" while the vm is running? Yes. 


