Bug 586161 - Error saving/restoring VM with attached disks
Summary: Error saving/restoring VM with attached disks
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: libvirt
Version: 5.5
Hardware: All
OS: Linux
Target Milestone: rc
: ---
Assignee: Daniel Veillard
QA Contact: Virtualization Bugs
Depends On:
TreeView+ depends on / blocked
Reported: 2010-04-26 23:50 UTC by Shi jin
Modified: 2011-01-13 22:56 UTC (History)
6 users (show)

Fixed In Version: libvirt-0.8.2-1.el5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2011-01-13 22:56:39 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2011:0060 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2011-01-12 17:22:30 UTC

Description Shi jin 2010-04-26 23:50:45 UTC
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.


Comment 1 Jiri Denemark 2010-09-02 11:59:43 UTC
Fixed in libvirt-0.8.2-1.el5

Comment 3 Min Zhan 2010-10-26 08:34:31 UTC
Verified with Passed in below environment on 4 arches:


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 22:56:39 UTC
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.


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