Wednesday, October 23, 2013

vmware: Unidesk VM on NFS taking about a minute to start booting up.

Here we look at traces (NFS) to find few inefficiencies of VMware NFS client
unidesk config:

 




there is Workaround available: (from nutanix/unidesk support)

The workaround is to follow these guidelines:
1. Ensure the root of the datastore has as few directories as possible. 
2. The desktop VM's files need to be two directories below the root of the data store.

Assuming a greenfield setup, this is how to setup the directory structure.

1. Create one directory for the desktop VMs.
2. Create one directory for all the CPs and the rest of the infrastructure VMs.
3. If VMs were automatically deployed, unregister VMs, move into the appropriate subdirectory, register VMs.
4. Use the "synchronize infrastructure" in the Unidesk Management Appliance UI to discover the new VM ids which change after re-registering.

Example of a 3 desktop setup:
/vmfs/volumes/ctr1/DesktopVMs/VM1
/vmfs/volumes/ctr1/DesktopVMs/VM2
/vmfs/volumes/ctr1/DesktopVMs/VM3

/vmfs/volumes/ctr1/InfraVMs/CachePoint1
/vmfs/volumes/ctr1/InfraVMs/CachePoint2
/vmfs/volumes/ctr1/InfraVMs/CachePoint3
/vmfs/volumes/ctr1/InfraVMs/MA
/vmfs/volumes/ctr1/InfraVMs/MasterCachePoint
/vmfs/volumes/ctr1/InfraVMs/InstallationMachine1


More details on the issue:
 

How to capture NFS traffic on Nutanix, so that we can review through the wireshark.

1. Power off all the VMs other than CVM and Unidesk VM, so that we get clean trace.


sudo tcpdump -i eth1 port 2049 -w nfs.cap

 


 Bootup time in Vcenter:
 ~Unidesk-TESTVM   Completed  Administrator  pax-vCenter
start time:10/21/2013 1:53:19 PM
Bootup complete as per Vcenter: 10/21/2013 1:54:13 PM ( it still needs to boot the OS), It waits for more than
40 seconds at 95%)
 
Four things I can see that are odd :

1. NFS client is looking for entire / directory rather than focussing on the files .
(Unidesk KB specifically addresses how to reduce this issue this : http://www.unidesk.com/support/kb/unidesk-configuration-considerations-nfs-based-storage-including-nutanix-your-boot-images)


and looking  UP sre-theos2,sretheos1 which are not part of ~Unidesk directory.



2. It is creating too many vmBigTestFile ( it should be enough to create one).
3. REDO logs - looking up and then verifying and then creating the files (
so it will take while before sending create files)

repeated create and remove of redo logs ( not sure why ESXi nfs client has to do that)