[et-mgmt-tools] [PATCH/RFC] kvm/qemu vs libvirtd restarts

Guido Günther agx at sigxcpu.org
Tue Oct 7 16:12:33 UTC 2008


On Fri, Sep 26, 2008 at 04:47:05PM +0100, Daniel P. Berrange wrote:
> On Fri, Sep 26, 2008 at 05:41:02PM +0200, Guido G?nther wrote:
> > On Fri, Sep 26, 2008 at 09:51:26AM -0400, Cole Robinson wrote:
> > > It's easy to forget, but anytime you update libvirt you will
> > > need to restart libvirtd. Sounds like that could be the problem.
> > The Ubuntu packages are based on the Debian ones and I dropped the
> > daemon restart from the postinst so we don't tear down all running
> > machines - so this is likely the problem. 
> > Did anybody work on saving enough state to restart libvirtd while
> > keeping the VMs running? If not I might give it a whirl once I find some
> > time.
> 
> We've got this problem sorted in the 'lxc' driver and need to apply
> the same approach to the QEMU driver. The problem was always finding
> the Pseduo-TTY/PID for the monitor after restart, and associating the
> live config with it. We've "solved" that in LXC driver by savingt the
> live XML & PID to /var/run/libvirt/lxc/. It basically needs the same
> approach to be applied to the QEMU daemons. In addition the DNSmasq
> deamon needs adapting for simiarl reasons.
Attached is a very early patch. It keeps the qemu instances running and
writes out their states upon shutdown. Reconnecting (and therefore sending
monitor commands, etc.) works but since stdout/stderr don't get picked
up again yet we don't handle virEventAddhandle. I'll grab them from
/proc/<pid>/fd/{1,2} later. Network state is missing too, but since this
is moving into a separate file it's becoming a different matter anyway.
 -- Guido
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-let-qemu-kvm-survive-libvirtd-restarts.patch
Type: text/x-diff
Size: 13057 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/et-mgmt-tools/attachments/20081007/7a86b657/attachment.bin>


More information about the et-mgmt-tools mailing list