Was doing a upgrade on my VNX5200 at work, and halfway through the RDP session got disconnected when I connected back the Unisphere client was hung, I knew from the screen that it has gone all the way to the end and was waiting for me to do a post-install commit of the code. but I couldn’t and had to kill the run-away java client. Now I didn’t know how to commit the code, tried restarting the upgrade process, it rightfully said there is nothing to upgrade and exited. Then searched for a few minutes before running into this article https://community.emc.com/thread/123829?start=0&tstart=0 on emc community.

Here is the answer updated to my setup:

1) Log into Unisphere Manager
2) Right-click on array icon (by default, it is the serial number of the array)
3) Choose “Properties”
4) Select the “Software” tab
5) Highlight the package “VNX-Block-Operating-Environment”
6) Click on the “Commit” button


There was some confusion on how to specify multiple dns server ip address or domain search names with the Set-VMHostNetwork cmdlet. Turns out is a simple comma separated list that get treated as a parameter array. Here is an example.

Connect-viserver vCenterServerFQDNorIP
$ESXiHosts = Get-VMHost
foreach ($esx in $ESXiHosts) {
Get-VMHostNetwork | Set-VmHostNetwork -DomainName eng.example.com -DnsAddress dnsAddress1,dnsAddress2

Or in one-line
Get-VMHost | Get-VMHostNetwork | Set-VmHostNetwork -DomainName eng.example.com -DnsAddress dnsAddress1,dnsAddress2

Here’s a quick how to add iSCSI send targets on all hosts in your VC

Connect-viserver vCenterServerFQDNorIP
$targets = "StorageTargetIP1", "StorageTargetIP2"
$ESXiHosts = Get-VMHost
foreach ($esx in $ESXiHosts) {
$hba = $esx | Get-VMHostHba -Type iScsi | Where {$_.Model -eq "iSCSI Software Adapter"}
foreach ($target in $targets) {
# Check to see if the SendTarget exist, if not add it
if (Get-IScsiHbaTarget -IScsiHba $hba -Type Send | Where {$_.Address -cmatch $target}) {
Write-Host "The target $target does exist on $esx" -ForegroundColor Green
else {
Write-Host "The target $target doesn't exist on $esx" -ForegroundColor Red
Write-Host "Creating $target on $esx ..." -ForegroundColor Yellow
New-IScsiHbaTarget -IScsiHba $hba -Address $target

Now present the LUNs from storage and rescan all HBA to see the new storage on the hosts.
Get-VMHost | Get-VMHostStorage -RescanAllHba -RescanVmfs

Get command line access with SSH or ESXi Console as user root.

Then run the following commands to enable SNMP and configure SNMP v2 community, SysLocation and SysContact.

esxcli system snmp set -r
esxcli system snmp set -c esxsnmpusr
esxcli system snmp set -p 161
esxcli system snmp set -L "California, USA"
esxcli system snmp set -C admin@example.com
esxcli system snmp set -e yes

Finally run ‘get’ to confirm the configuration

esxcli system snmp get

Communities: esxsnmpusr
Enable: true
Engineid: 00000000000000aaaaaa1000
Hwsrc: indications
Largestorage: true
Loglevel: info
Port: 161
Syscontact: admin@example.com
Syslocation: California, USA

That’s it, now open your favorite NMS software and start monitoring, at work I use Cisco Prime NAM, my choice at home is Observium

As you saw in the previous post, missing ntp configuration on one the vSphere hosts burnt me. I did not want to go through 30 some hosts manually, so decided to bulk update the ntp configuration on all my hosts. After a quick google search i found SnowVM blog post on this.

Here is the commands for my own quick reference.

Connect-VIServer vCenterServerFQDNorIP
Get-VMHost | Add-VMHostNtpServer NTPServerFQDNorIP
Get-VMHost | Get-VMHostFirewallException | where {$_.Name -eq "NTP client"} | Set-VMHostFirewallException -Enabled:$true
Get-VMHost | Get-VmHostService | Where-Object {$_.key -eq "ntpd"} | Start-VMHostService
Get-VMhost | Get-VmHostService | Where-Object {$_.key -eq "ntpd"} | Set-VMHostService -policy "automatic"