In case of unexpected events or testing VM with enabled AutoStart feature is not starting as expected.
vSphere 7.x
vSphere 8.x
If at any point disable has been called for a VM (specifically for the VM, not globally) AutoStart will not work.
To re-enable AutoStart for the VM, it has to be enabled explicitly for the VM. Disabling and enabling it at global level will have no effect as the VM has explicitly opted out via startAction.
Workaround:
Manually editing the vmAutoStart.xml file should only be done while hostd is stopped.
File location is /etc/vmware/hostd/vmAutoStart.xml
Note:
If change is done while it's running, it assumes it manages the file and will re-write it from in-memory state.
In example:
<startDelay>-1</startDelay>
<startOrder>1</startOrder>
<stopAction>systemDefault</stopAction>