How To Upgrade CentOS 6.9 KVM Host To 7.4.1708 And Not Re-install Guests

Home » CentOS » How To Upgrade CentOS 6.9 KVM Host To 7.4.1708 And Not Re-install Guests
CentOS 1 Comment

I have a Windows 7 KVM guest running on a CentOS 6.9 KVM host. I would like to upgrade the host system to CentOS 7.4.1708 without having to re-install from scratch the KVM guest. What procedure should I use to move the guest off the host system, upgrade the CentOS version and then move the KVM Guest back to the host? For example, Is there a recommended way to move the KVM Guest to a USB stick and then move it back to the upgraded host? Thank you for your help.

One thought on - How To Upgrade CentOS 6.9 KVM Host To 7.4.1708 And Not Re-install Guests

  • Not enough details but yeah, that’s doable with some easy steps (but then also depends on what you have availble, etc ..)
    – shutdown guests
    – save all the .qcow2 files (assuming that you don’t use raw devices for backend disks, like for example lvm) from /var/lib/libvirt/images
    (default location, but again, it depends on your config)
    – export the .xml files used by libvirt to start the nodes
    – reinstall the node (there is no way to upgrade from 6 to 7, and fresh install is always better anyway)
    – reconfigure new node with same network bridge (if any, depends on your situation) and ensure libvirt, qemu-kvm (and deps) are installed/started
    – import back .qcow2 files (in /var/lib/libvirt/images)
    – “virsh define” against .xml files to configure the VMs on the nodes
    – start the VMs

LEAVE A COMMENT