wsp-10323 Convert the VSP provider into one utilizing PowerShell. Step 1.
This commit is contained in:
parent
eb50917965
commit
3fd05f6851
17 changed files with 3621 additions and 10 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue