From 5f903af01f68a042abb1573dccaa0d82c9ba5626 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Thu, 16 Sep 2010 20:41:23 +0000 Subject: [PATCH] -rpower softoff for vmware (requires vmware tools) git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7481 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/esx.pm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/esx.pm b/xCAT-server/lib/xcat/plugins/esx.pm index 58c9794cf..2fe85a8c0 100644 --- a/xCAT-server/lib/xcat/plugins/esx.pm +++ b/xCAT-server/lib/xcat/plugins/esx.pm @@ -1383,6 +1383,13 @@ sub power { } else { xCAT::SvrUtils::sendmsg($currstat, $output_handler,$node); } + } elsif ($subcmd =~ /softoff/) { + if ($currstat eq 'on') { + $args{vmview}->ShutdownGuest(); + xCAT::SvrUtils::sendmsg("softoff", $output_handler,$node); + } else { + xCAT::SvrUtils::sendmsg($currstat, $output_handler,$node); + } } elsif ($subcmd =~ /off/) { if ($currstat eq 'on') { $task = $args{vmview}->PowerOffVM_Task();