Sunday, March 17, 2013

Protip: Autostart your vCenter Server Appliance

If you're like me, you have a simmering love / hate relationship with the vCenter Server Appliance. It goes something like this:

  • Removes the need for a Windows host for your vCenter

  • No vSphere Update Manager
In my opinion, this makes the vCenter Server Appliance great for lab and small environments, but if you're running a bigger deployment you'll want to stick with the traditional vCenter Server on a Windows host. Until VUM is an option (and VMware would be foolish to not add this feature ASAP), the vCSA is not the droid you're looking for.

But the point of this post is this: regardless of what platform you're using for your vCenter Server, you'll want to set that VM to start automatically. By default, your VMs are configured to start manually. Consider a lab environment with two ESXi 5.1 hosts. You may want to shut your lab down at the end of each day to extend your trial license save energy. That's cool.
vCenter Server Appliance, stopped.

When you start your lab up the next morning, your vCenter Server Appliance won't start up unless you've told it to. In that case, you'll need to use the vSphere Client (which is quickly becoming old and busted when compared with the new hotness of the Web Client) to start up vCenter. And if you're a Mac / Ubuntu / Fedora / anything-but-Windows user like me, that's a pain.

Instead, tell that VM to start automatically. Here's how:

We'll start with enabling your VM to start up automatically on a single ESXi 5.1 host.
  1. Connect to the host with the vSphere Client.
  2. Select the Configuration Tab, and find the Virtual Machine Startup / Shutdown item from the Software section of the screen. You'll see a list of the virtual machines that are registered to the host, and a summary of their startup / shutdown behavior.
  3. Click the Properties... link in the upper right to get to the Virtual Machine Startup and Shutdown screen.
  4. The Virtual Machine Startup and Shutdown properties screen.
    To have your vCenter VM start up automatically with your host, check the top box. Doing so will allow you to configure your VMs in the next step.
  5. Click your vCenter VM once to select it, then click the Move Up button until the VM is listed under the Automatic Startup section.
  6. Click OK, and you're set.
Now when your restart this particular host, the vCenter VM will start automatically. 

Duplicate and triplicate, dead from the neck up.
Side note: I've noticed (twice in the last three days, in fact) that once you set the startup options for a VM, the VM will show up three times in the Startup / Shutdown screen. Clicking away, then coming back makes the problem go away, and it doesn't have an effect on the operation of your VM. Just a weird bug.

So let's talk about what we've done for a minute. We just configured a single ESXi host to automatically start up the VM that runs your vCenter Server. But what happens when that VM is vMotioned to another host in your cluster? Will the changes we just made follow the VM?

Short answer: no. So we need to do something different to make sure that this VM starts up automatically no matter when it ends up. ....And since it's nearly 1AM, we'll leave that for another day.