How can I disable autostart for a VM in ESXi or vSphere?

I have some VMs running on an ESXi host, managed by vCenter, all on version 6.5.x. I have some VMs configured to autostart, which works fine, but I need to stop them from starting automatically.

There is no mention of autostart anywhere in the vSphere Web Client, in either the Flash or HTML5 versions. I have found instructions for enabling/disabling Autostart support at the host level, from ESXi. I have also found how to display autostart priority in the VM listing, on the ESXi web interface only:

ESXi Autostart column in VM list

In the ESXi web interface, I have a menu item for Autostart with only "increase priority" and "decrease priority":

Autostart menu on ESXi

Neither menu item will turn autostart completely off.

I have not found any instructions how to disable autostart for a single VM. I need to stop some of the VMs that currently show an integer under "Autostart order" in the above screenshot from starting automatically -- that is, I'm looking for the menu item that disables autostart for a specific VM, changing the "1" back to "Unset". I'd like to avoid having to SSH into the host directly to fix this, but I will if I have to.

5

3 Answers

Decrease the Priority

As mentioned in my comment; decreasing the priority can set the auto-start of the VM to manual start instead.

  • You can access this setting in Hosts and Clustersby selecting (on vSphere) the host, then clicking the Configuration tab and then selecting Virtual Machine Startup down the right hand side.
  • On the web client, you can access the same by navigating to Hosts and Clusters, selecting the host, then clicking Manage, followed by Settings and finally VM Startup/Shutdown.
2

If you have access to SSH shell, try command:

vim-cmd hostsvc/autostartmanager/update_autostartentry [VMOID] "none" "5" "1" "none" "5" "yes"

The two none actions will remove the entry completely.

To check VM OID's:

vim-cmd vmsvc/getallvms

To check autostart sequence:

vim-cmd hostsvc/autostartmanager/get_autostartseq

Running on ESXi 6.5a

Reference:

If you have a copy of VMware Workstation Pro, you should be able to:

  1. Connect that to your ESXi instance
  2. Right-click on the ESXi host in the library pane.
  3. Choose "Manage VM power actions" ("Manage AutoStart VMs" in older versions of Workstation) from the context menu.
  4. Uncheck the VMs that should not be automatically powered on.
1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like