ESXi management and powershell install script by Alan Renouf

ESXi management and powershell install script by Alan Renouf

Unlike the traditional ESX software, the ESXi software does not have a service console. It helps reduce the installation footprint of the software and can allow the hypervisor to be directly installed on the system’s internal flash storage or a USB key.

At the moment I am investigating moving to ESXi from ESX. After resolving the DSET issue, I was then faced with the management of the ESXi hosts, currently the full fat ESX hosts have the Dell open management agent installed on them and SNMP configured. This allows the Dell management server to keep track of the underlying hardware and report any hardware issues or firmware updates.

But what happens with ESXi 4.0 and the removal of the service console? Earlier with ESXi 3.5, OpenManage components were integrated with the downloadable Dell ESX3i ISO image but from ESXi 4.0 onwards, VMware introduced a new concept called vSphere Installation Bundle (VIB). This allows the end users to download VIB files and install it directly into ESXi 4.0. Dell is now posting their OpenManage component as a VIB on

To help reduce the system footprint and to simplify deployment, the ESXi software does not have a traditional service console management interface where Dell OpenManage agents are installed. Instead, to provide the required hardware manageability, VMware has incorporated the standard Common Information Model (CIM) management profiles into the ESXi software.

The CIM framework is an open standard framework that defines how managed hardware elements in a system are represented.The CIM framework consists of CIM providers developed by hardware vendors to enable monitoring and managing of the hardware device. By representing the hardware elements using standard CIM, ESXi provides any management tool (that implements the same open standards) the ability to manage the system.

The installation manual takes you through the install of this VIB using the RCLI and the vihostupdate command, but if you are like me and wish to automate these tasks you could use the following PowerCLI script to install the VIB. This script not only installs the VIB, but will also setup SNMP and the Advanced Configuration setting which tells ESXi to use the installed Dell components to report on the hardware via CIM.

# Set the following variables
$ESXHost = "testesx4i"
$SNMPCommunity = "public"
$SNMPTargetHost = ""
$FolderName = "oem-dell-openmanage-esxi_6.2.0-A00"
$DellOMSA = "c:\temp\$FolderName"

Connect-VIServer $ESXHost
Write "Retriving $ESXHost object"
$VMHostObj = Get-VMHost $ESXHost
Write "Checking for OMSA install files"

if (-Not (Test-Path "$DellOMSA\")){
Write "$DellOMSA does not exist, please make sure this is the OMSA zip file extracted contents."
} Else {
Write "Install files found"
Write "Copying OMSA client to the host datastore"
$ds = $VMHostObj | Get-Datastore | Select -first 1
Copy-DatastoreItem $DellOMSA $ds.DatastoreBrowserPath -Recurse

Write "Installing Dell OMSA"
$DSName = $ds.Name
$InstalledOMSA = $VMHostObj | Install-VMHostPatch -HostPath /vmfs/volumes/$DSName/$FolderName/

Write "Enabling CIM OEM Providers"
Set-VMHostAdvancedConfiguration -Name UserVars.CIMOEMProvidersEnabled -Value 1 | Out-Null

Write "Removing Install files"
$urlPath = "https://" + $esxhost + "/folder/" + $FolderName + "?dcPath=ha-datacenter&dsName=" + $dsName
$fileMgr = Get-View (Get-View ServiceInstance).Content.FileManager

If ($InstalledOMSA.NeedsRestart -eq $true){
$Reboot = Read-Host "A reboot is needed type YES to reboot now or press enter to complete the install:"
If ($Reboot -eq "YES"){
Write "Putting host into maintenance Mode"
Set-VMHost $VMHostObj -State Maintenance -Confirm:$false | Out-Null
Write "Rebooting host now"
Restart-VMHost $VMHostObj -Confirm:$false | Out-Null
} Else {
Write "A reboot is needed before the DELL OMSA will work correctly"

If ((Get-VMHostSnmp).ReadOnlyCommunities -ne $SNMPCommunity){
Write "Setting SNMP Configuration"
$VMHostObj | Get-VMHostsnmp | Set-VMHostSnmp -TargetHost $SNMPTargetHost -TargetCommunity $SNMPCommunity -AddTarget -ReadOnlyCommunity $SNMPCommunity -Enabled:$true

Write "OMSA Install Completed"

To use the above script:
  • Install PowerShell v2 and PowerCLI 4.0u1 at least.
  • Download the latest version of the VIB (currently 6.2.0 here).
  • Extract the downloaded zip to a folder with the same name.
  • Adjust the Foldername and DELLOMSA variables to reflect the path and folder name.
  • Alter the ESXHost variable with the hostname or IP address of the server you will be installing to.
  • Alter the SNMPCommunity variable to your settings.
  • Alter the SNMPTargetHost variable to your setting (ITA server).
  • Run the script from a PowerCLI prompt.
The hardware management data is provided to management applications using CIM Extensible Markup Language (XML) as well as WS-Management (WSMAN).
The VMware Infrastructure (VI) client provides hardware health status of various hardware devices. The VI client uses CIM XML to read hardware information provided by the CIM providers. Each of the monitored hardware devices are listed along with the health status.

Once this has been installed, you will still not be able to access the normal OMSA Web site which is accessed via https://<hostname>:1311/ if you do want to access this you will need to install the ‘Dell OpenManage Server Administrator Managed Node’ onto a Windows or Linux box which acts as a proxy and relays the information back to the webpage as below:

Figure 1: Dell OpenManage Server Administrator Managed Node’

Dell OpenManage Server Administrator Managed Node
Figure 1: Dell OpenManage Server Administrator Managed Node

You will also be able to discover the host in your Dell OpenManage IT Assistant (ITA) using SNMP, but it will not have the full functionality which was offered in the full fat version of ESX with OMSA installed. You can add limited network discovery and health monitoring by using the DRAC card and allowing ITA to find this, the below diagram gives an overview of ESXi management for Dell systems:

Figure 2: ESXi management for Dell systems

ESXi management for Dell systems
Figure 2: ESXi management for Dell systems

So the conclusion is just to keep in mind that the management interfaces which you may use at the moment for Dell servers to report on hardware and health performances may have changed and this will require your internal processes and monitoring to be adapted when adopting ESXi.

For further information on Dell system management for ESXi, please see this document.

For more PowerCLI and PowerShell scripts for your VMware environment, visit my blog at the following address:

Article ID: SLN311244

Last Date Modified: 08/14/2018 04:29 AM

Rate this article

Easy to understand
Was this article helpful?
Yes No
Send us feedback
Comments cannot contain these special characters: <>()\
Sorry, our feedback system is currently down. Please try again later.

Thank you for your feedback.