Visitors

HOW TO: Identify VMFS Datastore on Perennially Reserved LUN

We all well familiar with the problem with Raw Device Mapped (RDM) LUNs that are used by VMs running Microsoft Clusters Service.

VMware KB: 1016106

ESXi 5.0 uses a technique to determine if Raw Device Mapped (RDM) LUNs are used for MSCS cluster devices, by introducing a configuration flag to mark each device as “perennially […]

Who created these VM snapshots???

I am sure you have been in a situation where there are a lot of old, unidentifiable virtual machine snapshots and no one takes responsibility for creating them. How would you deal with all these “pre install”, “upgrade” or any other meaningless snapshot names without description?

Well, it is easy to find out when snapshot […]

VMware PowerCLI and ESXi Shell scripts

Small collection of VMware PowerCLI / Powershell scripts and onliners to save time re-typing them:

Get a list of all virtual machines with snapshots and save it to a csv file; # Get-VM | Get-Snapshot | Select-Object VM, Name, SizeMB, Created, Description | Export-Csv c:snapshots.csv # Get a list of virtual machines, guest IP address, […]

HOW TO: Start, Stop, Restart services on VMware vSphere ESX server via PowerCLI

The service you will need to start or stop simultaneously on multiple servers is likely to be the SSH (TSM-SSH) service.

Here is how you do it with PowerShell / PowerCLI:

$vCenter = ‘vCenter.vstrong.info’ ; Name or IP address of your vCenter Server $Cluster = ‘Vblock cluster 1’; Name of the cluster Connect-VIServer $vCenter $Scope […]

HOW TO: Find HBA WWN number on VMware vSphere ESX server

There are several ways to get HBA WWNs on VMware vSphere ESX/ESXi host:

vSphere Client; Using ESXi Shell; Using Powershell / PowerCLI script.

1. Connect to a server or vCenter, open server Configuration tab, under Hardware select Storage Adapters:

You can also copy WWNN (World Wide Node Name) and WWPN (World Wide Port […]

HOW TO: Enable or Disable Lockdown Mode on VMware vSphere ESXi host

Q: What is Lockdown Mode? A: Lockdown Mode prevents users from logging directly to the host. The host will only be accessible through local console or vCenter Server. None of remote management options e.g. vCLI, PowerCLI script, SSH will work. When it is enabled, only vpxuser () has authentication permissions and can connect to the […]

HOW TO: Create a new user and add it to a role on ESXi host.

This script creates a new user and adds the user to a role on the ESX host:

$NewUser = ‘_New_user_name_’ $NewUserPassword = ‘_New_user_Password_’ $NewUserDesc = ‘_New_user_description_’ $HOSTCredentials = Get-Credential -Credential root $ESXhost = ‘_My_ESX_HOST_’ Connect-VIServer $ESXhost -Credential $HOSTCredentials New-VMHostAccount -Id $NewUser -Password $NewUserPassword -Description $NewUserDesc -UserAccount -Server $ESXhost -AssignGroups users $AuthMgr = Get-View (Get-View ServiceInstance).Content.AuthorizationManager […]