I'm trying to get a dump of service profile name to management IP. I cannot seem to get the outband IP of the SP from powershell. Any assistance would be appreciated.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Hey Doug -
If you have UCS Manager Assigned Ext-IP Pools (Hardware Assigned to the Blade CIMC), then you'll have to use UCS PowerTools Cmdlet..
C:\> Get-UcsMgmtIf -ChassisID X -SlotID Y
C:\> Get-UcsServiceProfile
In order to use UCS Central Power tools to perform the same, you would have to Globally Assign Mgmt IPs from UCS Central, which would be an GSP-Assigned IP Address.
C:\> Get-UcsCentralMgmtIf
C:\> Get-UcsCenralServiceProfile
I was unable to access the Hardware-Assigned IP's from UCS Central Power Tools using the Cmdlets above. I'll further investigate and update if I find-out differently.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
We are using UCS Central assigned IPs and are unable to pull them with the Power Tools.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Any luck getting this to work from Central rather than UCSM?
-Doug
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Hi Douglas,
We use global pools for MACs, WWPNs, etc but not for management address space (multi-site configuration). I wrote the attached script to general an HTML page with links to the direct KVM page for each blade. Hope this helps.
-Alex
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Hi all,
Somehow this code is not really good as is requires acces to UCS manager. This is slow, as all is in UCS Central already.
Try to search through the commands, but here is a way to do that :
$AllKvmIPs = @{}
Get-UcsCentralIpPoolAddr -Hierarchy | ? { $_.GetType().name -like "IdentpoolConsumed" } | % {
$AllKvmIPs.add((($_.AssignedToDn -replace "/mgmt.*") + "-" + $_.SysId),($_.dn -replace "^ip/|/cons-.*"))
}
This should do the trick.
To get the IP, you only have to do something like :
$KvmKey = $blade.LocalId + "-" + $domain.id
$IP = $AllKvmIPs.$KvmKey
the URL to access the KVM is "http://[UCS Domain Name]/ucsm/kvm.jnlp?kvmIpAddr=[IP]
Answer is instant.
Thomas
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can actually even just run Get-UcsCentralServiceProfile and pipe that into any of the following cmdlets:
Get-UcsCentralVnicIpV4MgmtPooledAddr
Get-UcsCentralVnicIpV4PooledAddr
Get-UcsCentralVnicIpV6MgmtPooledAddr
This will return the pooled IP address, and the result is much cleaner, as shown below:
Get-UcsCentralServiceProfile -Name G-SP-esxtest | Get-UcsCentralVnicIpV4PooledAddr
Addr : 10.1.45.23
DefGw : 10.1.45.1
Name : G-POOL-KVM-IP
OperName : org-root/org-ESXi/org-ESXi_TEST/ip-pool-G-POOL-KVM-IP
PrimDns : 0.0.0.0
SecDns : 0.0.0.0
Subnet : 255.255.255.0
UcsCentral : ausucscentral
Dn : org-root/org-ESXi/org-ESXi_TEST/ls-G-SP-esxtest/ipv4-pooled-addr
Rn : ipv4-pooled-addr
Status :
XtraProperty : {}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Both options would work great if the management pools are global pools. Unfortunately for us, we had to migrate our brownfield deployment into UCSC two years ago and the management pools were never moved. Further, since we span across 3 different physical locations, it would have been pretty painful to try and manage the differing pools inside UCSC to simply replicate what was already configured.
UCSC has come a long way (and PowerTools for that matter!) in making life easier to manage UCS domains. Alas, I suspect many deployments have yet to cutover into UCSC if the current setup "already just works"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Comments
0 comments
Please sign in to leave a comment.