Information

This site will undergo a brief period of maintenance on Friday, 18 December at 12:30 AM Central/12:00 PM IST. During a 30 minute window, site availability may be intermittent.

Add Virtual Hard Disk operation


The Add Virtual Hard Disk operation adds a virtual hard disk to the virtual machine (VM). This topic illustrates the actor adapter request and response and describes the elements used in the request.

Error
Warning

The Add Virtual Hard Disk operation works only when the state of the VM is "Stopped".

The following table describes the elements for the adapter request:

 Adapter request elements for the Add Virtual Hard Disk operation

 

The following figure shows a sample <items> XML element for the Add Virtual Hard Disk operation:

Sample <items> XML element for the Add Virtual Hard Disk operation

<items>
 <item>
   <target>
      <host>10.128.8.172</host>
      <user-name>administrator</user-name>
      <password encryption-type="plain">abcd</password>
      <timeout-secs>120</timeout-secs>
   </target>
   <vm>VM5</vm>
   <controller-id>1</controller-id>
   <lun>9</lun>
   <fixed />
   <scsi>true</scsi>
   <vhd-path>D:\Virtual Machines_VM1\New Virtual Hard Disk432.vhd</vhd-path>
   <parent-vhd-path>D:\Virtual Machines_VM1\New Virtual Hard Disk323.vhd</parent-vhd-path>
 </item>
 <item>
   <vm>VM6</vm>
   <size-in-gb>1</size-in-gb>
   <fixed>true<fixed>
   <scsi>true</scsi>
   <vhd-path>D:\Virtual Machines_VM1\New Virtual Hard Disk431.vhd</vhd-path>
   <parent-vhd-path></parent-vhd-path>
 </item>
 <item
   <target>Config1</target>
   <vm>VM1</vm>
   <vm-guid>1CCBFE38-FF48-424F-9FE2-713293C7105F</vm-guid>
   <controller-id>1</controller-id>
   <lun>9</lun
   <fixed />
   <scsi>true</scsi>
   <vhd-path>D:\Virtual Machines_VM1\New Virtual Hard Disk433.vhd</vhd-path>
 </item>
</items> 

The following figure shows a sample adapter request for the Add Virtual Hard Disk operation:

Sample adapter request for the Add Virtual Hard Disk operation

<ms-hyperv-request>
   <operation-name>add-virtual-hard-disk</operation-name
   <arguments>
     <target>
       <host>10.111.8.222</host>
       <user-name>administrator</user-name>
       <password encryption-type="plain">abcd</password>
       <timeout-secs>120</timeout-secs>
     </target>
     <vm>VM5</vm>
     <controller-id>1</controller-id>
     <lun>9</lun>
     <fixed />
     <scsi>true</scsi>
     <vhd-path>D:\Virtual Machines_VM1\New Virtual Hard Disk432.vhd</vhd-path>
     <parent-vhd-path>D:\Virtual Machines_VM1\New Virtual Hard Disk323.vhd</parent-vhd-path>
   </arguments>
   <arguments>
     <vm>VM6</vm>
     <size-in-gb>1</size-in-gb>
     <fixed>true</fixed>
     <scsi>true</scsi>
     <vhd-path>D:\Virtual Machines_VM1\New Virtual Hard Disk431.vhd</vhd-path>
     <parent-vhd-path />
   </arguments>
   <arguments>
     <target>Config1</target>
     <vm>VM1</vm>
     <vm-guid>1CCBFE00-FF48-424F-9FE2-713293C7505F</vm-guid>
     <controller-id>1</controller-id>
     <lun>9</lun>
     <fixed />
     <scsi>true</scsi>
     <vhd-path>D:\Virtual Machines_VM1\New Virtual Hard Disk433.vhd</vhd-path>
   </arguments>
</ms-hyperv-request> 

The following figure shows a sample adapter response for the Add Virtual Hard Disk operation:

Sample adapter response for the Add Virtual Hard Disk operation

<ms-hyperv-response>
 <metadata>
   <status>success</status>
   <response-count>3</response-count>
 </metadata>
 <responses>
   <AddVirtualHardDiskResponse>
     <metadata>
       <target>10.111.8.222</target>
       <status>success</status>
       <count>1</count>
     </metadata>
     <items>
       <item>
         <vm-element-name>VM5</vm-element-name>
         <genus>2</genus>
         <class>Msvm_ResourceAllocationSettingData</class>
         <superclass>CIM_ResourceAllocationSettingData</superclass>
         <dynasty>CIM_ManagedElement</dynasty>
         <relpath>Msvm_ResourceAllocationSettingData.InstanceID="Micro</relpath>
         <soft>26D3A022-D84E-4F2B-842B-8C173EFFD865\\4E74349C-0BE0-45C4-8A46-109FE6E8F12C\\0\\9\\L"</soft>
         <property-count>22</property-count>
         <derivation>{CIM_ResourceAllocationSettingData, CIM_SettingData,CIM_ManagedElement}</derivation>
         <server>PW-PUN-RDS-DV01</server>
         <namespace>root\virtualization</namespace>
         <path>\\PW-PUN-RDS-DV01\root\virtualization:Msvm_ResourceA26D3A022-D84E-4F2B-842B-8C173EFFD865\\4E74349C-0BE0-45C4-8A46-109FE6E8F12C\\0\\9\\L"</path>
         <address></address>
         <allocation-units>Disks</allocation-units>
         <automatic-allocation>True</automatic-allocation>
         <automatic-deallocation>True</automatic-deallocation>
         <caption>Hard Disk Image</caption>
         <connection>{D:\Virtual Machines_VM1\New Virtual Hard Disk432.vhd}</connection>
         <consumer-visibility>3</consumer-visibility>
         <description>Settings for the Microsoft Hard Disk Image.</description>
         <element-name>Hard Disk Image</element-name>
         <host-resource></host-resource>
         <instance-i-d>Microsoft:26D3A022-D84E-4F2B-842B-8C173EFFD865\4E74349C-0BE0-45C4-8A46-109FE6E8F12C\0\9\L</instance-i-d>
         <limit>1</limit>
         <mapping-behavior></mapping-behavior>
         <other-resource-type></other-resource-type>
         <parent>\\PW-PUN-RDS-DV01\root\virtualization:Msvm_ResourceA26D3A022-D84E-4F2B-842B-8C173EFFD865\\4E74349C-0BE0-45C4-8A46-109FE6E8F12C\\0\\9\\D"</parent>
         <pool-i-d>Microsoft:70BB60D2-A9D3-46aa-B654-3DE53004B4F8\Root</pool-i-d>
         <reservation>1</reservation>
         <resource-sub-type>Microsoft Virtual Hard Disk</resource-sub-type>
         <resource-type>21</resource-type>
         <virtual-quantity>1</virtual-quantity>
         <virtual-system-identifiers></virtual-system-identifiers>
         <weight>0</weight>
       </item>
     </items>
   </AddVirtualHardDiskResponse>
   <AddVirtualHardDiskResponse>
     <metadata>
       <target>10.128.8.172</target>
       <status>success</status>
       <count>1</count>
     </metadata>
     <items>
       <item>
         <vm-element-name>VM6</vm-element-name>
         <genus>2</genus>
         <class>Msvm_ResourceAllocationSettingData</class>
         <superclass>CIM_ResourceAllocationSettingData</superclass>
         <dynasty>CIM_ManagedElement</dynasty>
         <relpath>Msvm_ResourceAllocationSettingData.InstanceID="Micro</relpath>
         <soft>37D53DC3-FF03-49DA-A973-B5EDE7A90F44\\7CF5ACE0-988E-47E7-BD34-3000D927E415\\0\\0\\L"</soft>
         <property-count>22</property-count>
         <derivation>{CIM_ResourceAllocationSettingData, CIM_SettingData,CIM_ManagedElement}</derivation>
         <server>PW-PUN-RDS-DV01</server>
         <namespace>root\virtualization</namespace>
         <path>\\PW-PUN-RDS-DV01\root\virtualization:Msvm_ResourceA37D53DC3-FF03-49DA-A973-B5EDE7A90F44\\7CF5ACE0-988E-47E7-BD34-3000D927E415\\0\\0\\L"</path>
         <address></address>
         <allocation-units>Disks</allocation-units>
         <automatic-allocation>True</automatic-allocation>
         <automatic-deallocation>True</automatic-deallocation>
         <caption>Hard Disk Image</caption>
         <connection>{D:\Virtual Machines_VM1\New Virtual Hard Disk431.vhd}</connection>
         <consumer-visibility>3</consumer-visibility>
         <description>Settings for the Microsoft Hard Disk Image.</description>
         <element-name>Hard Disk Image</element-name>
         <host-resource></host-resource>
         <instance-i-d>Microsoft:37D53DC3-FF03-49DA-A973-B5EDE7A90F44\7CF5ACE0-988E-47E7-BD34-3000D927E415\0\0\L</instance-i-d>
         <limit>1</limit>
         <mapping-behavior></mapping-behavior>
         <other-resource-type></other-resource-type>
         <parent>\\PW-PUN-RDS-DV01\root\virtualization:Msvm_ResourceA37D53DC3-FF03-49DA-A973-B5EDE7A90F44\\7CF5ACE0-988E-47E7-BD34-3000D927E415\\0\\0\\D"</parent>
         <pool-i-d>Microsoft:70BB60D2-A9D3-46aa-B654-3DE53004B4F8\Root</pool-i-d>
         <reservation>1</reservation>
         <resource-sub-type>Microsoft Virtual Hard Disk</resource-sub-type>
         <resource-type>21</resource-type>
         <virtual-quantity>1</virtual-quantity>
         <virtual-system-identifiers></virtual-system-identifiers>
         <weight>0</weight>
       </item>
     </items>
   </AddVirtualHardDiskResponse>
   <AddVirtualHardDiskResponse>
     <metadata>
       <target>pw-pun-rds-dv01</target>
       <status>success</status>
       <count>1</count>
     </metadata>
     <items>
       <item>
         <vm-element-name>VM1</vm-element-name>
         <genus>2</genus>
         <class>Msvm_ResourceAllocationSettingData</class>
         <superclass>CIM_ResourceAllocationSettingData</superclass>
         <dynasty>CIM_ManagedElement</dynasty>
         <relpath>Msvm_ResourceAllocationSettingData.InstanceID="Micro</relpath>
         <soft>1CCBFE38-FF48-424F-9FE2-713293C7105F\\EBC9963B-7C2E-483C-9B9A-2CE152525A1F\\0\\9\\L"</soft>
         <property-count>22</property-count>
         <derivation>{CIM_ResourceAllocationSettingData, CIM_SettingData,CIM_ManagedElement}</derivation>
         <server>PW-PUN-RDS-DV01</server>
         <namespace>root\virtualization</namespace>
         <path>\\PW-PUN-RDS-DV01\root\virtualization:Msvm_ResourceA1CCBFE38-FF48-424F-9FE2-713293C7105F\\EBC9963B-7C2E-483C-9B9A-2CE152525A1F\\0\\9\\L"</path>
         <address></address>
         <allocation-units>Disks</allocation-units>
         <automatic-allocation>True</automatic-allocation>
         <automatic-deallocation>True</automatic-deallocation>
         <caption>Hard Disk Image</caption>
         <connection>{D:\Virtual Machines_VM1\New Virtual Hard Disk433.vhd}</connection>
         <consumer-visibility>3</consumer-visibility>
         <description>Settings for the Microsoft Hard Disk Image.</description>
         <element-name>Hard Disk Image</element-name>
         <host-resource></host-resource>
         <instance-i-d>Microsoft:1CCBFE38-FF48-424F-9FE2-713293C7105F\EBC9963B-7C2E-483C-9B9A-2CE152525A1F\0\9\L</instance-i-d>
         <limit>1</limit>
         <mapping-behavior></mapping-behavior>
         <other-resource-type></other-resource-type>
         <parent>\\PW-PUN-RDS-DV01\root\virtualization:Msvm_ResourceA1CCBFE38-FF48-424F-9FE2-713293C7105F\\EBC9963B-7C2E-483C-9B9A-2CE152525A1F\\0\\9\\D"</parent>
         <pool-i-d>Microsoft:70BB60D2-A9D3-46aa-B654-3DE53004B4F8\Root</pool-i-d>
         <reservation>1</reservation>
         <resource-sub-type>Microsoft Virtual Hard Disk</resource-sub-type>
         <resource-type>21</resource-type>
         <virtual-quantity>1</virtual-quantity>
         <virtual-system-identifiers></virtual-system-identifiers>
         <weight>0</weight>
       </item>
     </items>
   </AddVirtualHardDiskResponse>
 </responses>
</ms-hyperv-response> 

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC Atrium Orchestrator Content 20.16.02