IVMDVDDrive::SetBusLocation method
The SetBusLocation method attaches the DVD drive to the specified bus location in the virtual machine.
Syntax
HRESULT SetBusLocation(
[in] VMDriveBusType busType,
[in] long busNumber,
[in] long deviceNumber
);
Parameters
-
busType [in]
-
Enumerated value designating the type of bus (IDE or SCSI) to which this drive is to be attached.
-
busNumber [in]
-
The bus number to which this drive is to be attached. For example, on an IDE bus, this number would represent whether to use the primary or secondary bus number.
-
deviceNumber [in]
-
The device number to which this drive is to be attached. For example, on an IDE bus, this number would represent whether to use the primary or secondary device location.
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 |
---|---|
|
The operation was successful. |
|
The bus location specified is not valid. |
|
The bus location cannot be set while the virtual machine is running or in a saved state. |
|
Another device is already attached to the specified bus location. |
|
The current drive could not be initialized. |
|
The changes could not be written to the preferences file because the virtual machine for this drive could not be determined. |
|
An unexpected error occurred. |
Remarks
Virtual Server does not support attaching a DVD drive to a SCSI bus. A E_INVALIDARG error will be returned if the busType argument is set to vmDriveBusType_SCSI.
Requirements
Product |
Microsoft Virtual Server 2005 onWindows Server 2003 |
Download |
Microsoft Virtual Server 2005 R2 SP1 Update onWindows Server 2008orWindows Server 2003 |
Header |
|