Regarding the order of selectors

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Regarding the order of selectors

Lu Yu
Hello,

Recently I've run into some problem when using OpenWSMan with Hyper-V on 
Windows Server 2012(not R2).
The selectors highlighted in below example are causing my problem:
<?xml version="1.0"?>
  <s:Header>
    <wsa:To s:mustUnderstand="true">http://192.168.1.1:5985/wsman</wsa:To>
    <wsman:ResourceURI s:mustUnderstand="true">http://schemas.microsoft.com/wbem/wsman/1/wmi/root/virtualization/Msvm_VirtualSystemManagementService</wsman:ResourceURI>
    <wsa:MessageID s:mustUnderstand="true">uuid:954d3dab-1838-1838-8008-00f7525d1500</wsa:MessageID>
    <wsa:ReplyTo>
    </wsa:ReplyTo>
    <wsman:SelectorSet>
      <wsman:Selector Name="Name">vmms</wsman:Selector>
      <wsman:Selector Name="SystemName">THE-SERVER</wsman:Selector>
      <wsman:Selector Name="CreationClassName">Msvm_VirtualSystemManagementService</wsman:Selector>
      <wsman:Selector Name="SystemCreationClassName">Msvm_ComputerSystem</wsman:Selector>
    </wsman:SelectorSet>
  </s:Header>
  <s:Body>
    <n1:DefineVirtualSystem_INPUT> ... </n1:DefineVirtualSystem_INPUT>
  </s:Body>
</s:Envelope>

For some reason, it seems Windows can only find the vmms instance only if:
  1. the SystemName selector is present and
  2. the SystemName selector is the last one
I have verified the above using wbemtest command on target Hyper-V box.
Looks very much like a bug on MS side.

So when the selectors are not in the desired order, I'll get error like:
<s:Detail>
  <p:MSFT_WmiError xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:b="http://schemas.dmtf.org/wbem/wsman/1/cimbinding.xsd" xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/MSFT_WmiError" xmlns:cim="http://schemas.dmtf.org/wbem/wscim/1/common" b:IsCIM_Error="true" xsi:type="p:MSFT_WmiError_Type">
    <p:CIMStatusCode xsi:type="cim:cimUnsignedInt">6</p:CIMStatusCode>
    <p:CIMStatusCodeDescription xsi:type="cim:cimString" xsi:nil="true"/>
    <p:ErrorSource xsi:type="cim:cimString" xsi:nil="true"/>
    <p:ErrorSourceFormat xsi:type="cim:cimUnsignedShort">0</p:ErrorSourceFormat>
    <p:ErrorType xsi:type="cim:cimUnsignedShort">0</p:ErrorType>
    <p:Message xsi:type="cim:cimString">No instance found with given property values. </p:Message>
    <p:MessageID xsi:type="cim:cimString">HRESULT 0x8033801a</p:MessageID>
    <p:OtherErrorSourceFormat xsi:type="cim:cimString" xsi:nil="true"/>
    <p:OtherErrorType xsi:type="cim:cimString" xsi:nil="true"/>
    <p:OwningEntity xsi:type="cim:cimString" xsi:nil="true"/>
    <p:PerceivedSeverity xsi:type="cim:cimUnsignedShort">0</p:PerceivedSeverity>
    <p:ProbableCause xsi:type="cim:cimUnsignedShort">0</p:ProbableCause>
    <p:ProbableCauseDescription xsi:type="cim:cimString" xsi:nil="true"/>
    <p:error_Category xsi:type="cim:cimUnsignedInt">5</p:error_Category>
    <p:error_Code xsi:type="cim:cimUnsignedInt">2150858778</p:error_Code>
    <p:error_Type xsi:type="cim:cimString">HRESULT</p:error_Type>
    <p:error_WindowsErrorMessage xsi:type="cim:cimString">No instance found with given property values. </p:error_WindowsErrorMessage>
  </p:MSFT_WmiError>
</s:Detail>

Anyone else also had this problem and hopefully has worked it out?

Regards,
Yu

------------------------------------------------------------------------------

_______________________________________________
Openwsman-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openwsman-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Regarding the order of selectors

Klaus Kaempf
* Lu Yu <[hidden email]> [Jun 11. 2015 11:16]:
> Hello,
>
> Recently I've run into some problem when using OpenWSMan with Hyper-V on
> Windows Server 2012(not R2).
> The selectors highlighted in below example are causing my problem:
[...]
>
> For some reason, it seems Windows can only find the vmms instance only if:
>
>    1. the SystemName selector is present and
>    2. the SystemName selector is the last one
>
> I have verified the above using wbemtest command on target Hyper-V box.
> Looks very much like a bug on MS side.

Yes, this might well be a bug on MS side. A similar issue was reported
before for invoke() properties (https://github.com/Openwsman/openwsman/issues/49).

Please update Openwsman to version 2.5 (or later, latest is 2.6.0)
which has a rewritten property and selector handling to keep both in
order. This should fix your problem.


Klaus
--
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Dilip Upmanyu, Graham Norton, HRB 21284 (AG Nürnberg)
Maxfeldstraße 5, 90409 Nürnberg, Germany

------------------------------------------------------------------------------
_______________________________________________
Openwsman-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openwsman-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Regarding the order of selectors

Lu Yu
Thanks for the info Klaus!
Will definitely update my dependency and have a try : )

2015-06-11 17:32 GMT+08:00 Klaus Kaempf <[hidden email]>:

>
> Yes, this might well be a bug on MS side. A similar issue was reported
> before for invoke() properties (https://github.com/Openwsman/openwsman/issues/49).
>
> Please update Openwsman to version 2.5 (or later, latest is 2.6.0)
> which has a rewritten property and selector handling to keep both in
> order. This should fix your problem.
>
>
> Klaus
> --
> SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Dilip Upmanyu, Graham Norton, HRB 21284 (AG Nürnberg)
> Maxfeldstraße 5, 90409 Nürnberg, Germany

------------------------------------------------------------------------------
_______________________________________________
Openwsman-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openwsman-devel
Loading...