If you are an administrator, you would want the VMs of your organization to start automatically so as not to hinder production and not to start them manually. To accommodate this privilege, you will have to enable AutoStart of VMs on VMware ESXi and Workstation. In this post, we are going to see how you can do that.
Enable AutoStart of VMs on VMware ESXi and Workstation
If you want to enable AutoStart of VMs on VMware ESXi and Workstation, you must make some changes to your virtual machine. Let’s see how to do this.
Enable AutoStart of VMware Workstation VM
First, let us talk about VMware Workstation Pro. It has the AutoStart feature that allows the machine to start when the Windows host machine starts.
However, before we enable it, we need to check and configure the VMware Autostart service. To do so, open the “Services.msc” app, right-click on VMware Autostart Service, go to Properties, then change the Startup type to “Automatic”, and then click on Start.
Now, you need to open the VMware Workstation, then right-click on My Computer > Configure Auto Start VMs. Select the virtual machine(s) you would want to start automatically, configure the order, and then click Ok.
However, if you don’t see your VM on the list, it must be not be a part of the root folder as Autostart only works for machines that are a part of the root folder.
If you don’t have permission to access the vmAutoStart.xml file, you will get the following error message:
Failed to update AutoStart configuration. Ensure that the vmAutoStart.xml file exists and you have permissions to write this file.
You need to ensure that the account that you are using to enable VMwareAutostartService service should have the write permission over %ALLUSERSPROFILE%\VMware\VMware Workstation\vmAutoStart.xml file.
To do so, go to C:\ProgramData\VMware\VMware Workstation, right-click on vmautostart, click on Properties, go to Security, select the account you want to have permission, then click on Edit, and then check the Write checkbox. Click on Apply > Ok.
After editing the permissions, just go to VMware Workstation and enable AutoStartup. Hopefully, it will work.
Enable AutoStart of VMware ESXi Standalone VM
If your host is standalone, you can configure the ESXi host from the client interface. Follow the steps mentioned below to do the same.
- First of all, you need to sign in to the ESXi Host client web console.
- Now, go to Manage > System > Autostart.
- You need to check the Autostart order, it will be Unset, which means that the Autostartup is disabled.
- Highlight the machine you want to start automatically and click on Enable.
- You can use the Start Later and Start Earlier buttons to set the order of autostart.
To configure the machine more, you need to click on the Configure option and then pick one of the following options.
- Startup Delay: Time (default 120 seconds) before the VM powers on to allow custom services or scripts to boot.
- Shutdown Delay: Maximum time (default 120 seconds) the ESXi host waits to shut down a VM. If the VM doesn’t shut down within this time, it’s forcibly powered off
- Stop Action: Sets the shutdown method at host shutdown (Default: Shut Down). Options include System Default, Shut Down, Suspend, or Power Off. Requires VMware Tools.
- Wait for Heartbeat: Boot sequence proceeds after the host detects the VM’s first heartbeat via VMware Tools
You can also enable Autostart for all machines if you click on the Edit Settings option and set Enabled to Yes. Then configure the default start and stop action and other settings.
Read: How to take a Snapshot in VMware Workstation Player
Enable AutoStart of VMware ESXi vCenter VMs
You might have to use a different approach if the ESXi hosts are connected to the vCenter. You can manage startup settings on a standalone host in vCenter, but they do not transfer with VMs during vMotion to another host.
You can follow the steps below to automate the start action in the vCenter.
- Open the vCenter, select the virtual machine you want to configure, and click on the Configure tab.
- Now, you need to navigate to Scheduled Tasks > New Scheduled Task.
- In the Task name field, you can have the name but make sure to add Power on.
- Set the Run option to After vCenter startup, and in the “with a” field, give a value.
- Finally, click on Schedule the task.
The options for automatic startup and shutdown of virtual machines (VMs) are disabled when an ESXi host is a member of a vSphere High Availability (HA) cluster. This is because HA automatically manages the restart of VMs across hosts in the event of failures, which can conflict with the autostart settings.
Read: How to use Windows Sandbox and VMWare or VirtualBox together
How do I configure auto start VMs in vmWare workstation?
VMware Workstation Pro’s AutoStart feature lets VMs start with the Windows host. You need to enable VMware Autostart Service via “services.msc”, set Startup type to “Automatic,” and start it. Now, open Workstation, right-click My Computer > Configure Auto Start VMs, select VMs, set order, and click OK. We recommend you go through the guide mentioned earlier to learn more.
Read: How to take a Snapshot in VMware Workstation Player
What is autostart ESXi?
The VMware ESXi has the option to autostart the virtual machine when the host starts. You can even set the order of startup or the time after which the guest will start. We recommend you go through the guide mentioned earlier to configure the autostart.
Also Read: Host TPM Attestation Alarm in VMware vSphere.
Leave a Reply