On Fri, Oct 19, 2007 at 01:56:10PM +0200, Farkas Levente wrote:
Farkas Levente wrote:
> Daniel P. Berrange wrote:
>> The save/restore capability is currently only available in the KVM-ified
>> version of QEMU. We could make it try to save, and failing that destroy
>> the guest. The xendomains scripts isn't a good model to emulate though.
>> The autostart/kill functionality is part of the libvirt daemon itself. Any
>> save/restore capability would be best integrated there
>
> for those who like to save and restore guest at libvirtd stop and start
> i attached a patch we use to for it. it's based on xen's sripts.
> LIBVIRTD_AUTO_ONLY still not implemented but the sysconfig file already
> contains it. if you like to set the default behavior to the current then
> set LIBVIRTD_RESTORE to false.
> imho it'd be useful to include in the upstream libvirtd too.
>
and the patch:-)
As I mentioned above, doing this in the init script is a bad idea because
it does not interact well with domain autostart. The libvirt dameon itself
will autostart domains when it starts. So you may be saving the guests
at shutdown, but at the next boot any which are marked autostart will be
started fresh & the subsequent restore for them will fail since they are
already running. Doing this all correctly requires doing it in the daemon
not the initscript.
Dan.
--
|=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=|
|=- Perl modules:
http://search.cpan.org/~danberr/ -=|
|=- Projects:
http://freshmeat.net/~danielpb/ -=|
|=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|