Category Archives: vSphere 6.X

DRS Automation Level and Migration Threshold

By | 21/11/2017

DRS migration threshold allows you to specify which recommendations are generated and then applied (when the virtual machines involved in the recommendation are in fully automated mode) or shown (if in manual mode). This threshold is also a measure of how much cluster imbalance across host (CPU and memory) loads is acceptable.

Migration threshold is a measure of how much cluster imbalance is acceptable based on CPU and memory loads. The slider is used to select one of five settings that range from the most conservative (1) to the most aggressive (5). The further the slider moves to the right, the more aggressive DRS will work to balance the cluster. read more

Configuring EVC in vSphere 6

By | 21/11/2017

The evolution of vSphere has forced the hardware vendors to add more enhanced functionalities in server hardware in order to bring the best out of virtualization.  Enhanced vMotion Compatibility comes into picture when a all Esxi hosts in a cluster are not identical i.e some hosts are from older generation and some from newer generations.

With time an environment grows and vSphere admins keep adding new Esxi hosts in a cluster as per virtual machine resource demands and this is when the mismatch occurs. When a cluster have Esxi hosts from different CPU generations, configuring EVC on cluster ensures that virtual machine migrations between hosts in the cluster do not fail because of CPU feature incompatibilities. read more

Configuring DPM in vSphere 6

By | 20/11/2017

What is vSphere Distributed Power Management (DPM)

Consolidation of physical servers into virtual machines that share host physical resources can result in significant reductions in the costs associated with hardware maintenance and power consumption.

vSphere Distributed Power Management provides additional power savings by dynamically consolidating workloads even further during periods of low resource utilization. Virtual machines are migrated onto fewer hosts and the unneeded ESX hosts are powered off.  read more

Esxi Host Power Management Policies in vSphere 6

By | 20/11/2017

One of the advantages which virtualization brought with itself was “POWER SAVINGS” as it enabled administrators to consolidate workloads on fewer number of physical servers and thus save some power and reduce carbon footprint in the datacenter. Sunny Dua rightly mentioned in his blog that “Even before you start realizing the other benefits of virtualization, power bills is the first Opex savings which makes that return on investment on virtualization speak for itself”

Esxi can take advantage of several power management features that the host hardware provides to adjust the trade-off between performance and power use. One obvious question that comes in mind that if I can save more power by using the BIOS features and the hypervisor features to throttle down the CPU frequency, then why should not I go for it? read more

Customize SSH and Esxi Shell Settings for Increased Security

By | 06/11/2017

The ESXi Shell provides access to maintenance commands and other configuration options. Esxi shell and SSH comes in handy when there are certain tasks that can’t be done through the Web Client or other remote management tools. 

Enabling local and remote shell access on Esxi hosts

Login to vSphere Web Client and select an Esxi host and navigate to Manage > Settings > Security Profile Services and click Edit


We can enable/dsable below services and also can change their start up method:

  • Direct Console UI
  • ESXi Shell
  • SSH


Enabling SSH or local shell through the DCUI.

Go to the console of the host. Press F2 and enter esxi host credentials.

Select Troubleshooting Options and hit Enter on each service you want to enable/disable.


Configuring the Timeout For the ESXi Shell

By default the timeout setting for the ESXi shell is set to disabled. The shell timeout setting allows you to specify how long an inactive session is left open. After the timeout period, if you have not logged in, the shell is disabled.

Note: If you are logged in when the timeout period elapses, your session persists. However, the ESXi Shell is disabled and it prevents other users from logging in.

Configure Shell timeout from DCUI

From Troubleshooting mode options, select Modify Esxi Shell and SSH timeouts


And set the values 


Note: If ESXi Shell and SSH are enabled, the option to modify the timeout value is grayed out. To change the timeout value, ensure both ESXi Shell and SSH are disabled. This is by design and is intended to indicate when the timeout values would take effect.

Configure ESXi Shell timeout from vSphere Web Client:

1: Log in to vSphere Web Client.

2: Select the host in the Inventory panel and click Configuration tab.

3: Under Software, click Advanced Settings.

4: In the left panel, search for UserVars.

5: In the UserVars.ESXiShellTimeOut field, enter the timeout setting in seconds.


ESXi Shell and SSH service needs to be restarted for changes to take affect.

ESXi Shell Interactive Time Out 

This is applicable to the SSH Sessions that were opened after the configuration was done. Let’s say we have configured this time-out to 60 seconds. So once this configuration is done, and a new Putty Session is opened, it automatically closes after 60 seconds of no activity. Well, if you don’t run any commands or you don’t scroll in the SSH Session for 60 seconds, you will be logged out automatically. 

To configure Shell Interactive timeout, edit the UserVars.ESXiShellInteractiveTimeOut configuration option.

Configure Shell timeout from CLI

Check current settings

[root@esxi04:~] esxcfg-advcfg -g /UserVars/ESXiShellInteractiveTimeOut
Value of ESXiShellInteractiveTimeOut is 0
[root@esxi04:~] esxcfg-advcfg -g /UserVars/ESXiShellTimeOut
Value of ESXiShellTimeOut is 0

Configuring Shell Timeout via Power CLI

Configure the setting for all esxi servers in a cluster:

Get-AdvancedSetting -Entity (Get-cluster <cluster> | Get-VMhost) -Name UserVars.ESXiShellTimeOut | Set-AdvancedSetting -Value 1800

Get-AdvancedSetting -Entity (Get-cluster <cluster> | Get-VMhost) -Name UserVars.ESXiShellInteractiveTimeOut | Set-AdvancedSetting -Value 1800


Get-AdvancedSetting -Entity (Get-cluster <cluster> | Get-VMhost) -Name UserVars.ESXiShellTimeOut | ft -autosize Get-AdvancedSetting -Entity (Get-cluster <cluster> | Get-VMhost) -Name UserVars.ESXiShellInteractiveTimeOut | ft -autosize read more

Enable and Configure ESXi Host Lockdown Mode

By | 06/11/2017

To enhance the security measures in a virtualized environment, it is often advisable to limit direct access to Esxi hosts and this is when lockdown mode concept comes into picture. Lockdown mode is used on Esxi hosts in order to improve security of the hosts which are centrally managed by vCenter server.

When the lockdown mode is enabled, the host is managed using the vSphere Client connected to the managing vCenter Server, VMware PowerCLI, or VMware vSphere Command-Line Interface (vCLI). The only difference is that access is authenticated through the vCenter Server instead of using a local account on the ESXi host. read more

Backup and Restore Resource Pool Configurations

By | 30/10/2017

When DRS is disabled on a cluster, it removes all the resource pools that are part of the cluster and the resource pool hierarchy and affinity rules are not re-established when DRS is turned back on. 

Now if you really want to disable DRS (for any maintenance activity) and want to save yourself from the pain of re-creating resource pools and configuring share/limits etc, you can take backup of resource pools and and restore it later post completing the maintenance and enabling DRS again.

In my lab I created a resource pool named “RP-Edge” and placed one VM in this resource pool. read more

Backup and Restore vDS Configurations

By | 28/10/2017

You can export vSphere distributed switch and distributed port group configurations to a file. The file preserves valid network configurations, enabling distribution of these configurations to other deployments.

This functionality is available only with the vSphere Web Client 5.1 or later. However, you can export settings from any version of a distributed switch if you use the vSphere Web Client or later.

To export vSphere Distributed Switch configurations using the vSphere Web Client: 1: Browse to a distributed switch in the vSphere Web Client navigator and Right-click the distributed switch and click Settings > Export Configuration vds-bkp-1.PNG

2: Select the Export the distributed switch configuration or Export the distributed switch configuration and all port groups option.

vds-bkp-2.PNG read more