On Sun, Oct 05, 2008 at 02:16:54PM +0200, Guido G?nther wrote:
On Fri, Sep 26, 2008 at 04:47:05PM +0100, Daniel P. Berrange wrote:
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.
This would solve the problem of restarting libvirtd. How are we going to
distinguish this from daemon shutdown on e.g. system reboot? Is the
distros init script supposed to handle shutting down/suspending active
domains on /etc/init.d/libvirtd stop?
Yep, we need to have some explicit support for shuttting down / saving
active VMs on system shutdown, independant of whether the daemon
restart preserves them.
We can probably distinguish by picking a specific signal for orderly
shutdown of the daemon + vms, vs a simple restart. I'd like all signals
to preserve running VMs by default - attempting todo orderly shutdown of
VMs on reciept of signal is not great because there's no way to get info
on progress of shutdown, or detect/report shutdown errors. I'd also like
to avoid putting any complex application logic into initscripts though.
Perhaps we should have an explicit API, or a convenient virsh command to
shutdown all VMs in one go.