<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Problems with iLO Unauthenticated XML query in Server Management - Remote Server Management</title>
    <link>https://community.hpe.com/t5/server-management-remote-server/problems-with-ilo-unauthenticated-xml-query/m-p/6218877#M7429</link>
    <description>&lt;P&gt;Thanks, Oscar.&amp;nbsp; So the documentation for iLO 2 and iLO 3 is incorrect I presume?&lt;/P&gt;</description>
    <pubDate>Thu, 26 Sep 2013 21:24:08 GMT</pubDate>
    <dc:creator>Hossy</dc:creator>
    <dc:date>2013-09-26T21:24:08Z</dc:date>
    <item>
      <title>Problems with iLO Unauthenticated XML query</title>
      <link>https://community.hpe.com/t5/server-management-remote-server/problems-with-ilo-unauthenticated-xml-query/m-p/6218759#M7427</link>
      <description>&lt;P&gt;I'm reading the HP iLO Scripting and Command Line Guides for iLO 2, 3, and 4 (the iLO's I have in my environment).&amp;nbsp; All three documents contain the same information for an &lt;EM&gt;Unauthenticated XML query&lt;/EM&gt;.&amp;nbsp; The reason I'm focusing on this information is because I'd like to script the retrieval of the MAC address for NIC 1 for Network (PXE) boot purposes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The three servers I'm testing with are:&lt;/P&gt;
&lt;P&gt;ProLiant DL385 G6, iLO 2 v2.12&lt;/P&gt;
&lt;P&gt;ProLiant DL385 G7, iLO 3 v1.50&lt;/P&gt;
&lt;P&gt;ProLiant DL360p Gen8, iLO 4 v1.20&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Using the /xmldata?item=all query, only the iLO 4 server is returning information on the NIC's.&amp;nbsp; The iLO 2 and iLO 3 servers are returning no information (similar to the short response in the documentation).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have verified that the CIM_SECURITY_MASK setting is 3 on all servers.&lt;/P&gt;
&lt;P&gt;All of these servers are running VMware ESXi 5.1 and HP SMH is &lt;STRONG&gt;not&lt;/STRONG&gt; installed.&lt;/P&gt;
&lt;P&gt;On all servers, I can log into the iLO web interface, click System Information, and see the MAC addresses of all NIC's.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What am I doing wrong?&amp;nbsp; What else can I check to get this information to return?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;HP iLO Scripting and Command Line Guides&lt;BR /&gt;&lt;BR /&gt;iLO 2: &lt;A href="https://h20566.www2.hp.com/portal/site/hpsc/template.BINARYPORTLET/public/kb/docDisplay/resource.process/?spf_p.tpst=kbDocDisplay_ws_BI&amp;amp;spf_p.rid_kbDocDisplay=docDisplayResURL&amp;amp;javax.portlet.begCacheTok=com.vignette.cachetoken&amp;amp;spf_p.rst_kbDocDisplay=wsrp-resourceState%3DdocId%253Demr_na-c03351064-2%257CdocLocale%253Den_US&amp;amp;javax.portlet.endCacheTok=com.vignette.cachetoken" target="_blank"&gt;https://h20566.www2.hp.com/portal/site/hpsc/template.BINARYPORTLET/public/kb/docDisplay/resource.process/?spf_p.tpst=kbDocDisplay_ws_BI&amp;amp;spf_p.rid_kbDocDisplay=docDisplayResURL&amp;amp;javax.portlet.begCacheTok=com.vignette.cachetoken&amp;amp;spf_p.rst_kbDocDisplay=wsrp-resourceState%3DdocId%253Demr_na-c03351064-2%257CdocLocale%253Den_US&amp;amp;javax.portlet.endCacheTok=com.vignette.cachetoken&lt;/A&gt;&lt;BR /&gt;iLO 3: &lt;A href="http://h20000.www2.hp.com/bc/docs/support/SupportManual/c02774508/c02774508.pdf" target="_blank"&gt;http://h20000.www2.hp.com/bc/docs/support/SupportManual/c02774508/c02774508.pdf&lt;/A&gt;&lt;BR /&gt;iLO 4: &lt;A href="http://h20000.www2.hp.com/bc/docs/support/SupportManual/c03334058/c03334058.pdf" target="_blank"&gt;http://h20000.www2.hp.com/bc/docs/support/SupportManual/c03334058/c03334058.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;P.S. This thread has been moved&amp;nbsp;from ProLiant Servers (ML,DL,SL) to ITRC Remote Lights-Out Mgmt (iLO 2, iLO, RILOE II) Forum. - Hp Forum Moderator&lt;/P&gt;</description>
      <pubDate>Sun, 29 Sep 2013 01:49:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/server-management-remote-server/problems-with-ilo-unauthenticated-xml-query/m-p/6218759#M7427</guid>
      <dc:creator>Hossy</dc:creator>
      <dc:date>2013-09-29T01:49:23Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with iLO Unauthenticated XML query</title>
      <link>https://community.hpe.com/t5/server-management-remote-server/problems-with-ilo-unauthenticated-xml-query/m-p/6218819#M7428</link>
      <description>&lt;P&gt;The&amp;nbsp;Unauthenticated XML reply has been enhanced only in iLO4. &amp;nbsp;For older G6 and G7 servers, you can use the Get_Host_Data.xml to obtain the server NIC MAC addresses (SMBIOS record type 209)&lt;/P&gt;</description>
      <pubDate>Thu, 26 Sep 2013 20:18:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/server-management-remote-server/problems-with-ilo-unauthenticated-xml-query/m-p/6218819#M7428</guid>
      <dc:creator>Oscar A. Perez</dc:creator>
      <dc:date>2013-09-26T20:18:03Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with iLO Unauthenticated XML query</title>
      <link>https://community.hpe.com/t5/server-management-remote-server/problems-with-ilo-unauthenticated-xml-query/m-p/6218877#M7429</link>
      <description>&lt;P&gt;Thanks, Oscar.&amp;nbsp; So the documentation for iLO 2 and iLO 3 is incorrect I presume?&lt;/P&gt;</description>
      <pubDate>Thu, 26 Sep 2013 21:24:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/server-management-remote-server/problems-with-ilo-unauthenticated-xml-query/m-p/6218877#M7429</guid>
      <dc:creator>Hossy</dc:creator>
      <dc:date>2013-09-26T21:24:08Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with iLO Unauthenticated XML query</title>
      <link>https://community.hpe.com/t5/server-management-remote-server/problems-with-ilo-unauthenticated-xml-query/m-p/6218905#M7430</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.hpe.com/t5/user/viewprofilepage/user-id/1451099"&gt;@Hossy&lt;/a&gt; wrote:&lt;BR /&gt;&lt;P&gt;Thanks, Oscar.&amp;nbsp; So the documentation for iLO 2 and iLO 3 is incorrect I presume?&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Just checked the iLO2 docs, and the answer is yes/no&amp;nbsp; It has two entries, one showing data returned for an iLO2 system, and one showing data returned for an iLO4 system.&amp;nbsp; I'd say it's a good bet that the&amp;nbsp;iLO4 info shouldn't really be there since it is an iLO2 document...&lt;/P&gt;</description>
      <pubDate>Thu, 26 Sep 2013 21:46:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/server-management-remote-server/problems-with-ilo-unauthenticated-xml-query/m-p/6218905#M7430</guid>
      <dc:creator>Jimmy Vance</dc:creator>
      <dc:date>2013-09-26T21:46:27Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with iLO Unauthenticated XML query</title>
      <link>https://community.hpe.com/t5/server-management-remote-server/problems-with-ilo-unauthenticated-xml-query/m-p/6219059#M7431</link>
      <description>&lt;P&gt;For inquiring minds, I figured I'd share my script.&amp;nbsp; Feel free to reuse.&amp;nbsp; All I ask is that you credit me (John Hossbach).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;param
(
	[string]$iLOAddress,
	[string]$userName,
	[string]$password,
	[switch]$tryBoth
)

function Get-iLOVersion
{
	param
	(
		[string]$iLOAddress
	)

	$xml = New-Object System.Xml.XmlDocument
	$xml.Load("http://$iLOAddress/xmldata?item=All")
	$xml.RIMP.MP.PN
}

function Get-NIC1MAC_HTTP
{
	param
	(
		[string]$iLOAddress
	)

	$xml = New-Object System.Xml.XmlDocument
	$xml.Load("http://$iLOAddress/xmldata?item=All")
	($xml.RIMP.HSI.NICS.NIC | ? {$_.PORT -eq '1'}).MACADDR
}

function Get-NIC1MAC_CPQLOCFG
{
	param
	(
		[string]$iLOAddress,
		[string]$userName,
		[string]$password
	)

	$cpqlocfg = 'C:\Program Files (x86)\HP Lights-Out Configuration Utility\cpqlocfg.exe'
	$gethostdataxml = 'C:\Program Files (x86)\HP Lights-Out Configuration Utility\samples\Get_Host_Data.xml'
	
	$command = "&amp;amp; `"$cpqlocfg`" -s $iLOAddress -u $userName -p `"$password`" -f `"$gethostdataxml`""
	$output = Invoke-Expression $command
	
	$xml = New-Object System.Xml.XmlDocument
	$xml2 = New-Object System.Xml.XmlDocument
	($output -join "`r`n" | Select-String '(?smi)&amp;lt;\?xml version="1.0"\?&amp;gt;\r?\n(\s*(?!&amp;lt;s&amp;gt;)(?!&amp;lt;\?xml version="1.0"\?&amp;gt;)&amp;lt;/?[^&amp;gt;]*&amp;gt;\r?\n)*' -AllMatches).Matches | ? { $_.Value -match 'GET_HOST_DATA' } | ForEach-Object {
		$xml2.LoadXml($_.Value)
		if ($xml2.RIBCL.GET_HOST_DATA -ne $null) { $xml = $xml2.Clone() }
	}
	$foundone = $false
	($xml.RIBCL.GET_HOST_DATA.SMBIOS_RECORD | Where-Object {$_.TYPE -eq 209}).FIELD | ForEach-Object {
		if ($_.NAME -eq 'MAC' -and $foundone)
		{
			$_.VALUE
		}
		if ($_.NAME -eq 'Port' -and $_.VALUE -eq '1')
		{
			$foundone = $true
		} else {
			$foundone = $false
		}
	}
	
}

function Get-NIC1MAC {
	param
	(
		[string]$iLOAddress,
		[string]$userName,
		[string]$password,
		[switch]$tryBoth
	)

	if ($tryBoth) {
		Write-Host -ForegroundColor Yellow $iLOAddress [$(Get-iLOVersion -iLOAddress $iLOAddress)]
		Write-Host -ForegroundColor Green 'Trying Get-NIC1MAC_HTTP (iLO 4 and up)...'
	}
	$time = Measure-Command {$output = Get-NIC1MAC_HTTP -iLOAddress $iLOAddress}
	$output
	if ($tryBoth) {
		Write-Host -ForegroundColor Green 'Get-NIC1MAC_HTTP completed in ' -NoNewLine
		Write-Host -ForegroundColor Yellow "$($time.TotalMilliseconds) ms"
		Write-Host -ForegroundColor Green 'Trying Get-NIC1MAC_CPQLOCFG (prior to iLO 4)...'
	}
	if ($tryBoth -or $output -eq $null) {
		$time = Measure-Command {$output = Get-NIC1MAC_CPQLOCFG -iLOAddress $iloAddress -userName $userName -password $password}
		$output
	}
	if ($tryBoth) {
		Write-Host -ForegroundColor Green 'Get-NIC1MAC_CPQLOCFG completed in ' -NoNewLine
		Write-Host -ForegroundColor Yellow "$($time.TotalMilliseconds) ms"
		''
	}
}

if ($iLOAddress -eq '') {
	Write-Host -ForegroundColor Yellow 'Syntax: ' -NoNewLine
	Get-Help Get-NIC1MAC
} else {
	Get-NIC1MAC -iLOAddress $iLOAddress -userName $userName -password $password -tryBoth:$tryBoth
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Sep 2013 02:34:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/server-management-remote-server/problems-with-ilo-unauthenticated-xml-query/m-p/6219059#M7431</guid>
      <dc:creator>Hossy</dc:creator>
      <dc:date>2013-09-27T02:34:00Z</dc:date>
    </item>
  </channel>
</rss>

