In this guide, we’ll show how to enable automatic startup and startup order for VMs running on a VMware ESXi or Workstation host. You can view and manage standalone host AutoStart settings through vCenter, but vCenter itself does not provide a host-independent VM Autostart mechanism.
Why Configure VM Autostart in VMware?
By default, both VMware ESXi and VMware Workstation don’t automatically start virtual machines after the host has been rebooted. After a host reboots (due to maintenance or a crash), the VMware administrator must manually start the virtual machines.
How to Configure Automatic Startup of VMs on VMware ESXi
For a standalone ESXi host, you can configure VM autostart through the ESXi host client interface.
Enable VM Autostart in ESXi Host Client
For a standalone VMware ESXi 8.0 host:
- Sign-in the ESXi Host Client web UI;
- Select Manage > System > Autostart;
- Autostart is disabled by default (Unset) for all VMs;

- Select the VM and click Enable.

- Use the Start Later and Start Earlier buttons to change the order in which the VM starts (the VM with autostart order 1 starts first).

Configure Startup Delay, Shutdown Delay, and Order
Click the Configure button to configure individual VM advanced startup and shutdown settings.
- Startup delay — how many seconds to wait before powering on the VM (120 seconds by default). This delay allows you to wait for booting of custom services and scripts execution;
- Shutdown delay — the maximum time the ESXi host waits to shutdown (120 seconds by default). If a VM doesn’t shut down within the specified delay time, the host executes a power off command against the VM and then begins shutting down the next VM.
- Stop Action — select one of four shutdown actions for the VM at host shutdown (System default, Shut Down, Suspend, or Power off). This requires VMware Tools to be installed on the guest OS. Default action is Shut down.
- Wait for heartbeat — if enabled, the boot sequence continues after the ESXi host receives the first heartbeat from the VM (also requires VMWare tools).

These options allow to configure the correct virtual machine startup order. For example, the domain controller VM should boot before the application servers, and so on.
Global Autostart Defaults in ESXi
It is possible to configure global startup defaults for all VMs on the ESXi host. Click the Edit Settings button at the top of the Autostart dialog box.
To enable autostart for all VMs, change the Enabled to Yes. Then configure the default start/stop delay and stop action.

Note. Individual VM AutoStartup settings override the default values.
Automatically Start Virtual Machines on VMware vCenter
A different set of automatic startup and shutdown settings is used if your ESXi hosts are connected to a VMware vCenter (VCSA).
You can manage startup settings on a standalone host in vCenter, but when VMs are migrated to another host via vMotion, the startup settings do not move with the VM.

| Environment | VM Autostart |
|---|---|
| Standalone ESXi | Supported |
| ESXi managed by vCenter | Supported, host-specific |
| vSphere HA Cluster | Managed by HA |
| VMware Workstation Pro | Supported |
Using Scheduled Tasks in vCenter
In vCenter 7 and 8, Scheduled Task can be used to automatically start infrastructure VMs after an outage.
- Select VM in vCenter and go to the Configure tab.
- Select Scheduled Tasks.
- Select New Scheduled Task > task name Power On.
- Run the task After vCenter startup with a 2 minutes delay.
- Save the task.

Such a task will automatically boot the VM after vCenter starts.
The automatic startup and shutdown options for VMs are disabled when an ESXi host is part of a vSphere HA (High Availability) cluster. HA automatically manages VM restarts across hosts in the event of failures that conflict with autostart settings.

Configure VMs Autostart using PowerShell
You can configure VM autostart settings on ESXi or vCenter using PowerShell. This requires the VMware PowerCLI module to be installed on the administrator’s machine.
PowerCLI Commands for VM Startup and Shutdown Policies
Connect to ESXi host or vCenter using the command:
Connect-VIServer -Server yourESXiHost
Check the current startup settings for VMs on the host:
Get-VM | Get-VMStartPolicy

In order to view the current AutoStart config of the ESXi host, use the following command:
Get-VMHostStartPolicy
Now enable the AutoStart service on the ESXi host. Then config AutoStart settings for the VM:
Get-VMHostStartPolicy | Set-VMHostStartPolicy -Enabled $true
Get-VM hq-dc01 | Get-VMStartPolicy | Set-VMStartPolicy -StartAction PowerOn -StartOrder 2 -StartDelay 300 -StopAction GuestShutDown -StopDelay 300
In order to disable autostart for a VM, you need to set the StartAction parameter to None:
Get-VM hq-dc01 |
Get-VMStartPolicy |
Set-VMStartPolicy -StartAction None
Configure VM Shutdown Action
You can also config what action should be performed when the ESXi host shuts down. For example, to gracefully shut down the guest operating system, use the following command:
Get-VM hq-dc01 |
Get-VMStartPolicy |
Set-VMStartPolicy -StopAction GuestShutDown
Here are other available values:
- GuestShutDown — gracefully shut down the guest OS (requires VMware Tools);
- PowerOff — immediately power off the VM;
- Suspend — save the VM state and suspend it.
Note. VM Autostart policies are supported on standalone ESXi hosts. In vSphere HA clusters, VM restart behavior is managed by HA rather than VM Autostart settings.

Managing Autostart with ESXi Shell
Also, you can enable autostart manager from the ESXi shell:
# vim-cmd hostsvc/autostartmanager/enable_autostart 1

List the boot order and other AutoStart parameters for VMs on an ESXi host:
# vim-cmd hostsvc/autostartmanager/get_autostartseq

Note. While ESXi Shell allows you to enable AutoStart and view the current startup sequence, modifying VM startup order and advanced AutoStart settings from the command line is significantly more complex. In most environments, we recommend using the ESXi Host Client/PowerCLI in order to manage VM startup order, delays, and shutdown actions.
Get the default VM startup setting on a host:
# vim-cmd hostsvc/autostartmanager/get_defaults
(vim.host.AutoStartManager.SystemDefaults) {
enabled = false,
startDelay = 120,
stopDelay = 120,
waitForHeartbeat = false,
stopAction = "powerOff"
} How to Automatically Start VMs on VMware Workstation
VMware Workstation Pro includes an AutoStart feature that can automatically power on selected local VMs when the Windows host starts.
Enable VMware Autostart Service

Open the services.msc console and change the startup type to Automatic for the VMware Autostart Service;
Configure VM Startup Order in Workstation
- Launch VMware Workstation Pro;
- Right-click My Computer > Configure Auto Start VMs;
- Select the VMs that you want to start automatically and set the startup order.

- Autostart can only be enabled for VMs in the root folder. If you don’t see a specific VM in the startup list, make sure it is the root folder.

Keep in mind that the VMware Autostart Service powers on VMs automatically, but it does not provide the same guest shutdown sequencing options available on ESXi hosts.
Fix AutoStart Errors in Workstation
In some cases, the error message may appear when saving the AutoStart settings:
Failed to update AutoStart configuration. Ensure that the vmAutoStart.xml file exists and you have permissions to write this file.

In this case, make sure that the user account that is used to start the VMwareAutostartService service has write permission to the %ALLUSERSPROFILE%\VMware\VMware Workstation\vmAutoStart.xml file.
Run VMs Automatically with Batch Script
You can run any virtual machine by creating the following batch file AutoStartVM.bat. This method can be useful on older VMware Workstation versions that do not support the AutoStart feature:
start "" "C:\Program Files\VMware\VMware Workstation\vmrun.exe" -T ws start "D:\VM\TestVm1\TestVm1.vmx" nogui
timeout /t 40 /nobreak >nul
start "" "C:\Program Files\VMware\VMware Workstation\vmrun.exe" -T ws start "D:\VM\freebsd2\freebsd2.vmx" nogui

The second line of code is used to add a 40 second delay before the second VM starts. You can copy this file to the desktop (and run it manually by double-clicking it), add it to the Windows Startup, or run it through the Task Scheduler job.
What is VMware VM AutoStart?
VM AutoStart is a feature that automatically powers on virtual machines after an ESXi host or VMware Workstation host starts. It can also control VM startup order, delays, and shutdown behavior.
Does VMware enable VM AutoStart by default?
No. Both VMware ESXi and VMware Workstation have AutoStart disabled by default. Virtual machines must be started manually unless AutoStart is configured.
What is Startup Delay in ESXi?
Startup Delay specifies how long ESXi waits before powering on a VM. The default value is 120 seconds and can help ensure dependent services are fully available before additional VMs start.
What is Shutdown Delay?
Shutdown Delay determines how long ESXi waits for a VM to shut down gracefully before moving to the next VM during host shutdown. The default value is 120 seconds.
Can I configure default AutoStart settings for all VMs on an ESXi host?
Yes. In the Autostart settings page, click Edit Settings and enable AutoStart globally. You can configure default startup delays, shutdown delays, and stop actions for all VMs.
Do individual VM settings override global AutoStart settings?
Yes. VM-specific AutoStart settings take precedence over host-wide default settings.



these command no longer work on esxi 8 and the latest PowerCLI
–VMname * | Select-Object VMname, AutomaticStartAction
can you please check and advise?