Search code examples
c#vmwarescsi

how to set/change SCSI controller type for a virtual machine using vmware sdk in c#


I am trying to change SCSI Controller type of a virtual machine during creation process. I can use

VirtualLsiLogicSASController.sharedBus = VirtualSCSISharing.noSharing;

for setting it to no sharing option. But not able to change the Controller type. It is always "LSI Logic SAS". I want to set it to "LSI Logic Parallel". I have tried to set the description attributes of SCSI Controller by using

 scsiCtrl.deviceInfo=new Description();
 scsiCtrl.deviceInfo.label =  "SCSI controller 0";
 scsiCtrl.deviceInfo.summary = "LSI Logic";

but it is not working. Any help will be highly appreciated. Thanks...


Solution

  • found the solution... we have to use desired controller type.. i.e.

    if scsiType == "sas":
            scsiCtrl = VirtualLsiLogicSASController()
        elif scsiType == "parallel":
            scsiCtrl = VirtualLsiLogicController()
        elif scsiType == "buslogic":
            scsiCtrl = VirtualBusLogicController()
        elif scsiType == "paravirt":
            scsiCtrl = ParaVirtualSCSIController()
    

    It will set the SCSI Controller type to required type... thanks...