Changed rpower off to use Image_Deactivate with IMMED flag because without the flag, sometimes the VM would not power off correctly.

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.8@16145 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
phamt 2013-05-01 14:22:01 +00:00
parent f5e89691d4
commit 4f8e82198a

View File

@ -2298,7 +2298,7 @@ sub powerVM {
# Power off virtual server
elsif ( $args->[0] eq 'off' ) {
$out = `ssh $::SUDOER\@$hcp "$::SUDO $::DIR/smcli Image_Deactivate -T $userId"`;
$out = `ssh $::SUDOER\@$hcp "$::SUDO $::DIR/smcli Image_Deactivate -T $userId -f IMMED"`;
xCAT::zvmUtils->printSyslog("smcli Image_Deactivate -T $userId");
xCAT::zvmUtils->printLn( $callback, "$node: $out" );
}
@ -2306,7 +2306,7 @@ sub powerVM {
# Power off virtual server (gracefully)
elsif ( $args->[0] eq 'softoff' ) {
$out = `ssh -o ConnectTimeout=10 $::SUDOER\@$node "shutdown -h now"`;
sleep(90); # Wait 1.5 minutes before logging user off
sleep(15); # Wait 15 seconds before logging user off
$out = `ssh $::SUDOER\@$hcp "$::SUDO $::DIR/smcli Image_Deactivate -T $userId"`;
xCAT::zvmUtils->printSyslog("smcli Image_Deactivate -T $userId");