IVMVirtualMachine::Startup method

[Windows Virtual PC is no longer available for use as of Windows 8. Instead, use the Hyper-V WMI provider (V2).]

Starts the virtual machine from either the uninitialized or saved state.

Syntax

HRESULT Startup(
  [out, retval] IVMTask **startupTask
);

Parameters

startupTask [out, retval]

An IVMTask object that is used to track the completion progress of the virtual machine's startup sequence.

Return value

This method can return one of these values.

Return code/value Description
S_OK
0
The operation was successful.
E_POINTER
0x80004003
The parameter is NULL.
HRESULT_FROM_WIN32(ERROR_ACCESS_DENIED)
0x80070005
The caller must have execute access permissions to start this virtual machine.
VM_E_TIMED_OUT
0xA0040202
The operation did not complete in a timely manner.
VM_E_OUT_OF_RESOURCE
0xA0040203
There are not enough host resources.
VM_E_TOO_MANY_VMS
0xA0040204
There are too many active virtual machines.
VM_E_VM_RUNNING
0xA0040500
The virtual machine is already running.
VM_E_PARENT_MODIFIED
0xA00400687
The virtual machine cannot be started as the parent VHD has been modified.
DISP_E_EXCEPTION
0x80020009
An unexpected error has occurred.

Remarks

If the virtual machine is saved, it will be restored from the saved state.

The following values can be returned through the Error property of the returned IVMTask object.

Error code/Value Description
VM_E_UNSUPPORTED_HARDWARE (0xA0040950)
The hardware does not support virtualization.
VM_E_HARDWARE_VIRTUALIZATION_DISABLED (0xA0040951)
Hardware virtualization is disabled.
VM_E_VMVIRTUALPC_OLDER_VERSION (0xA0040952)
Both Virtual PC 2007 and Windows Virtual PC are installed.
VM_E_OTHER_VIRTUALIZATION_SOFTWARE (0xA0040953)
Other virtualization software is installed.
VM_E_OUT_OF_RESOURCE (0xa00400203)
There are not enough host resources.

Requirements

Requirement Value
Minimum supported client
Windows 7 [desktop apps only]
Minimum supported server
None supported
End of client support
Windows 7
Product
Windows Virtual PC
Header
VPCCOMInterfaces.h
IID
IID_IVMVirtualMachine is defined as f7092aa1-33ed-4f78-a59f-c00adfc2edd7

See also

IVMVirtualMachine