windowsvirtualizationhyper-vwsman

WSMan windows 'PUT' method do not update necessary values


all.

I'm trying to update some WMI class instance like Msvm_ComputerSystem, Msvm_ProcessorSettingData with the different WsMan utilities: one is written by our company, the next one is the openwsman for linux-based systems, and the last is winrm from the other windows 2012 computer. From all of it I could request put query with soap body like this one:

<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:addr="http://schemas.xmlsoap.org/ws/2004/08/addressing"
xmlns:wsman="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">
<env:Header>
    <addr:To env:mustUnderstand="true">http://192.168.111.174:5985/wsman</addr:To>
    <addr:ReplyTo>
        <addr:Address env:mustUnderstand="true">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</addr:Address>
    </addr:ReplyTo>
    <wsman:MaxEnvelopeSize env:mustUnderstand="true">131072</wsman:MaxEnvelopeSize>
    <addr:MessageID env:mustUnderstand="true">e32c7eab-a27b-46a8-9343-13dc447072fc</addr:MessageID>
    <wsman:ResourceURI env:mustUnderstand="true">http://schemas.microsoft.com/wbem/wsman/1/wmi/root/virtualization/v2/Msvm_ProcessorSettingData</wsman:ResourceURI>
    <addr:Action env:mustUnderstand="true">http://schemas.xmlsoap.org/ws/2004/09/transfer/Put</addr:Action>
    <wsman:OperationTimeout>PT60.000S</wsman:OperationTimeout>
    <wsman:SelectorSet>
        <wsman:Selector Name="InstanceID">Microsoft:D3662848-4C35-49EA-9680-010DF6A9E71B\b637f346-6a0e-4dec-af52-bd70cb80a21d\0</wsman:Selector>
    </wsman:SelectorSet>
</env:Header>
<env:Body>
    <p:Msvm_ProcessorSettingData
        xmlns:p="http://schemas.microsoft.com/wbem/wsman/1/wmi/root/virtualization/v2/Msvm_ProcessorSettingData">
        <p:VirtualQuantity>2</p:VirtualQuantity>
    </p:Msvm_ProcessorSettingData>
</env:Body>

And I'm getting the response with the old VirtualQuantity values without any error response:

<s:Envelope xml:lang="en-US" xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing"
xmlns:x="http://schemas.xmlsoap.org/ws/2004/09/transfer" xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"
xmlns:p="http://schemas.microsoft.com/wbem/wsman/1/wsman.xsd">
<s:Header>
    <a:Action>http://schemas.xmlsoap.org/ws/2004/09/transfer/PutResponse</a:Action>
    <a:MessageID>uuid:9DFBC1D3-5E96-4917-86D6-CBBB6003A2A7</a:MessageID>
    <a:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:To>
    <a:RelatesTo>27b78a50-b328-44a8-aa43-038f35fd3028</a:RelatesTo>
</s:Header>
<s:Body>
    <p:Msvm_ProcessorSettingData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:p="http://schemas.microsoft.com/wbem/wsman/1/wmi/root/virtualization/Msvm_ProcessorSettingData"
        xmlns:cim="http://schemas.dmtf.org/wbem/wscim/1/common" xsi:type="p:Msvm_ProcessorSettingData_Type">
        <p:Address xsi:nil="true" />
        <p:AllocationUnits>Processor Cores</p:AllocationUnits>
        <p:AutomaticAllocation>true</p:AutomaticAllocation>
        <p:AutomaticDeallocation>true</p:AutomaticDeallocation>
        <p:Caption>Processor</p:Caption>
        <p:ConsumerVisibility>3</p:ConsumerVisibility>
        <p:Description>Settings for Microsoft Virtual Processor.</p:Description>
        <p:DeviceID xsi:nil="true" />
        <p:DeviceIDFormat xsi:nil="true" />
        <p:ElementName>Processor</p:ElementName>
        <p:InstanceID>Microsoft:D3662848-4C35-49EA-9680-010DF6A9E71B\b637f346-6a0e-4dec-af52-bd70cb80a21d\0</p:InstanceID>
        <p:IsVirtualized>true</p:IsVirtualized>
        <p:Limit>100000</p:Limit>
        <p:LimitCPUID>false</p:LimitCPUID>
        <p:LimitProcessorFeatures>false</p:LimitProcessorFeatures>
        <p:MappingBehavior xsi:nil="true" />
        <p:OtherResourceType xsi:nil="true" />
        <p:Parent xsi:nil="true" />
        <p:PoolID>A4F3C4E4-5E15-4018-A713-96C2CFB4C9B8</p:PoolID>
        <p:ProcessorsPerSocket>6</p:ProcessorsPerSocket>
        <p:Reservation>0</p:Reservation>
        <p:ResourceSubType>Microsoft Processor</p:ResourceSubType>
        <p:ResourceType>3</p:ResourceType>
        <p:SocketCount>1</p:SocketCount>
        <p:ThreadsEnabled xsi:nil="true" />
        <p:VirtualQuantity>6</p:VirtualQuantity>
        <p:Weight>100</p:Weight>
    </p:Msvm_ProcessorSettingData>
</s:Body>

As I could said, I have tried another utilities like winrm. My winrm request were like this:

winrm s http://schemas.microsoft.com/wbem/wsman/1/wmi/root/virtualization/v2/Msvm_ComputerSystem?CreationClassName=Msvm_ComputerSystem+Name=<vmUUID> -r:http://<hostIP>/wsman -u:<username> -p:<password> @{ElementName="testName"}

But for this request I'm getting the response with previous values too. And the same situation with wsman on the Linux-based system. So, my question is what's wrong? Is it something in my request? Maybe 'PUT' functionality is not supported by the Windows WsManagement service?


Solution

  • You are trying to update read-only field Msvm_ProcessorSettingData.VirtualQuantity https://msdn.microsoft.com/en-us/library/hh850190%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396