Bug 586161 - Error saving/restoring VM with attached disks
Error saving/restoring VM with attached disks
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: libvirt (Show other bugs)
5.5
All Linux
low Severity medium
: rc
: ---
Assigned To: Daniel Veillard
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-04-26 19:50 EDT by Shi jin
Modified: 2011-01-13 17:56 EST (History)
6 users (show)

See Also:
Fixed In Version: libvirt-0.8.2-1.el5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-01-13 17:56:39 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2011:0060 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2011-01-12 12:22:30 EST

  None (edit)
Description Shi jin 2010-04-26 19:50:45 EDT
Hi there,

I have been playing with libvirt/KVM on saving the VM to a checkpoint file and restoring it from this file. It has worked very well for me on my RHEL-5.5 setup, until I added hot-plugged volumes.

If I add a volume to a running VM using "virsh attach-disk" and then call "virsh save". The checkpoint file was successfully written and VM stopped.
However, I get errors restoring it with "virsh restore":
$ virsh restore checkpoint 
error: Failed to restore domain from checkpoint
error: operation failed: failed to start VM

I did two thinngs to narrow down the problem:
1. If  I manually remove the lines of attached volume from the checkpoint file, then it restores fine.
2. If I have the additioinal volumes in the original XML template instead of hot-plugging them on the fly, the save/restore work very well.

So I think the problem is in save/restore hot-plugged volumes.

Thanks.
Shi
Comment 1 Jiri Denemark 2010-09-02 07:59:43 EDT
Fixed in libvirt-0.8.2-1.el5
Comment 3 min zhan 2010-10-26 04:34:31 EDT
Verified with Passed in below environment on 4 arches:
-RHEL5.6-Server-x86_64-KVM 
-RHEL5.6-Server-x86_64-Xen
-RHEL5.6-Client-i386-Xen
-RHEL5.6-Server-ia64-Xen

kernel-xen-2.6.18-228.el5
xen-3.0.3-117.el5
kvm-qemu-img-83-205.el5
kernel-2.6.18-228.el5
libvirt-0.8.2-8.el5


Steps:
1. Run an KVM domain. In guest, load acpiphp module

# modprobe acpiphp

2. Attach a disk to the domain.

# virsh attach-disk rhel5u5 /var/lib/libvirt/images/newdisk.img vda

   --sourcetype=file --driver=qemu --subdriver=qcow2

   Disk attached successfully

In geust, the new disk is seen.

# fdisk -l

3. Save and restore the domain.

# virsh save rhel5u5 /tmp/tt.save

   Domain rhel5u5 saved to /tmp/tt.save

# virsh restore /tmp/tt.save

   Domain restored from /tmp/tt.save

# virsh list --all

   Id Name State

   ----------------------------------

   16 rhel5u5 running
Comment 5 errata-xmlrpc 2011-01-13 17:56:39 EST
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2011-0060.html

Note You need to log in before you can comment on or make changes to this bug.