CLOUDSTACK-6398:[hyper-v] changed auto shutdown and startup actions of VMs to shutdown and nothingauto shutdown and startup actions of VMs to shutdown and nothing so that they are consistent with cloudstack auto shudown and startup behavior

This commit is contained in:
Anshul Gangwar 2014-04-13 23:29:20 -07:00 committed by Devdeep Singh
parent 0023196caa
commit 36103633c2
1 changed files with 4 additions and 1 deletions

View File

@ -1744,9 +1744,12 @@ namespace HypervResource
{
// Tweak default settings by basing new VM on default global setting object
// with designed display name.
UInt16 startupAction = 2; // Do nothing.
UInt16 stopAction = 4; // Shutdown.
VirtualSystemSettingData vs_gs_data = VirtualSystemSettingData.CreateInstance();
vs_gs_data.LateBoundObject["ElementName"] = name;
vs_gs_data.LateBoundObject["AutomaticStartupAction"] = startupAction.ToString();
vs_gs_data.LateBoundObject["AutomaticShutdownAction"] = stopAction.ToString();
System.Management.ManagementPath jobPath;
System.Management.ManagementPath defined_sys;