Add option to power node off gracefully.

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10695 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
phamt 2011-10-04 14:09:27 +00:00
parent b335b6da7d
commit a5379ea4ee

View File

@ -1253,6 +1253,15 @@ sub powerVM {
$out = `ssh $hcp "$::DIR/stopvs $userId"`;
xCAT::zvmUtils->printLn( $callback, "$node: $out" );
}
# Power off virtual server (gracefully)
elsif ( $args->[0] eq 'softoff' ) {
$out = `ssh -o ConnectTimeout=10 $node "shutdown -h now"`;
sleep(25);
$out = `ssh $hcp "$::DIR/stopvs $userId"`;
xCAT::zvmUtils->printLn( $callback, "$node: $out" );
}
# Get the status (on|off)
elsif ( $args->[0] eq 'stat' ) {