VMware {code} Community
johanneshiemer
Enthusiast
Enthusiast
Jump to solution

Adding SCSI controller manually

Hi,

I have troubles adding a SCSI controller. My code looks like this:

name = "SSCI Controller";

description = "SSCI Controller";

address = 0;

type = 6;

subType = "lsilogicsas";

CimString cimString = new CimString();

Map<QName, String> cimAttributes = cimString.getOtherAttributes();

cimAttributes.put(new QName("http://www.vmware.com/vcloud/v1.5",

"busSubType", "vcloud"), subType);

cimAttributes.put(new QName("http://www.vmware.com/vcloud/v1.5",

"busType", "vcloud"), String.valueOf(type));

cimString.getOtherAttributes().putAll(cimAttributes);

CimString setElementName = new CimString();

setElementName.setValue(name);

CimString setDescription = new CimString();

setDescription.setValue(description);

CimString setInstanceID = new CimString();

setInstanceID.setValue("1000");

ResourceType setResourceType = new ResourceType();

setResourceType.setValue(String.valueOf(type));

CimString setAddress = new CimString();

setAddress.setValue(String.valueOf(address));

RASDType diskItemType = new RASDType();

diskItemType.setElementName(setElementName);

diskItemType.setDescription(setDescription);

diskItemType.setInstanceID(setInstanceID);

diskItemType.setResourceType(setResourceType);

diskItemType.setAddress(setAddress);

diskItemType.getHostResource().add(cimString);

The xml looks like this:

<ns6:Item>
        <ns3:Address>0</ns3:Address>
        <ns3:Description>IDE Controller</ns3:Description>
        <ns3:ElementName>IDE Controller 0</ns3:ElementName>
            <ns3:InstanceID>1</ns3:InstanceID>
        <ns3:ResourceType>5</ns3:ResourceType>
    </ns6:Item>
    <ns6:Item>
        <ns3:Address>0</ns3:Address>
            <ns3:Description>SSCI Controller</ns3:Description>
        <ns3:ElementName>SSCI Controller</ns3:ElementName>
        <ns3:HostResource ns6:busSubType="lsilogicsas" ns6:busType="6"/>
        <ns3:InstanceID>1000</ns3:InstanceID>
        <ns3:ResourceType>6</ns3:ResourceType>
    </ns6:Item>

I also get a success message:

<Task xmlns="http://www.vmware.com/vcloud/v1.5" status="success" startTime="2011-11-08T21:14:32.401+01:00" operationName="vappUpdateVm" operation="Updated Virtual Machine Test Machine(6c99a693-fcfc-4424-afdb-cf5a9172447b)" expiryTime="2012-02-06T21:14:32.401+01:00" endTime="2011-11-08T21:14:32.635+01:00" name="task" id="urn:vcloud:task:ac59ce2a-fc3f-451e-891d-0a2e1ab54e7c" type="application/vnd.vmware.vcloud.task+xml" href="https://188.138.123.220/api/task/ac59ce2a-fc3f-451e-891d-0a2e1ab54e7c" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.vmware.com/vcloud/v1.5 http://172.30.34.220/api/v1.5/schema/master.xsd">

    <Owner type="application/vnd.vmware.vcloud.vm+xml" name="Test Machine" href="https://188.138.123.220/api/vApp/vm-6c99a693-fcfc-4424-afdb-cf5a9172447b"/>

    <User type="application/vnd.vmware.admin.user+xml" name="scriptuser" href="https://188.138.123.220/api/admin/user/8062b4a4-2aa5-4858-af62-b8bee8baa693"/>

    <Organization type="application/vnd.vmware.vcloud.org+xml" name="Demo" href="https://188.138.123.220/api/org/baca2a0b-d2be-4b6a-ad30-9268b9cdee23"/>

</Task>

The problem is, taking a look into the hardware section I don't find the SCSI controller...

Can anyone help me?

0 Kudos
1 Solution

Accepted Solutions
rkamal
VMware Employee
VMware Employee
Jump to solution

Hi,

Adding a disk of SCSI type will take care of adding the SCSI controller for you.

I dont think you can add only a SCSI controller without any disk to it.

Try adding only a disk of SCSI(buslogic, lsilogic, lsilogicsas, VIrtualSCSI) type which will take care of adding a SCSI controller for you.

    <ns6:Item>

        <ns4:ElementName>any name</ns4:ElementName>
        <ns4:HostResource ns6:capacity="1024" ns6:busSubType="lsilogicsas" ns6:busType="6"/>
        <ns4:InstanceID>any id</ns4:InstanceID>
        <ns4:ResourceType>17</ns4:ResourceType>
    </ns6:Item>

Regards,

Rajesh Kamal.

View solution in original post

0 Kudos
2 Replies
rkamal
VMware Employee
VMware Employee
Jump to solution

Hi,

Adding a disk of SCSI type will take care of adding the SCSI controller for you.

I dont think you can add only a SCSI controller without any disk to it.

Try adding only a disk of SCSI(buslogic, lsilogic, lsilogicsas, VIrtualSCSI) type which will take care of adding a SCSI controller for you.

    <ns6:Item>

        <ns4:ElementName>any name</ns4:ElementName>
        <ns4:HostResource ns6:capacity="1024" ns6:busSubType="lsilogicsas" ns6:busType="6"/>
        <ns4:InstanceID>any id</ns4:InstanceID>
        <ns4:ResourceType>17</ns4:ResourceType>
    </ns6:Item>

Regards,

Rajesh Kamal.

0 Kudos
johanneshiemer
Enthusiast
Enthusiast
Jump to solution

Hi Rajesh,

as always, thanks a lot.

Works fine now!

0 Kudos