Home > Uncategorized > vSphere – Virtual Machine Startup and Shutdown Behavior

vSphere – Virtual Machine Startup and Shutdown Behavior


In my home lab I have a couple of machines that I want to start up as soon as the host starts up and in a particular order, that’s the AD controller followed by the vCenter Server server. Both are Windows virtual machines but the procedure works with any virtual machine actually.

The tip is described in the vSphere Basic System Administration PDF document available at VMware.com, page 140.

  1. In the inventory, display the host where the virtual machine is located.
  2. Select the host and click the Configuration tab.
  3. Click Virtual Machine Startup/Shutdown, and click Properties
  4. Select Allow virtual machines to start and stop automatically with the system.
  5. Click Continue immediately if the VMware Tools starts to have the operating system boot immediately after VMware Tools starts.
  6. To have the operating system start after a brief delay, enter a Default Startup Delay time. This delay allows time for VMware Tools or the booting system to run scripts.
  7. Select a shutdown action and enter a Default Shutdown Delay value to delay shutdown for each virtual machine by a certain amount of time. This shutdown delay applies only if the virtual machine has not already shut down before the delay period elapses. If the virtual machine shuts down before that delay time is reached, the next virtual machine starts shutting down.
  8. Use Move Up and Move Down to specify the order in which the virtual machines start when the system starts.
  9. To configure user-specified autostartup and autoshutdown behavior for any virtual machine, select the virtual machine and click Edit.

In my case my Virtual Machine Startup and Shutdown Behavior looks like this:

  1. My AD controller starts first, then as soon as the VMware Tools starts but with a maximum delay of 60 seconds then,
  2. The second VM start up (vCenter Server).
  3. Then once all VMs in the Automatic Startup section have all started up, the system carries on with the VMs in the Any Order section. In my case I have a third VM which is not tied to a particular order and has different settings than the defaults.

About these ads
Categories: Uncategorized
  1. habibalby
    May 17, 2010 at 16:31 | #1

    Hello,

    Great post, last month i have used this procedure for a major shutdown in our datacenter to replace a faulty UPS.

    Really great feature and the greatest thing it has to be done right and in order. If the order is misused then reboot once again and the time will start clocking:)

    1. In my case, VMs to SAN Switches shut-down.
    2. SAN Switches, SAN Storage, then hosts and VMs startup order.

    Very important to take care of when you are in Blade Servers Environment. The enclosure will start the Blade Servers immediate as soon as it gets the power, by the time the SAN Switches and SAN Storage didn’t comes up yet!!! Really important to consider.

    Thanks,
    Hussain

    • deinoscloud
      May 17, 2010 at 19:24 | #2

      Hi Hussain, thx for your comment.
      Indeed Startup/Shutdown feature is many times overlooked but IMO that stuff should be elevated to the VMware Cluster level as an option to HA/FT.

      The issue you’re referring to is exactly what HA/FT should take care of in future releases. We need HA/FT to be ‘aware’ of the hardware/software devices around the VMware Cluster.
      By using the industry standard CIM and based on simple management information such ‘I’m alive!’, HA/FT would have a better overview of what VM can be started up on which host.

  2. Kurt Johannessen
    May 18, 2010 at 17:01 | #3

    Funny doing this is not supported under HA
    See

    http://www.vmware.com/pdf/vsphere4/r40/vsp_40_availability.pdf

    Page 22

    NOTE The Virtual Machine Startup and Shutdown (automatic startup) feature is disabled for all virtual machines residing on hosts that are in (or moved into) a VMware HA cluster. VMware recommends that you do not manually re-enable this setting for any of the virtual machines. Doing so could interfere with the actions of cluster features such as VMware HA or Fault Tolerance

    Also be aware of

    Virtual machines do not shut down gracefully

    http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1008182

    • deinoscloud
      May 18, 2010 at 19:22 | #4

      Hi Kurt, thx for commenting.

      Yes indeed the feature gets disabled when the host is moved in a HA cluster BUT although it is disabled it still does the startup/shutdown for the VMs that were configured before the host was moved into a HA cluster. Weird!

      And yes indeed at the moment the automatic startup/shutdown is not 100% bug free… I use it in my home lab but do not recommend it in a prod environment at the moment!

  3. Newton
    May 22, 2010 at 17:33 | #5

    Hello Sir,

    Thank you for the superawesome blog.

    I am a rookie with VMWare and am in the process of setting up a lab inside by home for ESXi. I had a few questions and am taking the liberty to ask them here :

    1. What kind of affordable hardware should I buy ( to install baremetal ESXi)? I can afford upto $1500. I have heard that ESXi will run only on supported platforms. Should a HP multicore desktop do?

    2. Howdid you simulate a SAN FC connection? I stumbled upon Starwind software for iSCSI so hopefull that should simulate iSCSI for me.

    3. Should I get multiple NIC cards for the dektop I purchase? Looks like all ESXi blades have a lot of NIC cards and is probably important to have multiple NIC cards to simulate a somewhat decent DC environment?

    4. Is a DNS server a necessity?

    5. What else should I consider?

  4. Newton
    May 23, 2010 at 17:28 | #7

    Thank You. That is tremendously helpful. You rock.

  5. mike
    February 7, 2011 at 20:29 | #8

    Hi,

    We have a ton of VMs on a physical host, 2/3 of them are ‘powered off’. At the end of any day, the set of VMs powered on or off is different than the previous day.

    In the rare event of losing power to the physical host, I would like the default behavior to be: “whatever the state was before the physical power outage”. In other words, if the VM was ‘powered down’ before the power outage, I would like it to REMAIN powered down when power is restored. Similarly, if a VM was ‘powered on’ before the power outage, it should try to power back on when the physical power is restored.

    Clearly this could be accomplished by making sure that every time we power a VM on/off, that we simultaneously make the change on the physical host->configuration->Virtual Machine Startup and Shutdown table.

    But that’s a pain, I don’t want the values to ever be out of sync. Is there an option to simply have it retain the previous desired state of power, without changing this in a separate table?

  6. Mahmood
    February 15, 2011 at 01:34 | #9

    Great great demo.

    • sunithdas
      March 21, 2014 at 12:20 | #10

      Sir,I logged in through Vsphere and in the host i could find that out of 6 machines that are installed only 5 machines have booted and the 6th machine is not booting .the settings in vsphere is good and it all the machines are given time delay to start .but this machine alone is not starting .What could be the reason and how can i restart it.

  7. sunithdas
    March 21, 2014 at 12:22 | #11

    appreciate if anyone could guide me through to solve this issue

  8. sunithdas
    March 21, 2014 at 15:48 | #12

    i tried restarting the server itslef still the 6th machine is not starting what could be the problem …how can i solve it

  1. May 22, 2010 at 22:30 | #1
  2. December 22, 2010 at 15:45 | #2
  3. December 30, 2011 at 13:59 | #3

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s