主机意外 断电 ,在重启 系统后 ,里面运行的kvm 主机无法启动 ,报错:
Error restoring domain: operation failed: failed to read qemu header
google 找到如下描述:
Are you restoring via 'virsh restore path/to/file', or are you just
trying to start the guest with 'virsh start' or a similar action in
virt-manager?
If the former, then path/to/file is indeed corrupt; can you show us the
size of that file, as well as 'od -N 128 -tx1z path/to/file'?
If the latter, then you've uncovered a bug in the managedsave code
(which I will be fixing shortly) - we attempt to detect and unlink
corrupt managedsave files automatically, but in looking at the code, I
see I missed a code path - if the file is corrupt because it is too
short, then we fail to do the unlink(), making the problem perpetual.
If this is the case, then please give me the same output as requested in
the previous paragraph, but using /var/lib/libvirt/qemu/save/<dom>.save
as the path/to/file.
Then, after you have given me the details, you can work around the
problem by doing 'virsh start --force' to force a fresh boot (the save
file is already corrupt, so there is unfortunately no way to get the
runtime state of the guest back to what it was when you suspended your
host); hopefully your guest can fsck and recover gracefully from what
was in the virtual disks at the time of the host suspend
在主机关机过程中kvm会保存当前 kvm 虚机状态,下次开启kvm 的时候还原 主机,是一个suspend ,restore的过程 ,虚机的状态文件保存在/var/lib/libvirt/qemu/save/ 下 ,因为意外断电,这个文件并没有完全记录 虚机状态 ,导致还原失败 ,解决方法:
rm -rf /var/lib/libvirt/qemu/save/virt-host.save
virsh start virt-host
转载来自:http://hi.baidu.com/doughtymild/item/f2cbe4fc7886296a3c1485cd