Configure Huawei Ultrapath with PowerCli

Configure Huawei Ultrapath with PowerCli

The last days we got two new All-Flash Storage Systems. These systems can present LUNs in a Metro-Cluster fashion.

So I got the challenge to configure the Storage Plugin UltraPath from Huawei. In the manual from Huawei is explained how to configure the settings with esxcli on the ESXi-Host.

That’s fine, but not enough 😉 We want to configure this with PowerCli to easily manage more than one Host.

 

#get esxcli
$esxcli2 = Get-ESXCLI -VMHost (Get-VMhost MyHost-001) -V2

#show known diskarrays 
#the corresponding esxcli command is = "esxcli upadm show diskarray"
$esxcli2.upadm.show.diskarray.Invoke()

#show ulrapath configuration 
#the corresponding esxcli command is = "esxcli upadm show upconfig" 
$esxcli2.upadm.show.upconfig.Invoke()


#create arguments 
#set working mode to priority 
#and 
#set primary array to 0 or 1 
#the corresponding esxcli command is = "esxcli upadm set hypermetro workingmode -m priority -p 0" 
$arguments = $esxcli2.upadm.set.hypermetro.workingmode.CreateArgs() 
$arguments.mode = "priority" 
$arguments.primaryarrayid ="0" 
$esxcli2.upadm.set.hypermetro.workingmode.Invoke($arguments)

The outprints look like this:

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.