6.19.2.3 Recover and Restart a KVM Guest Stored in the KVM host

From the KVM host you can recover a specific guest.

This procedure complements the backup procedure described in Back Up an Individual Guest Stored in the KVM host. It assumes that the KVM host is operational and that the guest being recovered does not exist on the KVM host.

  1. Mount the backup NFS server that holds the guest backup.
    # mkdir -p /root/mnt
    # mount -t nfs -o ro,intr,soft,proto=tcp,nolock nfs_ip:/location_of_backup /root/mnt
  2. Restore the guest image files.

    For example, use the following command that extracts the contents of the guest backup file named exavmimage.tar.bz2:

    # tar --acls --xattrs --xattrs-include=* --format=pax -Spxvf /root/mnt/exavmimage.tar.bz2 -C /
  3. Restore the guest XML configuration file.
    # cp /XML/guestname.xml /etc/libvirt/qemu
  4. Define the guest in the KVM hypervisor.
    # virsh define /etc/libvirt/qemu/guestname.xml
  5. Enable autostart for the restored guest.
    # /opt/exadata_ovm/vm_maker --autostart guestname --disable
    # /opt/exadata_ovm/vm_maker --autostart guestname --enable
  6. Unmount the NFS backup.
    # umount /root/mnt
  7. Bring up the guest.
    # /opt/exadata_ovm/vm_maker --start-domain guestname