05-01-2015 02:04 PM
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.
Solved! Go to Solution.
05-05-2015 09:37 AM
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.
05-05-2015 09:37 AM
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.
05-06-2015 04:25 PM
We are using UCS Central assigned IPs and are unable to pull them with the Power Tools.
05-11-2015 01:34 PM
Any luck getting this to work from Central rather than UCSM?
-Doug
10-22-2015 08:55 AM
01-05-2017 02:18 AM
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
01-11-2017 11:57 AM
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 : {}
01-18-2017 06:11 AM
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"
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide