none
Correct format for xml files passed to winrm invoke RRS feed

  • Question

  • Hi,

    I am trying to use winrm invoke DestroyVirtualMachine to delete a vm on
    my Hyper-V 2008 server. The command I am executing is as follows:

    winrm invoke DestroyVirtualMachine http://schemas.microsoft.com/wbem/wsman/1/wmi/root/virtualization/Msvm_VirtualSystemManagementService
    -file:c:\test.xml -r:MyServer -a:Basic -u:Administrator -p:MyPassword

    where the file test.xml contains the following:

    <p:DestroyVirtualSystem_INPUT xmlns:p="http://schemas.microsoft.com/wbem/wsman/1/wmi/root/virtualization/Msvm_VirtualSystemManagementService">
    <q:ComputerSystem xmlns:q="http://schemas.microsoft.com/wbem/wsman/1/wmi/root/cimv2/CIM_ComputerSystem">
    \\BAISTE\root\virtualization:Msvm_ComputerSystem.CreationClassName="Msvm_ComputerSystem",Name="100EE1BD-A9A6-4794-8F6C-1B60CEA77D7E"
    </q:ComputerSystem>
    </p:DestroyVirtualSystem_INPUT>

    But I get an error:

    WSManFault
        Message
            ProviderFault
                WSManFault
                    Message = The XML namespace URI (http://schemas.microsoft.com/wbem/wsman/1/wmi/root/cimv2/CIM_ComputerSystem) is invalid. Check the documentation for constructing the namespace URI for a CIM class.

    Error number:  -2144108456 0x80338058
    The WS-Management service cannot identify the format of the object passed to a Put or Create method. The XML namespace for the input XML is invalid. Change the XML namespace for the input XML in the request.


    I have tried many different permutations of the xml, with and without
    namespace declarations, but cannot seem to get this to work. Would
    anyone have an idea on where I am going wrong?

    Thanks,
    Tom
    Wednesday, April 1, 2009 10:26 AM

All replies

  • Similar issue with vmms.ModifyVirtualSystem method... Can't find the format of the Msvm_VirtualSystemSettingData instance.
    Does anybody already succeed to make that work?
    Monday, January 25, 2010 12:10 PM