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

1

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.

Coderer

Posted 2017-11-27T14:20:39.387

Reputation: 1 316

Your VMs are being managed by vCenter. So you have to do all your configuration through vCenter or ESXi. Despite understanding what you are asking, your question is confusing, almost to the point I am not postive I actually do know what you are asking. – Ramhound – 2017-11-27T14:24:49.553

You're right, @Ramhound, the intent of the question was unclear. I have edited to add some more detail and screenshots of the stuff that works. Hopefully this makes more sense. – Coderer – 2017-11-27T14:41:43.250

On my instance of vSphere, I can decrease the priority until it is at the bottom of the pile, and then when I decrease once more, it sets it as manual start. Are you able to do this? – Shiffle McDoobles – 2017-11-27T14:50:55.873

If you remove the VM from the inventory and then add it back, the Autostart order priority, should revert back to being unset. – Ramhound – 2017-11-27T14:52:26.933

@ShiffleMcDoobles, when I try to "decrease priority", I get an error message, "Failed - A specified parameter was not correct: vim.host.AutoStartManager.AutoPowerInfo.startOrder", regardless of which machine I pick. It does change the priority, though, and if I do it on Priority #1, it changes to "Unset". This appears to persist through a reload of the web interface. If you make this an answer, I'll accept it. Thanks! – Coderer – 2017-11-27T16:08:59.303

Answers

3

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.

Shiffle McDoobles

Posted 2017-11-27T14:20:39.387

Reputation: 220

1Thanks, Shiffle -- I couldn't find the "VM Startup/Shutdown" section in vSphere, and it never came up when I was looking for documentation about autostart. Maybe it's a terminology issue; "autostart" is used in ESXi while "Automatic Ordered" and "Automatically start" is the wording used in vSphere. – Coderer – 2017-11-27T16:33:02.900

In the 6.7 Web client, the page has been renames to Manage->System->Autostart – namezero – 2018-11-12T07:13:22.543

0

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: http://sakananote2english.blogspot.com/2012/04/power-on-vm-with-command-line-at-vmware.html

Yvon

Posted 2017-11-27T14:20:39.387

Reputation: 101

-1

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.

jamesdlin

Posted 2017-11-27T14:20:39.387

Reputation: 1 973

Why the downvote? Is some part of this incorrect? – jamesdlin – 2017-11-29T17:25:58.107