This section illustrates the XML format for an error request and response.
The following figure shows a sample invalid request for the Find Virtual Machine Details operation when the name of virtual machine specified does not match the specified globally unique identifier (GUID):
Sample invalid request example one
The [expand] macro is a standalone macro and it cannot be used inline.
The following figure shows a sample error response for the preceding error request:
Sample error response for invalid request example one
The [expand] macro is a standalone macro and it cannot be used inline.
The following figure shows a sample invalid request for the Update Virtual Machine Processors operation when you provide a value is greater than the maximum valid value (100) for <reservation>:
Sample invalid request example two
The [expand] macro is a standalone macro and it cannot be used inline.
The following figure shows a sample error response for the preceding error request:
Sample error response for invalid request example two
The [expand] macro is a standalone macro and it cannot be used inline.
The following figure shows a sample invalid request for the Set Virtual Machine State operation when there are duplicate virtual machines and the operation is application to only a single virtual machine:
Sample invalid request example three
The [expand] macro is a standalone macro and it cannot be used inline.
The following figure shows a sample error response for the preceding error request:
Sample error response for invalid request example three
Click here to expand...
<ms-hyperv-response>
<metadata>
<status>success</status>
<response-count>1</response-count>
</metadata>
<responses>
<SetVirtualMachineStateResponse>
<metadata>
<target>10.128.8.172</target>
<status>error</status>
<count>2</count>
</metadata>
<items>
<item>
<error>Failed to change state of VM VM1 to: Stopped.InvalidStateForOperation</error>
</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-PUN-RDS-DV01</server>
<namespace>root\virtualization</namespace>
<path>\\PW-PUN-RDS-DV01\root\virtualization:Msvm_ComputerSystem.CreationClassName="Msvm_ComputerSystem",Name="C7E3C0D2-2925-4796-8513-E4A2FFB13168"</path>
<assigned-numa-node-list>{0}</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>Running</state>
<health-state>5</health-state>
<identifying-descriptions></identifying-descriptions>
<install-date>20120309105133.000000-000</install-date>
<name>C7E3C0D2-2925-4796-8513-E4A2FFB13168</name>
<name-format></name-format>
<on-time-in-milliseconds>1799197</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>5660</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>20120320100342.536968-000</time-of-last-configuration-change>
<time-of-last-state-change>20120320100342.000000-000</time-of-last-state-change>
</item>
</items>
</SetVirtualMachineStateResponse>
</responses>
</ms-hyperv-response>