Repository: cloudstack Updated Branches: refs/heads/master c031eb7d3 -> 55f53e13e
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 Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/0aa6cc60 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/0aa6cc60 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/0aa6cc60 Branch: refs/heads/master Commit: 0aa6cc60c73698a7be960d2503a5abceaf16d8c7 Parents: c031eb7 Author: Anshul Gangwar <[email protected]> Authored: Sun Apr 13 23:29:20 2014 -0700 Committer: Devdeep Singh <[email protected]> Committed: Tue Apr 15 14:36:37 2014 +0530 ---------------------------------------------------------------------- .../hyperv/DotNet/ServerResource/HypervResource/WmiCallsV2.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0aa6cc60/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/WmiCallsV2.cs ---------------------------------------------------------------------- diff --git a/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/WmiCallsV2.cs b/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/WmiCallsV2.cs index 79fd0bc..c10aaa3 100644 --- a/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/WmiCallsV2.cs +++ b/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/WmiCallsV2.cs @@ -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;
