IVMHardDiskConnection::SetBusLocation method
The SetBusLocation method sets the bus location to which this hard disk is attached.
Syntax
HRESULT SetBusLocation(
[in] VMDriveBusType busType,
[in] long busNumber,
[in] long deviceNumber
);
Parameters
-
busType [in]
-
The type of bus to use.
-
busNumber [in]
-
Which bus number to use. If the busType is vmDriveBusTypeIDE, the busNumber must be in the range of 0 through 1. If the busType is vmDriveBusTypeSCSI, the busNumber must be in the range of 0 through 3.
-
deviceNumber [in]
-
Which device number to use on the selected bus. If the busType is vmDriveBusTypeIDE, the deviceNumber must be in the range of 0 through 1. If the busType is vmDriveBusTypeSCSI, the deviceNumber must be in the range of 0 through 6. If the busType is vmDriveBusTypeSCSI and the bus is being used for a shared SCSI bus, the deviceNumber must be 0.
Return value
This method can return one of these values.
Return code | Description |
---|---|
|
The operation was successful. |
|
The bus location specified is invalid. |
|
The bus location could not be set because the virtual machine is currently running. |
|
The bus location could not be set because another device is currently attached to this location. |
|
The current drive is invalid. |
|
The current virtual machine is invalid. |
|
An unexpected error occurred. |
Remarks
Only one disk device is allowed on a shared SCSI controller.
Requirements
Product |
Microsoft Virtual Server 2005 onWindows Server 2003 |
Download |
Microsoft Virtual Server 2005 R2 SP1 Update onWindows Server 2008orWindows Server 2003 |
Header |
|