Bug 746058

Summary: vm suddenly would not start: failed to read qemu header
Product: Red Hat Enterprise Linux 6 Reporter: Cameron Meadors <cmeadors>
Component: libvirtAssignee: Jiri Denemark <jdenemar>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.2CC: acathrow, dallan
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-10-13 19:57:02 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Cameron Meadors 2011-10-13 18:50:09 UTC
Description of problem:

I tried to start a vm that previously worked.  I got an error dialog:

operation failed: failed to read qemu header

I tried restarting libvirtd.  virsh list showed now domains. I deleted the vm and imported the disk image and the vm starts now.

Version-Release number of selected component (if applicable):

libvirt-0.9.4-12.el6.x86_64

How reproducible:
This was my only guest.  It consistently would not start with the same error until I removed and imported the image again.

Steps to Reproduce:
1. Start VM
2.
3.
  
Actual results:

does not start with error
operation failed: failed to read qemu header

Expected results:

vm starts with no error.

Additional info:

snippet from /var/log/libvirt/libvirtd.log

14:01:36.412: 2285: info : libvirt version: 0.9.4, package: 12.el6 (Red Hat, Inc
. <http://bugzilla.redhat.com/bugzilla>, 2011-09-20-06:17:46, hs20-bc2-5.build.r
edhat.com)
14:01:36.412: 2285: error : qemuDomainSaveImageOpen:4128 : operation failed: fai
led to read qemu header

Comment 2 Dave Allan 2011-10-13 19:57:02 UTC

*** This bug has been marked as a duplicate of bug 721114 ***

Comment 3 Jiri Denemark 2011-10-14 21:54:55 UTC
While a corrupted saved state is causing troubles in both bugs, this bug is different in that even the header written by libvirt cannot be read and that can only happen if the file is shorter than the header size. I hope such corruption didn't happen while virDomainManagedSave reported success. Could you check if you see any error coming from an attempt to save the runtime state of the domain?

Anyway, if there is a corrupted saved state that causes a domain cannot be started anymore, virsh managedsave-remove DOMAIN can be used to remove just the state file and starting the domain should work again.