WSMan windows';把';方法不更新必要的值
全部 我正在尝试用不同的WsMan实用程序更新一些WMI类实例,如Msvm_ComputerSystem、Msvm_Processor设置数据:一个是我们公司编写的,下一个是基于linux系统的openwsman,最后一个是来自另一台windows 2012计算机的winrm。通过所有这些,我可以使用soap主体请求put查询,如下所示:WSMan windows';把';方法不更新必要的值,windows,virtualization,hyper-v,wsman,Windows,Virtualization,Hyper V,Wsman,全部 我正在尝试用不同的WsMan实用程序更新一些WMI类实例,如Msvm_ComputerSystem、Msvm_Processor设置数据:一个是我们公司编写的,下一个是基于linux系统的openwsman,最后一个是来自另一台windows 2012计算机的winrm。通过所有这些,我可以使用soap主体请求put查询,如下所示: <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:addr
<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>
http://192.168.111.174:5985/wsman
http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous
131072
e32c7eab-a27b-46a8-9343-13dc447072fc
http://schemas.microsoft.com/wbem/wsman/1/wmi/root/virtualization/v2/Msvm_ProcessorSettingData
http://schemas.xmlsoap.org/ws/2004/09/transfer/Put
PT60.000S
微软:D3662848-4C35-49EA-9680-010DF6A9E71B\b637f346-6a0e-4dec-af52-bd70cb80a21d\0
2.
我得到的响应是旧的VirtualQuantity值,没有任何错误响应:
<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>
http://schemas.xmlsoap.org/ws/2004/09/transfer/PutResponse
uuid:9DFBC1D3-5E96-4917-86D6-CBBB6003A2A7
http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous
27b78a50-b328-44a8-aa43-038f35fd3028
处理器内核
真的
真的
处理器
3.
Microsoft虚拟处理器的设置。
处理器
微软:D3662848-4C35-49EA-9680-010DF6A9E71B\b637f346-6a0e-4dec-af52-bd70cb80a21d\0
真的
100000
假的
假的
A4F3C4E4-5E15-4018-A713-96C2CFB4C9B8
6.
0
微软处理器
3.
1.
6.
100
正如我所说的,我尝试了另一种实用程序,比如winrm。我的winrm请求如下所示:
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"}
winrmshttp://schemas.microsoft.com/wbem/wsman/1/wmi/root/virtualization/v2/Msvm_ComputerSystem?CreationClassName=Msvm_ComputerSystem+Name=-r:http:///wsman -u:-p:@{ElementName=“testName”}
但是对于这个请求,我也得到了带有先前值的响应。在基于Linux的系统上,wsman的情况也一样。
那么,我的问题是怎么了?这是我的要求吗?Windows WsManagement服务可能不支持“PUT”功能?您正在尝试更新只读字段Msvm\u processor settingdata.VirtualQuantity