]> xenbits.xensource.com Git - libvirt.git/commit
Init script for handling guests on shutdown/boot
authorJiri Denemark <jdenemar@redhat.com>
Fri, 14 May 2010 13:37:55 +0000 (15:37 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Fri, 21 May 2010 07:33:30 +0000 (09:33 +0200)
commit66823690e46944f17e195b1f82c5eee527ddee20
treed02e6ca273046c0dbf3901ece7a72ed60378895f
parente0037c2ee821feffd891a5b2f5ac8d6d6f3643f9
Init script for handling guests on shutdown/boot

Example output during shutdown:

Running guests on default URI: console, rhel6-1, rhel5-64
Running guests on lxc:/// URI: lxc-shell
Running guests on xen:/// URI: error: no hypervisor driver available for xen:///
error: failed to connect to the hypervisor
Running guests on vbox+tcp://orkuz/system URI: no running guests.
Suspending guests on default URI...
Suspending console: done
Suspending rhel6-1: done
Suspending rhel5-64: done
Suspending guests on lxc:/// URI...
Suspending lxc-shell: error: Failed to save domain 9cba8bfb-56f4-6589-2d12-8a58c886dd3b state
error: this function is not supported by the hypervisor: virDomainManagedSave

Note, the "Suspending $guest: " shows progress during the suspend phase
if domjobinfo gives meaningful output.

Example output during boot:

Resuming guests on default URI...
Resuming guest rhel6-1: done
Resuming guest rhel5-64: done
Resuming guest console: done
Resuming guests on lxc:/// URI...
Resuming guest lxc-shell: already active

Configuration used for generating the examples above:
URIS='default lxc:/// xen:/// vbox+tcp://orkuz/system'

The script uses /var/lib/libvirt/libvirt-guests files to note all active
guest it should try to resume on next boot. It's content looks like:

default 7f8b9d93-30e1-f0b9-47a7-cb408482654b 085b4c95-5da2-e8e1-712f-6ea6a4156af2 fb4d8360-5305-df3a-2da1-07d682891b8c
lxc:/// 9cba8bfb-56f4-6589-2d12-8a58c886dd3b
daemon/Makefile.am
daemon/libvirt-guests.init.in [new file with mode: 0644]
daemon/libvirt-guests.sysconf [new file with mode: 0644]
libvirt.spec.in