How to work around ESXi not autostarting VM’s from a NAS or NFS share

I’ve been busy rebuilding my home environment.
(articles will follow as soon as life permits it).
During my initial testing of starting my all-in-one VMWare ESXi environment (which contains a Virtual SAN and VM’s on 1 host), I noticed that the autostarting of VM’s was not working properly. (This is with ESXi v5.0 so I don’t know if this is also affecting v5.1 and beyond)

So while I was waiting and waiting (on my headless ESXi system) I didn’t understand why my VM’s where not booting.

waiting

The problem

After logging into the vSphere client, this is what I saw:

esxi-autostart1 
It looks like the VM’s are not "visible" to ESXi when it boots so it doesn’t know that it has autostart settings attached to it.
The NFS datastore is not yet visible so the VM’s are labeled as "unknown"

Solution

So how do we work around this issue…?
Well the solution to this is as simple as it is dirty

dummy
Create a DUMMY Virtual Machine on your local datastore
(give it like a couple of MB RAM, no Harddrive etc)
– Place it AFTER your Virtual SAN VM in the autostart order
– Set the startup delay of your Dummy VM to 300 seconds or something in that range
 
When you boot your ESXi machine, the Virtual SAN VM will start first followed by the newly created local dummy VM.
VMWare will honor its timeout value long enough for your NFS share to come online then the rest of the VM’s should be visible to ESXi after 300 sec.
(you should use a timer to see how long it takes ESXi to pick up on the fact that your datastore is back online so can can adjust the autostart timeout value)

What do we call this..?

I don’t really know what to call this. I can understand that ESXi doesn’t have access to the NFS datastore yet so it has no information about autostart timeouts and such.
On the other hand, why does ESXi try to start VM’s, it has no access to..?
Let us call it a "feature" for now…
If this post helped you out, help me out keeping this site alive and visit some of my sponsors on the left or right.. Thanks..!
Tags:ESXi, autostart,VM, NAS, NFS share

Leave a Comment