Share via


IVMVirtualMachine::RemoveDVDROMDrive method

The RemoveDVDROMDrive method removes the specified CD or DVD drive from the virtual machine.

Syntax

HRESULT RemoveDVDROMDrive(
  [in] IVMDVDDrive *dvdDrive
);

Parameters

dvdDrive [in]

The DVDROM drive to be removed.

Return value

This method can return one of these values.

Return code Description
S_OK
The operation was successful.
E_POINTER
The dvdDrive parameter is NULL.
VM_E_VM_UNKNOWN
The configuration is unknown.
VM_E_VM_RUNNING
Virtual machine is running or saved.
VM_E_DRIVE_INVALID
Invalid drive specified (e.g. no CD or DVD drive is connected to this bus location).
DISP_E_EXCEPTION
An unexpected error has occurred.

Remarks

You can only remove an existing CD or DVD drive from a stopped virtual machine.

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

IVMVirtualMachine