- Community Home
- >
- Servers and Operating Systems
- >
- HPE BladeSystem
- >
- BladeSystem - General
- >
- Query OA to get the current active VC module?
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2011 06:54 AM
12-05-2011 06:54 AM
Query OA to get the current active VC module?
Dung needed to know how to determine which Virtual Connect was active or primary module:
*******************
Does anyone know how to query the Onboard Administrator (OA) using the CLI command to get the active VC Flex-10 module?
I have a script to connect to a VC management console by using its IP address but sometimes, the IP address I provide points to a standby VC module
As such, I want to query OA first to get the active one.
******************
From Steven:
********************
show vcmode seems to work. I used that to query my VC and it showed this:
rack27-enc1-oa1> show vcmode
Virtual Connect Mode: Enabled
Virtual Connect URL: http://10.50.144.50/
Virtual Connect Domain Name: kamp_vc
I powered off the primary VC module and in a few minutes it changed to this:
rack27-enc1-oa1> show vcmode
Virtual Connect Mode: Enabled
Virtual Connect URL: http://10.50.144.51/
Virtual Connect Domain Name: kamp_vc
Should be able to use plink or something similar to yank that into PowerShell and parse out the IP. One thing to note is the IP change was not instant. It took a few minutes to update.
Hope this helps.
******************
And this reply from Dung:
****************
Function Run-Plink ([string]$cmd ="show -help" ,[string]$username=$OAAdminName ,
[string]$password=$OAPassword, [string]$Chassis =$OAIPAddress)
{
$PLink = "$SSHDIR\Plink.exe"
& $Plink -auto_store_key_in_cache -l $username -pw $password $Chassis $cmd
}
function Get-ActiveVCModule
{
$result = run-plink -username $OAAdminName -password $OAPassword -chassis $OAIPAddress -cmd "SHOW VCMODE"
$URL_Line = ($result | select-string -pattern "URL").Line
$IPAddress = $URL_Line.Split(":")[-1]
$IPAddress = $IPAddress -replace "//",""
$IPAddress = $IPAddress -replace "/",""
$IPAddress =$IPAddress.Trim()
$IPAddress
}
Works great!
*********************
Any other comments or suggestions?