VMware Project Fargo- A Technique for Rapid Cloning of Running VMS

Today I was going through a blog and found one very interesting blogpost which I am going to share with you.

At VMworld 2014 VMware announced a very interesting new project called Project Fargo. This is another name for the Project VMFork.

What is this Project Fargo ?

Fargo/VMFork is a platform currently in technology preview which enables a rapid cloning of running VMs.

It lets you quickly spin up linked clones from a VM that’s already running instead of using disk images. Rather than having a master image stored on a virtual hard disk , the base desktop is an actual running VM. When you need to give a user that same desktop, you can just clone that VM instead of booting up a whole other one. The aim of Fargo is to provides a fast, scalable differential clone of a running VM.

The key benefits of using this method is that it is instantaneous and can be done from a running VM,  so a new VM spawned would typically take less than 1 second and is in the same running state from where it is cloned.Read More

Understanding Advanced Snapshot Management

Deleting virtual machine snapshots without wasting disk space

Before using snapshots on your VM, analyzing free disk space on the VMFS volume is very important.  As a best practice or thumb rule you should have least 20% of the virtual machine’s total disk size as free disk space before using snapshots. But this amount can vary depending upon the type of server or how long you will keep the snapshots or if you are planning to use multiple snapshots.

If you are planning to use snapshots on servers like database servers or file servers the amount of free space that should be present on underlying datastore or VMFS volume will change drastically as comparison to using snapshots on servers like web servers or say DNS server because the amount of data written on disks in case of file or database server is much more than any other type of servers.

More importantly if you are planning to include the memory state of the VM’s with snapshots, you’ll also need to allow for extra disk space equal to amount of RAM assigned to the VM.… Read More

How Snapshots work in VMware

What is a Snapshot

We have heard this term time and again during our journey with working on VMware and many of us are aware of what it is. Still I am including the formal definition of snapshot as below:

Disk Snapshot in VMware refers to a copy of the virtual machine disk file at a certain point in time. It preserves the disk file system and system memory of your virtual machine by enabling you to revert to the snapshot in case something goes wrong.

Snapshots are very helpful in the cases when you are planning to upgrade or patch your mission critical applications and servers.

When a snapshot is taken on a VM then a new disk file by the name *–delta.vmdk is created in the same folder where VM disks are residing (Unless and until you are not using WorkingDir parameter)

All the write operations are freeze on the original vmdk disk present in your VM and the new write operations will be performed on the newly created delta disk.… Read More

Certificate Manager for vCenter Server Appliance 5.5

This Fling is a GUI application to replace digital certificates on the vCenter Server Appliance.  Easily deploy by selecting the components that need digital certificates replaced. This Fling works with vCenter Server Appliance 5.5.

The GUI wizard-based tool helps you by:

  • Replacing certificates for vCenter Server, Inventory Service, Log Browzer, and Auto Deploy
  • Providing Single-Sign On (SSO) that uses the same certificate as the vCenter Server certificate
  • Collecting backups of previously deployed certificates and associated files
  • Providing tool level logging

This fling can be downloaded from Here

System Requirements

  • vCenter Server Appliance 5.5
  • Windows OS with Java SE Runtime Environment 8

Instructions for Installing the fling

  • Make sure sshd service is running on vCSA
  • Run this command on vCSA to get the lookup URL: cat /etc/vmware-sso/ls_url.txt
  • On a Windows machine, make sure the  JRE_HOME system variable is set to the Java SE Runtime Environment 8
  • Do NOT place the certificate chain file, key and pfx of various component, on the same directory in file system

Previously deployed certificate files are copied with the old_rui prefix.… Read More

Static mac address in Esxi 5.5 “conflicts with VMware reserved MACs”

Virtual MAC address assignments are based on Microsoft’s organizationally unique identifier (OUI) registration with the Institute for Electrical and Electronic Engineers (IEEE). An OUI is a unique MAC address prefix assigned that is assigned to all NIC vendors, both physical and virtual.

VMware Organizationally Unique Identifier (OUI) allocation uses the default OUI 00:50:56 as the first three bytes of the MAC address generated for each virtual network. The MAC address-generation algorithm produces the rest of the MAC address. The algorithm guarantees unique MAC addresses within a virtual machine and attempts to provide unique MAC addresses across virtual machines.

The VMware Universally Unique Identifier (UUID) generates MAC addresses that are checked for conflicts. The generated MAC addresses are created by using three parts: the VMware OUI, the SMBIOS UUID for the physical ESXi machine, and a hash based on the name of the entity that the MAC address is being generated for.… Read More

Understanding svMotion Background Process

svMotion is fair simple process and nothing much complex is involved in that. Here are the step by step breakdown of what happens in background of svMotion process:

  1. The virtual machine working directory is copied by VPXA to the destination datastore.
  2. A “shadow” virtual machine is started on the destination datastore using the copied files. The “shadow” virtual machine idles, waiting for the copying of the virtual machine disk file(s) to complete.
  3. Storage vMotion enables the Storage vMotion Mirror driver to mirror writes of already copied blocks to the destination.
  4. In a single pass, a copy of the virtual machine disk file(s) is completed to the target datastore while mirroring I/O.
  5. Storage vMotion invokes a Fast Suspend and Resume of the virtual machine (similar to vMotion) to transfer the running virtual machine over to the idling shadow virtual machine.
  6. After the Fast Suspend and Resume completes, the old home directory and virtual machine disk files are deleted from the source datastore.
Read More

Understanding svMotion operation on a VM with snapshots

Prior to vSphere 5.0 it was not possible to storage vMotion a VM that is running with snapshots. With 5.0 VMware has enhanced svMotion and included this feature as lot of customers were demanding for that.

But there is one caveat in this feature which many of us don’t know due to lack of documentation on this. I found one very useful article on VMware Blog and thought of sharing with you.

workingDir parameter

The location of a virtual machine’s snapshot redo log file is defined by the virtual machine .vmx file setting workingDir. By default, the workingDir property is the same as the virtual machine’s home directory. What this means is your snapshot is stored in the same directory where your VM base disks are residing.

if you don’t have enough space on datastore where your VM disk is currently placed and you want to take snapshot on that VM, then by use of workingDir parameter you can store snapshot  to another location/datastore.Read More

Managing vSphere Network From Command Line

Managing vSphere Standard Switch

Esxcli network vswitch command is used to do the networking configuration of a vswitch (Standard or vDS). The available namespace with this command are: standard and dvs as shown below

To list all Standard vSwitch present on the Esxi host

Add Remove vSphere Standard Switch

We can add/remove new standard switches or create a new portgroup in vswitch or associate uplinks to vswitch using the command

# esxcli network vswitch standard

The namespaces associated with the above command as shown below

Adding a new vSwitch to Esxi host

Adding a new vswitch with specific number of ports

Note: By default when a vSwitch is created it is created with 128 ports

Configuring Port Group on Standard Switches

Port groups are configured on vSwitch using the command

# esxcli network vswitch standard portgroup

The associated namespace with this command are as shown below:

Create a new portgroup in a standard vswitch

The following command is used to create a new portgroup on a standard vSwitch

Removing a portgroup from a vSwitch

Below command will delete a portgroup from a standard vswitch

Configuring CDP on Standard switches

Configuring CDP settings or MTU on a standard vswitch is done using the command :

# esxcli network vswitch standard set

To enable CDP on a vswitch

To disable CDP on a vswitch

Configuring uplinks for Standard vSwitch

The command used to add/remove uplinks to a standard vSwitch is

# esxcli network vswitch standard uplink

Adding an uplink to an existing vSwitch

The above command will add a new uplink vmnic1 to the vswitch1

Removing an existing uplink from a vSwitch

Setting Failover/Security/Traffic shaping policy configuration on a standard vSwitch

The command used to configure the policies on a standard vswitch is

# esxcli network vswitch standard policy

The available namespace with this command are shown below

Checking the configured policy (Failover/Security/Traffic Shaping) on a standard vSwitch

For e.g:Read More

Troubleshooting Esxi host Disconnection from vCenter issue

Last week I was facing a serious issue in my home lab where my esxi host is getting disconnected from my vCenter Server randomly. Whenever I am doing any configuration changes like enabling ssh or creating a new vSwitch the host got disconnected immediately. I was damn frustrated and was looking for a solution because it was very hard for me to work.

So I started troubleshooting by going through my vCenter log files and found following:

Read More

Whats New in vSphere 6.0- Host Profile Enhancements

With vSphere 6.0 Vmware has enhanced so many features and host profile is one of them. Let’s refresh what host profile do. A plain simple definition of host profile is:

“Host Profiles allow you to configure standard configurations for your ESXi hosts and to automate compliance to these configurations, simplifying operational management of large-scale environments and reducing errors caused by misconfigurations”

Two main features that are enhanced in vSphere v6.0 are:

Maintenance Mode Removal

Till release of vSphere 5.5 host profile required hosts to be put in maintenance mode before you can apply the profile. This can be a very inconvenient task when you are trying to change some configuration during normal business hours specially when the Host:VM consolidation ratio is high.

With vSphere 6.0 Vmware has made host profiles a bit intelligent. Now a host profile will require a host to be put into maintenance mode only if the configuration settings defined in host profile requires it.… Read More