Automating VxRail with VxRail API Powershell Modules

For this blog post I wanted to go through some sample use cases for leveraging the VxRail API’s via Powershell Modules.

This post is targeted towards users who are familiar with VxRail and are looking to automate some of those tasks that they are already performing today, via the UI.

VxRail includes APIs that can be used to automate many tasks from initial deployment, expanding the cluster, LCM as well as various health checks and much more.

These are the tasks we are going to look at today, which cover some of the Day 0 to Day X tasks.

1. Set-VxRailManagerNetworkAddr

2. Get-AutoDiscoveryHosts

3. Start-SystemBringup

4. Add-Host

5. Remove-ClusterHost

6. Start-LcmUpgrade

Set- VxRailManagerNetworkAddr

This module is used to change the initial IP Address of the VxRail Manager VM (VXRM).

By default, the VXRM has an IP Address of This works fine in some cases, but in many cases the customer network requires the VXRM have an actual address that can be reached on their network.

This API will connect to the iDRAC for the node hosting the VXRM and change the IP address, Subnet Mask, Gateway & VLAN (if required) in one simple step.


The command used is:

· Set-VxRailManagerNetworkAddr -Server -Username root -Password calvin -IP -Netmask -Gateway -VlanID 99

This will connect to the iDRAC @, using the credentials of ‘root’ and ‘calvin’ and then changes the VXRM VM network details.

Once initiated, the ‘Get-VxRailManagerNetworkStatus’ command can be used to check the status of the task. Once configuration is complete you can see the VM responding to a ‘ping’ and then be available on that new IP address for use in the following steps.


This module will return a list of hosts that the VXRM is able to discover on the network.

By using the IPV6 Multicast protocol, the ‘loudmouth’ service will discover any VxRail hosts (that are in a factory default state). It will also return the components in each host.


The command used is:

· Get-AutoDiscoveryHosts -Server

In the video, you see the GUI of the VXRM showing the hosts it has discovered and on the right you see the list that is returned after running the module.


This module will start the initial deployment of the VxRail cluster.

For this module we require a pre-built JSON configuration file. We then pass that file to the VxRail Manager and start the deployment.


The command used is:

· Start-SystemBringup -Server -Conf C:\Users\allan\Documents\JSON\GEO-Rack01_VxR-Cluster02_VxRail_Configuration.json

As seen in the video, you can add the ‘-Dryrun’ flag to the end of the command which will perform the validation step that you would have to run when deploying from the UI.

Once the build has been initiated we can use the ‘Get-BringupProgressStatus -Server’ command to watch the deployment status in real time.

Once complete, you can log into the vCenter server of your newly deployed VxRail Cluster.


This module enables you to add a new host to your VxRail Cluster.

This module requires that we already have a new (factory default) node racked, cabled and powered on. VxRail Manager will use the loudmouth service to discover the new node.


The command used is:

  • Add-Host -Server -Username administrator@vsphere.local -Password YourPassword -VxrailVersion 7.0.200 -VcAdminUsername administrator@vsphere.local -VcAdminPassword YourPassword -Hosts @(@{host_psnt=”DE300190624108″;hostname=”r1c2-node-4.vcf.vxrail.local”;accounts=@{root=@{username=”root”;password=”YourPassword“};management=@{username=”esxmgmt”;password=”YourPassword“}};network=@(@{type=”management”;ip=”″} ,@{type=”vsan”;ip=”″},@{type=”vmotion”;ip=”″});is_maintenance_mode=”true”;geo_location=@{rack_name=”rack1″;order_number=”39″};nic_mappings=@(@{vds_name=”VMware HCIA Distributed Switch”;name=”uplink1″;physical_nic=”vmnic0″};@{vds_name=”VMware HCIA Distributed Switch”;name=”uplink2″;physical_nic=”vmnic1″};@{vds_name=”VMware HCIA Distributed Switch”;name=”uplink3″;physical_nic=”vmnic2″};@{vds_name=”VMware HCIA Distributed Switch”;name=”uplink4″;physical_nic=”vmnic3″})})

Given the size of this command, let’s look at some of the flags:

  • host_psnt: This is the VxRail serial number of the new node to be added
  • VxrailVersion: Version of VxRail software on the new host
  • accounts: The credentials to be set on the new host
  • network: IP Addresses for the Management, vMotion and vSAN VMK’s
  • vds_name: Name of the VDS the host will connect to
  • uplinkx: Physical to virtual nic mapping

After running the command, we will get a ‘Request ID’ that we can then use with the ‘Get-Requests’ command to check on the status.


This module will remove a host from the cluster.

Before running this command, make sure the host you want to remove is in maintenance mode and all of the data has been evacuated.


The command used is:

· Remove-ClusterHost -Server -Username administrator@vsphere.local -Password YourPassword -vcAdminUserUsername administrator@vsphere.local -VcAdminUserPassword YourPassword -VcsaRootUserUsername root -VcsaRootUserPassword YourPassword -SerialNumber 8QTYHQ2

This will remove the host with the Service Tag# ‘8QTYHQ2’ from the cluster. The Service Tag# can be found by selecting the host to be removed and then navigating to ‘Monitor -> VxRail -> Physical View’


This module will perform an upgrade to the VxRail Cluster.

An important pre-requisite here is that you have already transferred the Upgrade Bundle to VxRail Manager. You can use a tool like WinSCP or similar. The should go to ‘/tmp’ directory or similar, but not the root directory.


The command used is:

Start-LcmUpgrade -Server -Username administrator@vsphere.local -Password YourPassword -BundleFilePath /tmp/ -VxmRootUsername root -VxmRootPassword YourPassword -VcAdminUsername administrator@vsphere.local -VcAdminPassword YourPassword -VcsaRootUsername root -VcsaRootPassword YourPassword

Once initiated, we again get a request ID that we can use with the ‘Get-Requests’ command to check on the status.

Aside from the modules shown here, there are many more that are provided for you to help automate your VxRail infrastructure.

Please visit this page to download the VxRail Powershell Module Package.

Share the Post:

Related Posts

%d bloggers like this: