RSS

PS+REST: ESXi hosts’ NSX Channel Health check

As part of the daily checks for NSX, we need to ensure that the communication channel on all ESXi hosts are healthy.

The REST API for channel health is straight forward, just feed the list of host IDs into the API and query the hostConnStatus for the XML file. Read the rest of this entry »

Advertisements
 
Leave a comment

Posted by on February 15, 2018 in powershell, vmware

 

Tags: , ,

vSphere: Transparent page sharing revisited

Recently, some of the clusters were under memory pressure and we had to consider turning on TPS to elevate memory pressure. Now in an ideal setting, you never need to do that because upper management always makes intelligent decisions and ensures that new VM demands are always met with at least 80% capacity. Also TPS, no matter how effeciency, essentially takes up CPU cycles. Of course, back in the real world demand always excess the capacity you have. Read the rest of this entry »

 
Leave a comment

Posted by on February 5, 2018 in vmware

 

Tags: ,

PS:One liner to grab IP from DNS name

Needless to say, it’s not hard to grab IP address from a DNS name. There are at least 2 commands that come to mind:

[System.Net.Dns]::GetHostAddresses($hostname)
Test-Connection $hostname

But what if you want to grab the IP address of a list of host names AND ensure that the command doesn’t skip the output if the host name is unresolved? Read the rest of this entry »

 
Leave a comment

Posted by on January 23, 2018 in powershell

 

Tags: ,

vROPS: resetting admin password and quirks

Recently we found out that we had to reset the admin password due to it being locked and, I think, expired. VMware does have a KB on how to this can be done:

https://kb.vmware.com/s/article/2078313

However, what it fails to mention is that an additional step may be necessary

https://kb.vmware.com/s/article/2131633

Now, if you just reset the admin password, it will allow you to logon via SSH as admin to the appliance. However, if you try to logon as admin to the admin GUI interface, you may encounter incorrect user name/password error. This is corrected by performing the stops in the 2nd KB article.

 

 

 
Leave a comment

Posted by on December 15, 2017 in Operations, vmware

 

Tags: , , ,

vROPS: Configuring auto-mount NFS in appliance

Recently, we need to use a feature in vROPS 6.2+ to dump alerts into a folder.  One of the outbound settings in vROPS is “Log File Plugin”. When you configure it, you tell vROPS to create a text file for each alert in an output folder in the appliance. The recommendation from VMware is that this output folder should be an mounted volume pointing to an external source so that you don’t eat up all the disk space in the appliance. Read the rest of this entry »

 
Leave a comment

Posted by on December 15, 2017 in vmware

 

Tags: , , , ,

PowerCLI: Script to reboot each ESXi hosts

I realized that having done this for a few year, I never really nailed down a script to do this properly. It is very common as a vSphere admin to have to reboot your ESXi hosts after a configuration change or for patching.

Below is a first draft, not pretty code-wise but its a working operational script. I hope to improve on it over time. The basic flow of the script is as follows:

  • You establish a connection to the vCenter server first before running the script
  • You submit an input file which is list of ESXi host names
  • The script reads the list and does the following for each host
    • Sets the host in maintenance mode and counts down to 30 minutes. If the hosts does not get into maintenance mode by then the script terminates and you need to figure out why.
    • If the host goes into maintenance mode, it then force reboots the hosts and waits for 30 minutes again. Again if the host doesn’t come up by 30 minutes, the script terminates and you need to fix the host issue.
    • Lastly, once the host is back online, it sets the host to connected state and works on the next host in the loop.

Read the rest of this entry »

 
Leave a comment

Posted by on November 5, 2017 in powershell, vmware

 

Tags: , ,

NSX: A rookie lesson in packet tracing

Recently we encountered an interesting issue. A particular VM in the cloud be a unpingable sometimes. When the network guy tried to ping this VM from the cloud border routers, there would be no reply from one of the router. Yet on the other router there is no issue. So we had to figure out what happened to the ping packets in the cloud. Read the rest of this entry »

 
Leave a comment

Posted by on November 5, 2017 in Cloud, vmware

 

Tags: , , , , , , ,