Link to home
Start Free TrialLog in
Avatar of James White
James White

asked on

Element is not declared in XML file

I'm trying to create a SCOM Management Pack for my HPE Aruba Switches. However, when using the tool that Microsoft gives you for creating Management packs, I can't import the management pack due to the following error:

This management pack cannot be imported.

: XSD verification failed for the management pack. [Line: 1, Position: 2]
The 'Root' element is not declared.

This is my XML below. What am I doing wrong?

<Root>
  <Manifest>
    <Id>HPEArubaSwitches</Id>
    <Name>HPE Aruba Switches</Name>
    <Version>1.0</Version>
  </Manifest>
  <Device Name="HPE Aruba 2530 48G Switch">
    <DeviceDiscovery>
      <SysObjId>.1.3.6.1.4.1.11.2.3.7.11.139</SysObjId>
      <Type>Switch</Type>
      <Vendor>HPE Aruba</Vendor>
      <Model>2530-48G</Model>
    </DeviceDiscovery>
    <Monitoring>
      <Oids />
      <Rules />
      <Monitors />
    </Monitoring>
    <Components />
  </Device>
  <Device Name="HPE Aruba 2530 48 PoE Switch">
    <DeviceDiscovery>
      <SysObjId>.1.3.6.1.4.1.11.2.3.7.11.136.1</SysObjId>
      <Type>Switch</Type>
      <Vendor>HPE Aruba</Vendor>
      <Model>2530-48 PoE</Model>
    </DeviceDiscovery>
    <Monitoring>
      <Oids />
      <Rules />
      <Monitors />
    </Monitoring>
    <Components />
  </Device>
  <Device Name="HPE Aruba 2530 24G Switch">
    <DeviceDiscovery>
      <SysObjId>.1.3.6.1.4.1.11.2.3.7.11.140.1</SysObjId>
      <Type>Switch</Type>
      <Vendor>HPE Aruba</Vendor>
      <Model>2530-24G</Model>
    </DeviceDiscovery>
    <Monitoring>
      <Oids />
      <Rules />
      <Monitors />
    </Monitoring>
    <Components />
  </Device>
  <Device Name="HPE Aruba 2530 24 PoE Switch">
    <DeviceDiscovery>
      <SysObjId>.1.3.6.1.4.1.11.2.3.7.11.143.1</SysObjId>
      <Type>Switch</Type>
      <Vendor>HPE Aruba</Vendor>
      <Model>2530-24G</Model>
    </DeviceDiscovery>
    <Monitoring>
      <Oids />
      <Rules />
      <Monitors />
    </Monitoring>
    <Components />
  </Device>
</Root>
Avatar of Alfredo Luis Torres Serrano
Alfredo Luis Torres Serrano
Flag of United States of America image

Please try this one and let me know

<?xml version="1.0" encoding="utf-8"?>
<ManagementPack ContentReadable="true" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <Manifest>
    <Id>HPEArubaSwitches</Id>
    <Name>HPE Aruba Switches</Name>
    <Version>1.0</Version>
  </Manifest>
  <Device Name="HPE Aruba 2530 48G Switch">
    <DeviceDiscovery>
      <SysObjId>.1.3.6.1.4.1.11.2.3.7.11.139</SysObjId>
      <Type>Switch</Type>
      <Vendor>HPE Aruba</Vendor>
      <Model>2530-48G</Model>
    </DeviceDiscovery>
    <Monitoring>
      <Oids />
      <Rules />
      <Monitors />
    </Monitoring>
    <Components />
  </Device>
  <Device Name="HPE Aruba 2530 48 PoE Switch">
    <DeviceDiscovery>
      <SysObjId>.1.3.6.1.4.1.11.2.3.7.11.136.1</SysObjId>
      <Type>Switch</Type>
      <Vendor>HPE Aruba</Vendor>
      <Model>2530-48 PoE</Model>
    </DeviceDiscovery>
    <Monitoring>
      <Oids />
      <Rules />
      <Monitors />
    </Monitoring>
    <Components />
  </Device>
  <Device Name="HPE Aruba 2530 24G Switch">
    <DeviceDiscovery>
      <SysObjId>.1.3.6.1.4.1.11.2.3.7.11.140.1</SysObjId>
      <Type>Switch</Type>
      <Vendor>HPE Aruba</Vendor>
      <Model>2530-24G</Model>
    </DeviceDiscovery>
    <Monitoring>
      <Oids />
      <Rules />
      <Monitors />
    </Monitoring>
    <Components />
  </Device>
  <Device Name="HPE Aruba 2530 24 PoE Switch">
    <DeviceDiscovery>
      <SysObjId>.1.3.6.1.4.1.11.2.3.7.11.143.1</SysObjId>
      <Type>Switch</Type>
      <Vendor>HPE Aruba</Vendor>
      <Model>2530-24G</Model>
    </DeviceDiscovery>
    <Monitoring>
      <Oids />
      <Rules />
      <Monitors />
    </Monitoring>
    <Components />
  </Device>
</ManagementPack>
Avatar of James White
James White

ASKER

Thanks for trying to help. Unfortunately, I received a new error:

: XSD verification failed for the management pack. [Line: 4, Position: 6]
The element 'Manifest' has invalid child element 'Id'. List of possible elements expected: 'Identity'.
<?xml version="1.0" encoding="utf-8"?>
<ManagementPack ContentReadable="true" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <Manifest>
    <Identity>HPEArubaSwitches</Id>
    <Name>HPE Aruba Switches</Name>
    <Version>1.0</Version>
  </Manifest>
  <Device Name="HPE Aruba 2530 48G Switch">
    <DeviceDiscovery>
      <SysObjId>.1.3.6.1.4.1.11.2.3.7.11.139</SysObjId>
      <Type>Switch</Type>
      <Vendor>HPE Aruba</Vendor>
      <Model>2530-48G</Model>
    </DeviceDiscovery>
    <Monitoring>
      <Oids />
      <Rules />
      <Monitors />
    </Monitoring>
    <Components />
  </Device>
  <Device Name="HPE Aruba 2530 48 PoE Switch">
    <DeviceDiscovery>
      <SysObjId>.1.3.6.1.4.1.11.2.3.7.11.136.1</SysObjId>
      <Type>Switch</Type>
      <Vendor>HPE Aruba</Vendor>
      <Model>2530-48 PoE</Model>
    </DeviceDiscovery>
    <Monitoring>
      <Oids />
      <Rules />
      <Monitors />
    </Monitoring>
    <Components />
  </Device>
  <Device Name="HPE Aruba 2530 24G Switch">
    <DeviceDiscovery>
      <SysObjId>.1.3.6.1.4.1.11.2.3.7.11.140.1</SysObjId>
      <Type>Switch</Type>
      <Vendor>HPE Aruba</Vendor>
      <Model>2530-24G</Model>
    </DeviceDiscovery>
    <Monitoring>
      <Oids />
      <Rules />
      <Monitors />
    </Monitoring>
    <Components />
  </Device>
  <Device Name="HPE Aruba 2530 24 PoE Switch">
    <DeviceDiscovery>
      <SysObjId>.1.3.6.1.4.1.11.2.3.7.11.143.1</SysObjId>
      <Type>Switch</Type>
      <Vendor>HPE Aruba</Vendor>
      <Model>2530-24G</Model>
    </DeviceDiscovery>
    <Monitoring>
      <Oids />
      <Rules />
      <Monitors />
    </Monitoring>
    <Components />
  </Device>
</ManagementPack>
Wow. Thank you for the rapid response! It looks like we're close:

This management pack cannot be imported.

: XSD verification failed for the management pack. [Line: 4, Position: 33]
The 'Identity' start tag on line 4 position 6 does not match the end tag of 'Id'. Line 4, position 33.
<?xml version="1.0" encoding="utf-8"?>
<ManagementPack ContentReadable="true" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <Manifest>
    <Identity>HPEArubaSwitches</Identity>
    <Name>HPE Aruba Switches</Name>
    <Version>1.0</Version>
  </Manifest>
  <Device Name="HPE Aruba 2530 48G Switch">
    <DeviceDiscovery>
      <SysObjId>.1.3.6.1.4.1.11.2.3.7.11.139</SysObjId>
      <Type>Switch</Type>
      <Vendor>HPE Aruba</Vendor>
      <Model>2530-48G</Model>
    </DeviceDiscovery>
    <Monitoring>
      <Oids />
      <Rules />
      <Monitors />
    </Monitoring>
    <Components />
  </Device>
  <Device Name="HPE Aruba 2530 48 PoE Switch">
    <DeviceDiscovery>
      <SysObjId>.1.3.6.1.4.1.11.2.3.7.11.136.1</SysObjId>
      <Type>Switch</Type>
      <Vendor>HPE Aruba</Vendor>
      <Model>2530-48 PoE</Model>
    </DeviceDiscovery>
    <Monitoring>
      <Oids />
      <Rules />
      <Monitors />
    </Monitoring>
    <Components />
  </Device>
  <Device Name="HPE Aruba 2530 24G Switch">
    <DeviceDiscovery>
      <SysObjId>.1.3.6.1.4.1.11.2.3.7.11.140.1</SysObjId>
      <Type>Switch</Type>
      <Vendor>HPE Aruba</Vendor>
      <Model>2530-24G</Model>
    </DeviceDiscovery>
    <Monitoring>
      <Oids />
      <Rules />
      <Monitors />
    </Monitoring>
    <Components />
  </Device>
  <Device Name="HPE Aruba 2530 24 PoE Switch">
    <DeviceDiscovery>
      <SysObjId>.1.3.6.1.4.1.11.2.3.7.11.143.1</SysObjId>
      <Type>Switch</Type>
      <Vendor>HPE Aruba</Vendor>
      <Model>2530-24G</Model>
    </DeviceDiscovery>
    <Monitoring>
      <Oids />
      <Rules />
      <Monitors />
    </Monitoring>
    <Components />
  </Device>
</ManagementPack>
: XSD verification failed for the management pack. [Line: 4, Position: 15]
The element 'Identity' cannot contain text. List of possible elements expected: 'ID'.

Thanks again! You're a total rockstar.
do you have the exact xml schema for your switch???
I'm not sure what you mean by XML scheme. I'm using the SNMP_MPGenerator tool created by Microsoft. I uploaded the Switch MIBs to the tool. I then added the Switches to the tool via those MIBs then I saved the project which generated the xml file.
The xml you posted has an structure I am not sure but I think the application from microsoft require a determined structure and the structure posted is not the correct one.

 I just posted the correct header structure for an xml file that is:

 <?xml version="1.0" encoding="utf-8"?>
<ManagementPack ContentReadable="true" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<Root>
<Property>HPEArubaSwitches</Property>
<node>

I am not sure about the xml structure need it but basically your xml is the problem.
</nore>
</Root>
Try this one:



<?xml version="1.0" encoding="utf-8"?>
<ManagementPack ContentReadable="true" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <Manifest>
    <Name>HPE Aruba Switches</Name>
    <Version>1.0</Version>
  </Manifest>
  <Device Name="HPE Aruba 2530 48G Switch">
    <DeviceDiscovery>
      <SysObjId>.1.3.6.1.4.1.11.2.3.7.11.139</SysObjId>
      <Type>Switch</Type>
      <Vendor>HPE Aruba</Vendor>
      <Model>2530-48G</Model>
    </DeviceDiscovery>
    <Monitoring>
      <Oids />
      <Rules />
      <Monitors />
    </Monitoring>
    <Components />
  </Device>
  <Device Name="HPE Aruba 2530 48 PoE Switch">
    <DeviceDiscovery>
      <SysObjId>.1.3.6.1.4.1.11.2.3.7.11.136.1</SysObjId>
      <Type>Switch</Type>
      <Vendor>HPE Aruba</Vendor>
      <Model>2530-48 PoE</Model>
    </DeviceDiscovery>
    <Monitoring>
      <Oids />
      <Rules />
      <Monitors />
    </Monitoring>
    <Components />
  </Device>
  <Device Name="HPE Aruba 2530 24G Switch">
    <DeviceDiscovery>
      <SysObjId>.1.3.6.1.4.1.11.2.3.7.11.140.1</SysObjId>
      <Type>Switch</Type>
      <Vendor>HPE Aruba</Vendor>
      <Model>2530-24G</Model>
    </DeviceDiscovery>
    <Monitoring>
      <Oids />
      <Rules />
      <Monitors />
    </Monitoring>
    <Components />
  </Device>
  <Device Name="HPE Aruba 2530 24 PoE Switch">
    <DeviceDiscovery>
      <SysObjId>.1.3.6.1.4.1.11.2.3.7.11.143.1</SysObjId>
      <Type>Switch</Type>
      <Vendor>HPE Aruba</Vendor>
      <Model>2530-24G</Model>
    </DeviceDiscovery>
    <Monitoring>
      <Oids />
      <Rules />
      <Monitors />
    </Monitoring>
    <Components />
  </Device>
</ManagementPack>
After trying your latest, I get this:

: XSD verification failed for the management pack. [Line: 4, Position: 6]
The element 'Manifest' has invalid child element 'Name'. List of possible elements expected: 'Identity'.
Can you Log on to the computer with an account that is a member of the Operations Manager Administrators role?
Yeah, the error code is what I get when I try to import this XML as management pack in the SCOM instance so I'm already on the server
Try with this one and tell me the result.

<Root>
  <Manifest>
    <Iddentity>HPEArubaSwitches</Identity>
    <Name>HPE Aruba Switches</Name>
    <References/>
  </Manifest>
  <Device Name="HPE Aruba 2530 48G Switch">
    <DeviceDiscovery>
      <SysObjId>.1.3.6.1.4.1.11.2.3.7.11.139</SysObjId>
      <Type>Switch</Type>
      <Vendor>HPE Aruba</Vendor>
      <Model>2530-48G</Model>
    </DeviceDiscovery>
    <Monitoring>
      <Oids />
      <Rules />
      <Monitors />
    </Monitoring>
    <Components />
  </Device>
  <Device Name="HPE Aruba 2530 48 PoE Switch">
    <DeviceDiscovery>
      <SysObjId>.1.3.6.1.4.1.11.2.3.7.11.136.1</SysObjId>
      <Type>Switch</Type>
      <Vendor>HPE Aruba</Vendor>
      <Model>2530-48 PoE</Model>
    </DeviceDiscovery>
    <Monitoring>
      <Oids />
      <Rules />
      <Monitors />
    </Monitoring>
    <Components />
  </Device>
  <Device Name="HPE Aruba 2530 24G Switch">
    <DeviceDiscovery>
      <SysObjId>.1.3.6.1.4.1.11.2.3.7.11.140.1</SysObjId>
      <Type>Switch</Type>
      <Vendor>HPE Aruba</Vendor>
      <Model>2530-24G</Model>
    </DeviceDiscovery>
    <Monitoring>
      <Oids />
      <Rules />
      <Monitors />
    </Monitoring>
    <Components />
  </Device>
  <Device Name="HPE Aruba 2530 24 PoE Switch">
    <DeviceDiscovery>
      <SysObjId>.1.3.6.1.4.1.11.2.3.7.11.143.1</SysObjId>
      <Type>Switch</Type>
      <Vendor>HPE Aruba</Vendor>
      <Model>2530-24G</Model>
    </DeviceDiscovery>
    <Monitoring>
      <Oids />
      <Rules />
      <Monitors />
    </Monitoring>
    <Components />
  </Device>
</Root>
: XSD verification failed for the management pack. [Line: 3, Position: 34]
The 'Iddentity' start tag on line 3 position 6 does not match the end tag of 'Identity'. Line 3, position 34.
<Root>
  <Manifest>
    <Identity>HPEArubaSwitches</Identity>
    <Name>HPE Aruba Switches</Name>
    <References/>
  </Manifest>
  <Device Name="HPE Aruba 2530 48G Switch">
    <DeviceDiscovery>
      <SysObjId>.1.3.6.1.4.1.11.2.3.7.11.139</SysObjId>
      <Type>Switch</Type>
      <Vendor>HPE Aruba</Vendor>
      <Model>2530-48G</Model>
    </DeviceDiscovery>
    <Monitoring>
      <Oids />
      <Rules />
      <Monitors />
    </Monitoring>
    <Components />
  </Device>
  <Device Name="HPE Aruba 2530 48 PoE Switch">
    <DeviceDiscovery>
      <SysObjId>.1.3.6.1.4.1.11.2.3.7.11.136.1</SysObjId>
      <Type>Switch</Type>
      <Vendor>HPE Aruba</Vendor>
      <Model>2530-48 PoE</Model>
    </DeviceDiscovery>
    <Monitoring>
      <Oids />
      <Rules />
      <Monitors />
    </Monitoring>
    <Components />
  </Device>
  <Device Name="HPE Aruba 2530 24G Switch">
    <DeviceDiscovery>
      <SysObjId>.1.3.6.1.4.1.11.2.3.7.11.140.1</SysObjId>
      <Type>Switch</Type>
      <Vendor>HPE Aruba</Vendor>
      <Model>2530-24G</Model>
    </DeviceDiscovery>
    <Monitoring>
      <Oids />
      <Rules />
      <Monitors />
    </Monitoring>
    <Components />
  </Device>
  <Device Name="HPE Aruba 2530 24 PoE Switch">
    <DeviceDiscovery>
      <SysObjId>.1.3.6.1.4.1.11.2.3.7.11.143.1</SysObjId>
      <Type>Switch</Type>
      <Vendor>HPE Aruba</Vendor>
      <Model>2530-24G</Model>
    </DeviceDiscovery>
    <Monitoring>
      <Oids />
      <Rules />
      <Monitors />
    </Monitoring>
    <Components />
  </Device>
</Root>
It looks like we're back to the original error

: XSD verification failed for the management pack. [Line: 1, Position: 2]
The 'Root' element is not declared.
How you are creating this xml file?? do you have any model or sample from a good working one?
Ok, so the tool created the XML file originally. I uploaded the tool-created XML file to SCOM and the original error is what we have been getting. Since then, I've just been editing the XML with your changes and re-uploading it.
Can you provide me with the tool name? it is a public tool or it is just for you??
It's a Microsoft-created tool called SNMP_MPGenerator
The MIB's that you are using are from the switches vendor or from other sources?
Yeah, I pulled the MIBs directly from the HPE Aruba support site
Hey there, is there any more information I can give you to help me with?
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.