From 4f8e82198a4895c0efed387f205c2ed7669d3895 Mon Sep 17 00:00:00 2001 From: phamt Date: Wed, 1 May 2013 14:22:01 +0000 Subject: [PATCH] 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 --- xCAT-server/lib/xcat/plugins/zvm.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/zvm.pm b/xCAT-server/lib/xcat/plugins/zvm.pm index 0bb6b0d07..2339cf6bd 100644 --- a/xCAT-server/lib/xcat/plugins/zvm.pm +++ b/xCAT-server/lib/xcat/plugins/zvm.pm @@ -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");