Bug 534143 - virsh save corrupts image
Summary: virsh save corrupts image
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: libvirt
Version: 12
Hardware: x86_64
OS: Linux
high
medium
Target Milestone: ---
Assignee: Daniel Berrangé
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 533306 (view as bug list)
Depends On:
Blocks: F12VirtTarget
TreeView+ depends on / blocked
 
Reported: 2009-11-10 18:04 UTC by David
Modified: 2010-05-28 17:56 UTC (History)
9 users (show)

Fixed In Version: libvirt-0.7.1-16.fc12
Clone Of:
Environment:
Last Closed: 2010-05-28 17:56:33 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
log for the vm in /var/log/libvirt/qemu (1015 bytes, text/plain)
2009-11-10 18:05 UTC, David
no flags Details
Fix save & restore with unprivileged guests, and SELinux (6.43 KB, patch)
2009-11-11 12:40 UTC, Daniel Berrangé
no flags Details | Diff

Description David 2009-11-10 18:04:34 UTC
Description of problem:
I create a VM using virsh create, and then I save the image using virsh save. When I try to use virsh restore, I get an error:

error: Failed to restore domain from /aml/images/pr104.img
error: internal error Timed out while reading monitor startup output

/var/log/messages had the following error message:
error : qemudReadMonitorOutput:827 : internal error Timed out while reading monitor startup output


I will attach the /var/log/libvirt/qemu/pr104.log file. 

Version-Release number of selected component (if applicable):
fedora 12 beta
libvirt version 0.7.1
qemu-kvm version 0.11.0

How reproducible:
all the time. 

Steps to Reproduce:
1. virsh create on some xml file.
2. virsh save image
3. virsh restore image
  
Actual results:
virsh times out and the restore fails

Expected results:
the image to be restored to memory.


Additional info:

Comment 1 David 2009-11-10 18:05:46 UTC
Created attachment 368449 [details]
log for the vm in /var/log/libvirt/qemu

Comment 2 David 2009-11-10 18:28:59 UTC
*** Bug 533306 has been marked as a duplicate of this bug. ***

Comment 3 David 2009-11-10 18:30:48 UTC
I created a workaround for this bug by editing /etc/libvirt/qemu.conf and uncommenting the lines "user = "root"" and "group = "root"".

Comment 4 Daniel Berrangé 2009-11-11 12:38:55 UTC
Fixing product since this is reporting Fedora RPM version.

Comment 5 Daniel Berrangé 2009-11-11 12:40:24 UTC
Created attachment 369015 [details]
Fix save & restore with unprivileged guests, and SELinux 

When running qemu:///system instance, libvirtd runs as root, but QEMU may
optionally be configured to run non-root. When then saving a guest to a state
file, the file is initially created as root, and thus QEMU cannot write to it.
It is also missing labelling required to allow access via SELinux. This patch
fixes those issues.

http://www.redhat.com/archives/libvir-list/2009-November/msg00376.html

Comment 6 Mark McLoughlin 2009-11-19 12:39:57 UTC
See also bug #532654

Comment 7 Fedora Update System 2010-05-18 16:55:45 UTC
libvirt-0.7.1-16.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/libvirt-0.7.1-16.fc12

Comment 8 Fedora Update System 2010-05-19 19:13:44 UTC
libvirt-0.7.1-16.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update libvirt'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/libvirt-0.7.1-16.fc12

Comment 9 Fedora Update System 2010-05-28 17:55:58 UTC
libvirt-0.7.1-16.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.


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