Share via


IVMVirtualServer::UnregisterVirtualMachine method

The UnregisterVirtualMachine method unregisters a virtual machine configuration without deleting the configuration file.

Syntax

HRESULT UnregisterVirtualMachine(
  [in] IVMVirtualMachine *virtualMachine
);

Parameters

virtualMachine [in]

Pointer to a IVMVirtualMachine object representing the virtual machine configuration to unregister.

Return value

This method can return one of these values.

This method supports standard return values, as well as the following. For information on Virtual Server specific return values not listed below, see HRESULT Codes Specific to the Virtual Server.

Return code Description
S_OK
The operation was successful.
S_FALSE
The specified configuration could not be found.
E_POINTER
The virtualMachine parameter was NULL.
VM_E_VM_RUNNING
The virtual machine is running.
DISP_E_EXCEPTION
An unexpected error occurred.

Remarks

Only stopped virtual machines can be unregistered. Existing saved state or undo drive data for this configuration will be retained when a virtual machine is unregistered.

Requirements

Product
Microsoft Virtual Server 2005 onWindows Server 2003
Download
Microsoft Virtual Server 2005 R2 SP1 Update onWindows Server 2008orWindows Server 2003
Header
VsComInterfaces.h

See also

IVMVirtualServer