Esxi Kickstart file in the network location skipped during Scripted installation with CDROM

If the ks.cfg file is skipped although it’s placed in a correct network location for the semi-automated installation (booted from CDROM), you may need to check these steps in case you missed them.

Continue reading “Esxi Kickstart file in the network location skipped during Scripted installation with CDROM”

Scan IP addresses through Esxi VMkernal Interfaces

Unlike the ESXi management interface, VMK interfaces used for vMotion can typically only be pinged within the same subnet, as they are not assigned a gateway IP address. Below is a shell script you can utilize directly on the ESXi host without the need for third-party IP ping tools.

Continue reading “Scan IP addresses through Esxi VMkernal Interfaces”

Check or Verify Esxi Credentials on Multiple Esxi Hosts

There are times that you will need to check if esxi credentials are correct & consistent across the multiple hosts, and this PowerCLI script will save your time a lot. It uses TCP port 443 so it takes a bit longer than using ssh, but the good thing is you do not need to open port 22 from your client. The process is quite simple Continue reading “Check or Verify Esxi Credentials on Multiple Esxi Hosts”

PowerCLI to set Evacuated Esxi Hosts into Maintenance Mode

It’s the little script that will set all esxi hosts into maintenance mode when no VMs are left running, particularly useful when you’re doing the bulk VMs migration or shutdown for Esxi maintenance. Continue reading “PowerCLI to set Evacuated Esxi Hosts into Maintenance Mode”

VMware Network Portgroup Connectivity Check with Circular VM vMotion

Now, it’s a blogging time. Here is the little script that you can use to check the network connectivity of each portgroup in your vmware environment, which can also be used to determine if the portgroups or physical uplink (backing the vswitch) has the desired vlan access for the multiple exsi hosts.

This script will output the the VM’s ICMP Ping status after making vMotion to each host within the current vmware cluster (where the VM resides) or any clusters. Continue reading “VMware Network Portgroup Connectivity Check with Circular VM vMotion”

PowerCLI Script to List VM Snapshots with Last VM Reboot Time

Again, It’s time to script, making life easier with the system admin’s boring tasks. Most of us have testing environment in which we have to play with snapshots (so called checkpoints in Hyper-V).
This script will list the VMs snapshots with the last VM power-on time. This is particularly useful in cases where you want to keep the snapshot until the VM is rebooted and proved to be fully functional after any configuration changes. Continue reading “PowerCLI Script to List VM Snapshots with Last VM Reboot Time”

How to use PowerCLI to list Device ID, Mounted URL of Datastores in VMware

Here is the PowerCLI one-liner command to find the Datastore Name, Mounted URL and Device ID in your vSphere Environment.
Assume you’ve installed VMware PowerCLI. Continue reading “How to use PowerCLI to list Device ID, Mounted URL of Datastores in VMware”

PowerCLI Connection Error: The underlying connection was closed: An unexpected error occurred on a send

PowerCLI is a very flexible tool for vSphere automation. One morning, I connect to vSphere environment & found this error. See Fig-1.

“The underlying connection was closed: An unexpected error occurred on a send”

Fig-1: Error connecting to vCenter

Continue reading “PowerCLI Connection Error: The underlying connection was closed: An unexpected error occurred on a send”

List ALL VMware SRM Protected VMs with their Protection Group Names

In your VMware Site-Recovery-Manager Environment, you may need to fetch the list of protected VMs and their associated protection group for documentation purpose. For this purpose, I created this one-liner command to fetch the necessary information with Name, Protection Group Name, Description, Replication Type & Datastore. Continue reading “List ALL VMware SRM Protected VMs with their Protection Group Names”