Commit Graph

12 Commits

Author SHA1 Message Date
Osier Yang
c086af6b9b libvirt-guests: Remove LISTFILE if it's empty when stopping service
$LISTFILE is created even no domain is running, and the empty
$LISTFILE could cause improper service status.

    stopped ,with saved guests

Which is not right, as there is no domain was saved.
2012-05-15 16:22:28 +08:00
Peter Krempa
6c3642e9bc libvirt-guests: Add parallel startup and shutdown of guests
With this patch, it's possible to shut down guests in parallel. Parallel
startup was possible before, but this functionality was not documented
properly.

To enable parallel startup set the START_DELAY to 0.

Parallel shutdown has a configurable parameter PARALLEL_SHUTDOWN that
defines the number of machines being shut down in parallel. Enabling
this feature changes the semantics of SHUTDOWN_TIMEOUT parameter that is
applied as a cumulative timeout to shutdown all guests on a URI.
2012-03-05 13:18:24 +01:00
Peter Krempa
0531377076 libvirt-guests: Check if URI is reachable before launching commands
This patch adds a check to the libvirt-guests script to check for the
URI to be alive before attempting any calls. This avoids nasty error
messages and allows us to fail gracefully and continue on other URIs
configured in the script.
2012-02-29 12:51:26 +01:00
Peter Krempa
bc72d9a3a9 libvirt-guests: Don't try to do a managed-save of transient guests
The libvirt-guests script tried to do a managed save of transient guest
that failed. This patch notifies which guests are transient (and not
being saved) and saves only the persistent ones.
2012-02-29 12:44:21 +01:00
Peter Krempa
0d77f746ec libvirt-guests: Add documentation and clean up to use virsh's improved list
This patch adds documentation to functions defined in the libvirt-guests
init script and changes use of virsh's new commands to make the script
easier.
2012-02-29 12:40:31 +01:00
Eric Blake
28d182506a save: support bypass-cache flag in libvirt-guests init script
libvirt-guests is a perfect use case for bypassing the file system
cache - lots of filesystem traffic done at system shutdown, where
caching is pointless, and startup, where reading large files only
once just gets in the way.  Make this a configurable option in the
init script, but defaulting to existing behavior.

* tools/libvirt-guests.sysconf (BYPASS_CACHE): New variable.
* tools/libvirt-guests.init.sh (start, suspend_guest): Use it.
2011-07-21 16:24:09 -06:00
Alexander Todorov
d934bd0a58 libvirt-guests: implement START_DELAY
Allow libvirt-guests to stage a delay between guest startups,
to avoid system load caused by back-to-back startup.
2011-04-15 11:15:06 -06:00
Eric Blake
e2d24e8de4 libvirt-guests: avoid globbing when splitting $URIS
* tools/libvirt-guests.init.sh (start, stop, gueststatus): Avoid
shell globbing, since valid URIs can contain '?'.
2011-03-14 15:00:36 -06:00
Philipp Hahn
fff4682965 libvirt-guest.init: quoting variables
At least protect the $uri variable against further expansion by properly
quoting it. While doing that, also quote all other variables to protect
against shell meta characters.

Signed-off-by: Philipp Hahn <hahn@univention.de>
2011-03-14 15:00:35 -06:00
Jiri Denemark
976eb124e7 virsh: Allow starting domains by UUID 2011-03-14 12:34:39 +01:00
Philipp Hahn
2bbda1444d libvirt-guest.init: handle domain name with spaces
awk splits the line on consecutive spaces, which breaks getting the name
of a domain whose name contains spaces. Use sed instead to strip the
"Name:" prefix from the line

Signed-off-by: Philipp Hahn <hahn@univention.de>
2011-03-11 11:24:44 -07:00
Eric Blake
7f193757ef build: let xgettext see strings in libvirt-guests
* tools/libvirt-guests.init.in: Rename...
* tools/libvirt-guests.init.sh: ...so that xgettext's language
detection via suffix will work.
* po/POTFILES.in: Update all references.
* tools/Makefile.am (EXTRA_DIST, libvirt-guests.init): Likewise.
2011-01-17 07:48:17 -07:00