[Pkg-libvirt-maintainers] Bug#508604: Bug#508604: Mechanism to automatically save and restore the state of virtual machines on host shutdown/start-up

Guido Günther agx at sigxcpu.org
Sat Dec 13 14:30:23 UTC 2008


Hi Tuomas,
On Sat, Dec 13, 2008 at 01:07:17AM +0200, Tuomas Jormola wrote:
> I implemented feature to automatically save virtual machines managed by
> libvirt on host shutdown and restore on host startup. See the attached
> patch. If you wish, you can use it as is or modify in any way desired.
> It has only been tested with KVM based VMs.
Thanks a lot for you nice and well documented patch! We already have
something similar in examples/ but this only shows that there's a need
for such funtionality. There are two reasons for not applying it at the
moment:
* you need "virsh save/restore" which got broken by kvm >= 79
* We're looking into adding similar functionality into libvirtd upstream
  - currently this is about daemon restarts but daemon shutdown on
    system reboot will be next.

Having this upstream will be a lot easier since we need to be much more
carefull about domain state then the current scripts are: we at least
also need to check for paused domains and Xen also has "idle" and
"blocked" as states (I haven't even tried OpenVZ yet). In an ideal world
we'd also like to be able to specify which machines should be
shutdown/started and which suspened/resumed on reboot since Suspending
VMs that eat GBytes of ram will be slow and space consuming.

I can of course add you scripts to examples/ without problems.
Cheers,
 -- Guido





More information about the Pkg-libvirt-maintainers mailing list