Clear VCSA DNS cache

The command to clear the DNS cache on vCenter Server Appliance is

systemctl restart dnsmasq

and not

systemctl restart systemd–resolved.service




vCenter to VCSA Migration

I was trying to migrate from a Windows based vCenter 5.5 install to VCSA 6.5 and after encountering several errors trying to run the migration tool I discovered that I could disconnect and remove a host from vCenter and add it to VCSA w/o interrupting the VMs.

  1. Spin up new VCSA and recreate EVC clusters. (Make sure to have a DNS A record for VCSA before spinning it up.)
  2. Stop DRS on the vCenter EVC cluster.
  3. Enter maintenance mode for a host. (Don’t evacuate VMs)
  4. Disconnect host from vCenter.
  5. Remove host from vCenter.
  6. Add host to new VCSA.

I lost all the historical perf data, but that’s better than trying to fix SSL certs.


Reverse web proxy (with certs)

Here is a great tutorial for setting up a reverse proxy for webservers. (Kudos to Tyler and the Ajenti project.)


  • As of 2018-07-10, Ajenti didn’t work on Ubuntu 18.04, a dependency was broken.
  • I setup the cert for, then complained it was using site1’s cert, until I ran certbot and gave site2 it’s own cert. Then everything was working.

Global hotkey for New Mail

I found how to make a global hotkey shortcut that opens a new email and I’ve found it quite useful.

  1. Create a new shortcut on the desktop.
  2. Point it to the outlook.exe file.
  3. In the Target field append /c ipm.note at the end.
  4. Select a key for the shortcut field. (I selected “m”, ctrl+alt will be automatically added.)


"C:\Program Files (x86)\Microsoft Office\Office16\OUTLOOK.EXE" /c ipm.note

Now I can press Ctrl+Alt+m anywhere and I get a new email window in Outlook.

ESX disconnected from vCenter

One of my esx 5.5 u3 hosts was disconnected from vCenter. The VMs were still running but reconnecting it to vCenter would result in an vmodl.fault.HostCommunication error.


I logged into the console and looked at the logs and saw that the ramdisk /tmp was full. I verified that it was full with esxcli system visorfs ramdisk list [1]

A simple ls -al /tmp showed that an error log file was filling up the entire ramdisk. I deleted the file and the host automatically reconnected to vCenter.

Reclaiming space on VMs

Here are some great posts about reclaiming unused space in esxi.




To get automatic space reclamation you’ll need:

  • ESXi 6.5 Update 1
  • iSCSI volume formatted with VMFS6. (I think VMFS5 works but there are caveats.)
  • Thin provisioned disks.
  • discard option enabled on mount points for your Linux guests.

My new esxi 6.5 host connecting to iscsi volume on FreeNAS 11.0 works like a charm at least when I force and UNMAP with sudo fstrim /

I haven’t had it enabled long enough to watch it work it’s magic, but apparently this means no more filling the drive with zeros, then punching a hole while the machine is offline.

UPDATE 2018-01-20: The magic happens immediately. You can see the updated datastore size immediately after deleting a large file in a linux VM.

It also means that as much as I hate setting up iSCSI, I’m not going to go back to NFS if it doesn’t have this.

Convert VMDK to Thin without vMotion

Storage vMotion is wonderful but vMotion isn’t available without vCenter. bah!

This was a nice guide:

  1. Enable SSH to the host.
  2. Browse to the VM
    cd /vmfs/volumes/<datastore>/<vm>
  3. Create a thin version of the VM.
    vmkfstools -i d <vharddrive>.vmdk -d thin <vharddrive>-thin.vmdk
  4. Remove the thick .vmdk
  5. Attach the thin .vmdk
  6. Delete the old .vmdk and *-flat.vmdk