From 59c805c19ad6a126c79c20c99eab16c609c2266f Mon Sep 17 00:00:00 2001 From: phamt Date: Fri, 14 Oct 2011 00:06:47 +0000 Subject: [PATCH] Gracefully shutdown machine when clonning. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10769 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/zvm.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/zvm.pm b/xCAT-server/lib/xcat/plugins/zvm.pm index ef38ce0c4..5e2fce713 100644 --- a/xCAT-server/lib/xcat/plugins/zvm.pm +++ b/xCAT-server/lib/xcat/plugins/zvm.pm @@ -2192,6 +2192,9 @@ sub cloneVM { if ( $out =~ m/USER $sourceId/i ) { # Turn off source node + $out = `ssh -o ConnectTimeout=10 $sourceNode "shutdown -h now"`; + sleep(90); # Wait 1.5 minutes before logging user off + $out = `ssh $srcHcp "$::DIR/stopvs $sourceId"`; foreach (@nodes) { xCAT::zvmUtils->printLn( $callback, "$_: $out" );