[libvirt] libvirt accidentally destroys guests after being restarted

Sergey Fionov fionov at gmail.com
Tue Mar 12 18:14:45 UTC 2013


Hello.

We finally found the cause of this problem.

When we use "virsh reboot domain", it is actually two calls
qemuMonitorSystemPowerdown() and qemuProcessFakeReboot().

Inside the first call domain stateReason is set to
VIR_DOMAIN_SHUTDOWN_UNKNOWN and then virDomainSaveStatus() is called.

Inside the second call domain stateReason is set to
VIR_DOMAIN_RESUMED_UNPAUSED but domain configuration is not saved into
XML.

After restart of libvirtd domain stateReason SHUTDOWN_UNKNOWN is
restored and domain is automatically shutdown.

In the attached files there are shell log, qemu log, libvirtd log and
proposed patch.

wbr,
Sergey.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bug.log
Type: application/octet-stream
Size: 1611 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130312/67fd0688/attachment-0004.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: qemu.log
Type: application/octet-stream
Size: 853 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130312/67fd0688/attachment-0005.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libvirtd.log
Type: application/octet-stream
Size: 545 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130312/67fd0688/attachment-0006.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-qemu-save-domain-state-to-XML-after-reboot.patch
Type: application/octet-stream
Size: 1463 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130312/67fd0688/attachment-0007.obj>


More information about the libvir-list mailing list