Mount Virtual Disk operation for Microsoft Hyper-V Server 2012 adapter


The Mount Virtual Disk operation mounts a disk on an existing logical drive on the virtual machine (VM). This disk is usually a Virtual Hard Disk (VHD) file, but you can also specify an ISO file or the path to an optical disk. This topic illustrates the actor adapter request and response and describes the elements used in the request.

The following table describes the elements for the adapter request:

 Adapter request elements for the Mount Virtual Disk operation 

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

Sample <items> XML element for the Mount Virtual Disk operation

 

<items>
<item>
 <target>
<host>localhost</host>
<user-name>admin</user-name>
<password encryption-type="Base64">YWRtaW4=</password>
<timeout-secs>120</timeout-secs>
  </target>
<path>C:\test.vhdx</path>
     </item>
  <item>
 <target>
<host>localhost</host>
<user-name>admin</user-name>
<password encryption-type="Base64">YWRtaW4=</password>
<timeout-secs>120</timeout-secs>
 </target>
<path>C:\test.vhdx</path>
<read-only/>
  </item>
</items>

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

Sample adapter request for the Mount Virtual Disk operation

<ms-hyperv-request>
 <operation-name>mount-virtual-disk</operation-name>
        <arguments>
             <target>
                 <host>localhost</host>
                 <user-name>admin</user-name>
                 <password encryption-type="Base64">YWRtaW4=</password>
              </target>
                 <path>C:\test.vhdx</path>
       </arguments>
</ms-hyperv-request>

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

Sample adapter response for the Mount Virtual Disk operation

<ms-hyperv-response>
 <metadata>
   <status>success</status>
   <response-count>1</response-count>
 </metadata>
 <responses>
   <MountVirtualDiskResponse>
     <metadata>
       <target>BW-HOU-DCA-DV01</target>
       <status>success</status>
       <count>1</count>
     </metadata>
     <items>
       <item />
     </items>
   </MountVirtualDiskResponse>
 </responses>
</ms-hyperv-response>

 

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