IVMVirtualMachine::RemoveHardDiskConnection method
The RemoveHardDiskConnection method removes the specified hard disk connection from the virtual machine.
Syntax
HRESULT RemoveHardDiskConnection(
[in] IVMHardDiskConnection *hardDiskConnection
);
Parameters
-
hardDiskConnection [in]
-
Hard disk connection to remove from this virtual machine.
Return value
This method can return one of these values.
Return code | Description |
---|---|
|
The operation was successful. |
|
The hardDiskConnection parameter is NULL. |
|
The configuration is unknown. |
|
Virtual machine is running or saved. |
|
Invalid drive specified (e.g. no hard disk is connected to this bus location). |
|
An unexpected error has occurred. |
Remarks
You can only remove an existing hard disk connection from a stopped virtual machine. A list of connections currently attached to the virtual machine is obtained by enumerating the HardDiskConnections property.
Requirements
Product |
Microsoft Virtual Server 2005 onWindows Server 2003 |
Download |
Microsoft Virtual Server 2005 R2 SP1 Update onWindows Server 2008orWindows Server 2003 |
Header |
|