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
This commit is contained in:
phamt 2011-10-14 00:06:47 +00:00
parent 7091d1ecaa
commit 59c805c19a

View File

@ -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" );