wsp-10323 Сonvert the VSP provider into one utilizing PowerShell - Step 1.

This commit is contained in:
me 2015-03-04 20:04:18 +04:00
parent e717a15781
commit d9d41827f6
24 changed files with 3677 additions and 39 deletions

View file

@ -488,7 +488,7 @@ namespace WebsitePanel.Providers.Virtualization
return vm;
}
private void UpdateVirtualMachineGeneralSettings(string vmId, ManagementObject objVM, int cpuCores, int ramMB, bool bootFromCD, bool numLockEnabled)
private void UpdateVirtualMachineGeneralSettings(string vmId, ManagementObject objVM, int cpuCores, long ramMB, bool bootFromCD, bool numLockEnabled)
{
// request management service
ManagementObject objVmsvc = GetVirtualSystemManagementService();
@ -1989,10 +1989,10 @@ exit", Convert.ToInt32(objDisk["Index"])));
#region Stop
else if (!started &&
(vps.State == VirtualMachineState.Started
(vps.State == VirtualMachineState.Running
|| vps.State == VirtualMachineState.Paused))
{
if (vps.State == VirtualMachineState.Started)
if (vps.State == VirtualMachineState.Running)
{
// try to shutdown the system
ReturnCode code = ShutDownVirtualMachine(vm.VirtualMachineId, true, "Virtual Machine has been suspended from WebsitePanel");