Unsupported content

 

This version of the product has reached end of support. The documentation is available for your convenience. However, you must be logged in to access it. You will not be able to leave comments.

Find Virtual Machine Details operation

The Find Virtual Machine Details operation retrieves details of one or more virtual machines (VMs). 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 Find Virtual Machine Details operation

Element

Description

Required

<operation-name>

Specifies the name of the operation: find-virtual-machine-details

Yes

<arguments>

Contains the elements that specify the details to retrieve for the specified VMs

Yes

<target>

Contains a dynamic target configuration or uses a predefined target configuration of the Hyper-V server on which the request is executed

Note

If you do not specify a dynamic target in the adapter request, the default adapter configuration is used.

The <target> element contains the following elements:

  • <host>
  • <user-name>
  • <password>
  • <timeout-secs>

Conditional; required if a target is referenced or specified in the request

<host>

Specifies the host name or the IP address of the Hyper-V server

The <host> element applies to a dynamic target.

Conditional; required when specifying a dynamic target

<user-name>

Specifies the user name to be used to connect to the Hyper-V server

The <user-name> element applies to a dynamic target.

Conditional; required when specifying a dynamic target

<password>

Specifies the password that corresponds to the <user-name> provided

The <password> element applies to a dynamic target.

The <password> element can contain an encryption-type attribute that indicates whether the password specified is encrypted.

Valid values for encryption-type: base64, plain (default)

Conditional; required if <user-name> is specified

<timeout-secs>

Specifies the time, in seconds, after which the attempt to connect to the Hyper-V server fails

Default value: 60

No

<vm>

Specifies the name of the VM for which you need to retrieve details

If multiple VMs have the same name, the adapter retrieves the details of all these VMs.

Tip

You can use an empty <vm> element to retrieve the details of all VMs in the network.

No

<vm-guid>

Specifies the globally unique identifier (GUID) of a VM to restrict the operation to that VM if multiple VMs have the same name

Tip

The <vm-guid> for a specified <vm> is displayed as the value of the <guid> element in adapter response.

No

The following figure shows a sample <items> XML element for the Find Virtual Machine Details operation.



<items>
        <item>
            <target>
                <host>10.111.8.222</host>
                <user-name>somename</user-name>
                <password   encryption-type="Base64">pwd</password>   
                <timeout-secs>120</timeout-secs>
            </target>
            <vm>VM1</vm>    
            <vm-guid>1CCBFE38-FF48-424F-9FE2-713293C7105F</vm-guid>
        </item>
        <item>
            <target>
                <host>pw-mmm-abc-dv00</host>
                <user-name>somename</user-name>
                <password>pwd</password>   
            </target>
            <vm>VM5</vm>
        </item>
        <item>
            <vm>VM45</vm>
        </item>
        <item>
            <target>Config1</target>
            <vm>VM1</vm>
        </item>
</items> 

The following figure shows a sample adapter request for the Find Virtual Machine Details operation:



<ms-hyperv-request>
    <operation-name>find-virtual-machine-details</operation-name>
    <arguments>
      <target>
        <host>10.111.8.222</host>
        <user-name>somename</user-name>
        <password encryption-type="Base64">pwd</password>
        <timeout-secs>120</timeout-secs>
      </target>
      <vm>VM1</vm>
      <vm-guid>1CCBFE38-FF48-424F-9FE2-713293C7105F</vm-guid>
    </arguments>
    <arguments>
      <target>
        <host>pw-mmm-abc-dv00</host>
        <user-name>somename</user-name>
        <password>pwd</password>
      </target>
      <vm>VM5</vm>
    </arguments>
    <arguments>
      <vm>VM45</vm>
    </arguments>
    <arguments>
      <target>Config1</target>
      <vm>VM1</vm>
    </arguments>
  </ms-hyperv-request> 

The following figure shows a sample adapter response for the Find Virtual Machine Details operation:



<ms-hyperv-response>
  <metadata>
    <status>success</status>
    <response-count>4</response-count>
  </metadata>
  <responses>
    <FindVirtualMachineDetailsResponse>
      <metadata>
        <target>10.111.8.222</target>
        <status>success</status>
        <count>1</count>
      </metadata>
      <items>
        <item>
          <vm-element-name>VM1</vm-element-name>
          <genus>2</genus>
          <class>Msvm_ComputerSystem</class>
          <superclass>CIM_ComputerSystem</superclass>
          <dynasty>CIM_ManagedElement</dynasty>
          <relpath>Msvm_ComputerSystem.CreationClassName="Msvm_ComputerSystem",Name="1CCBFE38-FF48-424F-9FE2-713293C7105F"</relpath>
          <property-count>29</property-count>
          <derivation>{CIM_ComputerSystem, CIM_System, CIM_EnabledLogicalElement, CIM_LogicalElement...}</derivation>
          <server>pw-mmm-abc-dv00</server>
          <namespace>root\virtualization</namespace>
          <path>\\pw-mmm-abc-dv00\root\virtualization:Msvm_ComputerSystem.CreationClassName="Msvm_ComputerSystem",Name="1CCBFE38-FF48-424F-9FE2-713293C7105F"</path>
          <assigned-numa-node-list>{}</assigned-numa-node-list>
          <caption>Virtual Machine</caption>
          <creation-class-name>Msvm_ComputerSystem</creation-class-name>
          <dedicated></dedicated>
          <description>Microsoft Virtual Machine</description>
          <element-name>VM1</element-name>
          <enabled-default>2</enabled-default>
          <state>Stopped</state>
          <health-state>5</health-state>
          <identifying-descriptions></identifying-descriptions>
          <install-date>20120309105211.000000-000</install-date>
          <guid>1CCBFE38-FF48-424F-9FE2-713293C7105F</guid>
          <name-format></name-format>
          <on-time-in-milliseconds>0</on-time-in-milliseconds>
          <operational-status>{2}</operational-status>
          <other-dedicated-descriptions></other-dedicated-descriptions>
          <other-enabled-state></other-enabled-state>
          <other-identifying-info></other-identifying-info>
          <power-management-capabilities></power-management-capabilities>
          <primary-owner-contact></primary-owner-contact>
          <primary-owner-name></primary-owner-name>
          <process-i-d>0</process-i-d>
          <requested-state>Not Applicable</requested-state>
          <reset-capability>1</reset-capability>
          <roles></roles>
          <status></status>
          <status-descriptions>{Operating normally}</status-descriptions>
          <time-of-last-configuration-change>20120320100557.508405-000</time-of-last-configuration-change>
          <time-of-last-state-change>20120321051132.000000-000</time-of-last-state-change>
        </item>
      </items>
    </FindVirtualMachineDetailsResponse>
    <FindVirtualMachineDetailsResponse>
      <metadata>
        <target>pw-mmm-abc-dv00</target>
        <status>success</status>
        <count>1</count>
      </metadata>
      <items>
        <item>
          <vm-element-name>VM5</vm-element-name>
          <genus>2</genus>
          <class>Msvm_ComputerSystem</class>
          <superclass>CIM_ComputerSystem</superclass>
          <dynasty>CIM_ManagedElement</dynasty>
          <relpath>Msvm_ComputerSystem.CreationClassName="Msvm_ComputerSystem",Name="26D3A022-D84E-4F2B-842B-8C173EFFD865"</relpath>
          <property-count>29</property-count>
          <derivation>{CIM_ComputerSystem, CIM_System, CIM_EnabledLogicalElement, CIM_LogicalElement...}</derivation>
          <server>pw-mmm-abc-dv00</server>
          <namespace>root\virtualization</namespace>
          <path>\\pw-mmm-abc-dv00\root\virtualization:Msvm_ComputerSystem.CreationClassName="Msvm_ComputerSystem",Name="26D3A022-D84E-4F2B-842B-8C173EFFD865"</path>
          <assigned-numa-node-list>{}</assigned-numa-node-list>
          <caption>Virtual Machine</caption>
          <creation-class-name>Msvm_ComputerSystem</creation-class-name>
          <dedicated></dedicated>
          <description>Microsoft Virtual Machine</description>
          <element-name>VM5</element-name>
          <enabled-default>2</enabled-default>
          <state>Stopped</state>
          <health-state>5</health-state>
          <identifying-descriptions></identifying-descriptions>
          <install-date>20120309083300.000000-000</install-date>
          <guid>26D3A022-D84E-4F2B-842B-8C173EFFD865</guid>
          <name-format></name-format>
          <on-time-in-milliseconds>0</on-time-in-milliseconds>
          <operational-status>{2}</operational-status>
          <other-dedicated-descriptions></other-dedicated-descriptions>
          <other-enabled-state></other-enabled-state>
          <other-identifying-info></other-identifying-info>
          <power-management-capabilities></power-management-capabilities>
          <primary-owner-contact></primary-owner-contact>
          <primary-owner-name></primary-owner-name>
          <process-i-d>0</process-i-d>
          <requested-state>Not Applicable</requested-state>
          <reset-capability>1</reset-capability>
          <roles></roles>
          <status></status>
          <status-descriptions>{Operating normally}</status-descriptions>
          <time-of-last-configuration-change>20120316085800.382629-000</time-of-last-configuration-change>
          <time-of-last-state-change>20120321051132.000000-000</time-of-last-state-change>
        </item>
      </items>
    </FindVirtualMachineDetailsResponse>
    <FindVirtualMachineDetailsResponse>
      <metadata>
        <target>10.111.8.222</target>
        <status>success</status>
        <count>1</count>
      </metadata>
      <items>
        <item>
          <vm-element-name>VM45</vm-element-name>
          <genus>2</genus>
          <class>Msvm_ComputerSystem</class>
          <superclass>CIM_ComputerSystem</superclass>
          <dynasty>CIM_ManagedElement</dynasty>
          <relpath>Msvm_ComputerSystem.CreationClassName="Msvm_ComputerSystem",Name="8F7A9D52-F292-4599-95C7-1D559595D9CB"</relpath>
          <property-count>29</property-count>
          <derivation>{CIM_ComputerSystem, CIM_System, CIM_EnabledLogicalElement, CIM_LogicalElement...}</derivation>
          <server>pw-mmm-abc-dv00</server>
          <namespace>root\virtualization</namespace>
          <path>\\pw-mmm-abc-dv00\root\virtualization:Msvm_ComputerSystem.CreationClassName="Msvm_ComputerSystem",Name="8F7A9D52-F292-4599-95C7-1D559595D9CB"</path>
          <assigned-numa-node-list>{}</assigned-numa-node-list>
          <caption>Virtual Machine</caption>
          <creation-class-name>Msvm_ComputerSystem</creation-class-name>
          <dedicated></dedicated>
          <description>Microsoft Virtual Machine</description>
          <element-name>VM45</element-name>
          <enabled-default>2</enabled-default>
          <state>Stopped</state>
          <health-state>5</health-state>
          <identifying-descriptions></identifying-descriptions>
          <install-date>20120302130838.000000-000</install-date>
          <guid>8F7A9D52-F292-4599-95C7-1D559595D9CB</guid>
          <name-format></name-format>
          <on-time-in-milliseconds>0</on-time-in-milliseconds>
          <operational-status>{2}</operational-status>
          <other-dedicated-descriptions></other-dedicated-descriptions>
          <other-enabled-state></other-enabled-state>
          <other-identifying-info></other-identifying-info>
          <power-management-capabilities></power-management-capabilities>
          <primary-owner-contact></primary-owner-contact>
          <primary-owner-name></primary-owner-name>
          <process-i-d>0</process-i-d>
          <requested-state>Not Applicable</requested-state>
          <reset-capability>1</reset-capability>
          <roles></roles>
          <status></status>
          <status-descriptions>{Operating normally}</status-descriptions>
          <time-of-last-configuration-change>20120316071143.715429-000</time-of-last-configuration-change>
          <time-of-last-state-change>20120321051132.000000-000</time-of-last-state-change>
        </item>
      </items>
    </FindVirtualMachineDetailsResponse>
    <FindVirtualMachineDetailsResponse>
      <metadata>
        <target>pw-mmm-abc-dv00</target>
        <status>success</status>
        <count>2</count>
      </metadata>
      <items>
        <item>
          <vm-element-name>VM1</vm-element-name>
          <genus>2</genus>
          <class>Msvm_ComputerSystem</class>
          <superclass>CIM_ComputerSystem</superclass>
          <dynasty>CIM_ManagedElement</dynasty>
          <relpath>Msvm_ComputerSystem.CreationClassName="Msvm_ComputerSystem",Name="1CCBFE38-FF48-424F-9FE2-713293C7105F"</relpath>
          <property-count>29</property-count>
          <derivation>{CIM_ComputerSystem, CIM_System, CIM_EnabledLogicalElement, CIM_LogicalElement...}</derivation>
          <server>pw-mmm-abc-dv00</server>
          <namespace>root\virtualization</namespace>
          <path>\\pw-mmm-abc-dv00\root\virtualization:Msvm_ComputerSystem.CreationClassName="Msvm_ComputerSystem",Name="1CCBFE38-FF48-424F-9FE2-713293C7105F"</path>
          <assigned-numa-node-list>{}</assigned-numa-node-list>
          <caption>Virtual Machine</caption>
          <creation-class-name>Msvm_ComputerSystem</creation-class-name>
          <dedicated></dedicated>
          <description>Microsoft Virtual Machine</description>
          <element-name>VM1</element-name>
          <enabled-default>2</enabled-default>
          <state>Stopped</state>
          <health-state>5</health-state>
          <identifying-descriptions></identifying-descriptions>
          <install-date>20120309105211.000000-000</install-date>
          <guid>1CCBFE38-FF48-424F-9FE2-713293C7105F</guid>
          <name-format></name-format>
          <on-time-in-milliseconds>0</on-time-in-milliseconds>
          <operational-status>{2}</operational-status>
          <other-dedicated-descriptions></other-dedicated-descriptions>
          <other-enabled-state></other-enabled-state>
          <other-identifying-info></other-identifying-info>
          <power-management-capabilities></power-management-capabilities>
          <primary-owner-contact></primary-owner-contact>
          <primary-owner-name></primary-owner-name>
          <process-i-d>0</process-i-d>
          <requested-state>Not Applicable</requested-state>
          <reset-capability>1</reset-capability>
          <roles></roles>
          <status></status>
          <status-descriptions>{Operating normally}</status-descriptions>
          <time-of-last-configuration-change>20120320100557.508405-000</time-of-last-configuration-change>
          <time-of-last-state-change>20120321051132.000000-000</time-of-last-state-change>
        </item>
        <item>
          <vm-element-name>VM1</vm-element-name>
          <genus>2</genus>
          <class>Msvm_ComputerSystem</class>
          <superclass>CIM_ComputerSystem</superclass>
          <dynasty>CIM_ManagedElement</dynasty>
          <relpath>Msvm_ComputerSystem.CreationClassName="Msvm_ComputerSystem",Name="C7E3C0D2-2925-4796-8513-E4A2FFB13168"</relpath>
          <property-count>29</property-count>
          <derivation>{CIM_ComputerSystem, CIM_System, CIM_EnabledLogicalElement, CIM_LogicalElement...}</derivation>
          <server>pw-mmm-abc-dv00</server>
          <namespace>root\virtualization</namespace>
          <path>\\pw-mmm-abc-dv00\root\virtualization:Msvm_ComputerSystem.CreationClassName="Msvm_ComputerSystem",Name="C7E3C0D2-2925-4796-8513-E4A2FFB13168"</path>
          <assigned-numa-node-list>{}</assigned-numa-node-list>
          <caption>Virtual Machine</caption>
          <creation-class-name>Msvm_ComputerSystem</creation-class-name>
          <dedicated></dedicated>
          <description>Microsoft Virtual Machine</description>
          <element-name>VM1</element-name>
          <enabled-default>2</enabled-default>
          <state>Stopped</state>
          <health-state>5</health-state>
          <identifying-descriptions></identifying-descriptions>
          <install-date>20120309105133.000000-000</install-date>
          <guid>C7E3C0D2-2925-4796-8513-E4A2FFB13168</guid>
          <name-format></name-format>
          <on-time-in-milliseconds>0</on-time-in-milliseconds>
          <operational-status>{2}</operational-status>
          <other-dedicated-descriptions></other-dedicated-descriptions>
          <other-enabled-state></other-enabled-state>
          <other-identifying-info></other-identifying-info>
          <power-management-capabilities></power-management-capabilities>
          <primary-owner-contact></primary-owner-contact>
          <primary-owner-name></primary-owner-name>
          <process-i-d>0</process-i-d>
          <requested-state>Not Applicable</requested-state>
          <reset-capability>1</reset-capability>
          <roles></roles>
          <status></status>
          <status-descriptions>{Operating normally}</status-descriptions>
          <time-of-last-configuration-change>20120320103346.118535-000</time-of-last-configuration-change>
          <time-of-last-state-change>20120321051132.000000-000</time-of-last-state-change>
        </item>
      </items>
    </FindVirtualMachineDetailsResponse>
  </responses>
</ms-hyperv-response> 

Was this page helpful? Yes No Submitting... Thank you

Comments