Tuesday, May 9, 2017

When 100% cpu utilization is not really 100%

100% does not always mean 100%

Some people mistakenly look at tools inside of a guest operating system (for example,  the task manager) and when faced with 100% cpu utilization, they automatically believe that such virtual machine needs more vcpus.  Not necessarily. You really need to look at what is taken place on the host and compare the results. Remember that the guest OS is not aware of what is actually happening on the host. 

Notice that this case this virtual machine running Windows displays 100% cpu utilization. 

However, notice that the esxi host does not have any of the logical cpus at 100% and that virtual machine is NOT using 100% of the actual lcpu (core). Notice the %MLMTD column and %RDY.

In this case, the reason is due to a cpu limit. Notice the capture below. This virtual machine has the limit set to 50% of the maximum number of cpu mhz. Yet, the guest OS is not aware of this.

Sunday, April 23, 2017

How To Install Esxi From USB

Installing esxi to a usb device is simple, just insert a cd and during the installation point to a usb device. This shows how to prepare a bootable usb device that allows you to install esxi onto any type of device.

Step 1: Launch your browser and point to https://unetbootin.github.io/

Step 2: Download and launch unetbootin. Point to your .iso image and click OK.

Step 3: Click on Exit.

Step  4: Verify the contents of your USB drive.

Step 5: Boot your future esxi host from USB and start the installation.

Friday, March 31, 2017

PowerCLI using Linux

How to Install and Use PowerCLI from Linux. 


Don't expect to find all the commands typically found in the Windows counterpart.
Good luck finding autodeploy, imagebuilder and vum commands.

1. From a Linux system (Ubuntu in my case), launch your browser and to to labs.vmware.com.

2. Find PowerCLI Core and download it. In the process, download the Instructions.pdf.

3. Download PowerShell for Linux using the curl command.

# curl -SLO https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-alpha.12/powershell_6.0.0.-alpha.12-11ubuntu1.14.04.1_amd64.deb

4. Install the package by force using the dpkg command.

# sudo dpkg -i powershell*.deb
# sudo apt-get install -f

5. Verify the package is install with the dpkg -l command

6. Create the Modules directory for PowerCLI

# mkdir -p ~/.local/share/powershell/Modules

7. Copy the PowerCLI file and extract it.

# cp PowerCLI_Core* ~/local/share/powershell/Modules

8. Extract the zip files, including PowerCLI.ViCore and PowerCLI.Vds. Verify the contents.

# cd ~/local/share/powershell/Modules
# unzip PowerCLI.ViCore.zip
# unzip PowerCLI.Vds.zip

9. Launch powershell

10. Import the PowerCLI Modules

11. Verify the are loaded

12. Instruct powercli to ignore invalid certificates and use it.

Some useful links:



Tuesday, March 21, 2017

Storage IO Control in vSphere 6.5

What is Storage IO Control?

Storage IO Control is used to control the IO usage of virtual machines and gradually enforce pre-defined shares. Shares can be high, medium or low. This feature was introduced in vSphere 4.1 and requires the Enterprise Plus License.

Step 1: Create a datastore. VMFS was used in this case and a datastore called dy (datastore y) was created.

Step 2: SIOC is now managed via IO Filters Providers. You can easily see the filters are registered automatically. You can select the vCenter server and see these filters.

Step 3: To enable SIOC on a datastore, right click on the datastore and enable SIOC.

Step 4: Next, create a virtual machine policy. Click on Home and select VM Storage Policies to create a new SIOC policy.

Step 5: Name the policy and click on Next.

Step 6: Select SIOC and select High, Medium or Low Shares.

Step 7: Now, apply the policy to the virtual machine. Right click on an existing virtual machine  and edit Storage Policies. Select the policy to use and select Apply All.

Thursday, February 9, 2017

Virtual SAN and PowerCLI

Creating a vsan cluster with manual disk claim mode:

new-cluster -name cluster_name -vsanenabled -location datacenter_name

Viewing disk groups:


Creating a disk group:

new-vsandiskgroup -vmhost hostname -ssdcanonicalname disk_name -datadiskcanonicalname  disk_name,disk_name

Removing a disk group:

remove-vsandiskgroup -vsandiskgroup disk_group_name -confirm:$false

Removing a disk from a disk group:

remove-vsandisk -vsandisk disk_name -confirm:$false

Adding  a disk to a disk group:

new-vsandisk -canonicalname disk_name -vsandiskgroup disk_group_name

Viewing attributes of a vsan disk:

get-vsandisk -canonicalname disk_name -vmhost esxi_name

Viewing vsan storage policies:

get-spbmstoragepolicy -name policy_name

Creating a vsan storage policy:

new-spbmstoragepolicy -name policy_name -anyofrulesets

Removing a vsan storage policy:

remove-spbmstoragepolicy -storagepolicy policy_name

Exporting a vsan storage policy:

export-spbmstoragepolicy -storagepolicy policy_name -filepath C:\location -force

Importing a vsan storagepolicy:

import-spbmstoragepolicy -storagepolicy policy_name -filepath C:\location

Viewing fault domains:

get-vsanfaultdomain -cluster cluster_name

Creating a vsan fault domain:

new-vsanfaultdomain -name domain_name -vmhost hostname1, hostname2

Removing a vsan fault domain:

remove-vsanfaultdomain -vsanfaultdomain domain_name -confirm:$false

Viewing vsan disk space usage:

get-vsanspaceusage -cluster cluster_name

Friday, January 27, 2017

Virtual SAN 6.5 Licensing

Virtual SAN 6.5 Licensing

6.5 vs 6.2


Thursday, January 12, 2017

D.R.S. 6.5 Enhancements

D.R.S. Enhancements in vSphere 6.5

Predictive DRS

Disabled by default, predictive DRS works together with VROPS to make DRS proactive instead of
reactive.The way that it works, VROPs computes and forecasts vm utilization (both cpu and ram) based on data received from the vCenter server. In turn, DRS receives the forecasted metrics 60 minutes ahead of time in order to balance the loads prior to contention.

VM distribution, Memory Metric for Load Balancing and CPU-Overcommitment.

VM distribution is used to prevent less vms from restarting due to a failure by distributing the
number of vms more evenly. If DRS detects a severe performance inbalance, it will correct the
performance at the expense of the even distribution of vms.

Memory Metric for Load Balancing: By default, DRS uses active memory + 25% as the primary
metric. This new feature dictates that consumed memory should be used intead.

CPU over-commitment: Use this option to enforce a maximum vcpu vs lcpu ratio. Once the limit is reached, no new vms are allowed to power on on that particular host. According to the documentation, 500 is equals 5 vcpus x 1 lcpu.