Commit 811e2110 authored by Leigh B Stoller's avatar Leigh B Stoller

XEN shortcut; when shutting down all containers, instead of halting

each container serially with vnodesetup, just do "xl shutdown -a -w"
cause it way faster. We catch that peoperly and save the state of
the VM when it exists this way.
parent ce161ab8
#!/usr/bin/perl -w
#
# Copyright (c) 2000-2013 University of Utah and the Flux Group.
# Copyright (c) 2000-2014 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -125,6 +125,9 @@ my $islinux = ($sysname eq "Linux");
# ...
my $isfreenas = -e "/etc/rc.freenas" ? 1 : 0;
# Nodes come and go ...
configtmcc("nocache", 1);
#
# Put this into the background and log its output. We *must* do this cause
# we do not want to halt the boot if the testbed is down!
......@@ -136,6 +139,19 @@ if ($daemon && TBBackGround($logname)) {
exit(0);
}
#
# Shortcut for xen shutdown
#
if (GENVNODETYPE() eq "xen" && defined($action) && $action eq "halt") {
my $toolstack = `grep TOOLSTACK /etc/default/xen`;
my $XM = "/usr/sbin/xm";
if ($toolstack =~ /xl$/) {
$XM = "/usr/sbin/xl";
}
system("$XM shutdown -a -w");
exit($? >> 8);
}
#
# This applies to whatever vnodes are running. Do it and exit.
#
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment