Auto Deploy is probably one of my favorite new features of vSphere 5. The ability to build an ESXi image (with Image Builder), and automate the deployment of stateless hosts quickly and seamlessly just gives me a warm fuzzy.
So how do we set this up?
There are two options:
- Install Auto Deploy from the vCenter DVD, set up an external DHCP and TFTP server, setup your images, and go
- Deploy the vCenter Server Appliance (vCSA), configure the existing DHCP server, start the DHCP and TFTP servers, setup your images, and go.
I went with option number 2, since there was that much less to install. Just configure and run!
I started by adding a NIC to the vCSA, since I didn’t want my management network also serving up DHCP. Since everything I have at the moment in the lab is virtual, I chose to set up a deployment vSwitch just for this purpose. In your lab or production environment, you may attach that deployment network to an existing network.
I copied the ifcfg-eth0 file in /etc/sysconfig/networking/devices/ to ifcfg-eth1 (the 2nd NIC will be eth1) and edited the new one
# cp /etc/sysconfig/networking/devices/ifcfg-eth0 /etc/sysconfig/networking/devices/ifcfg-eth1
# vi /etc/sysconfig/networking/devices/ifcfg-eth1
It should look something like this (I’m using 10.1.1.0/24 as my deployment network):

Then I created a new symlink in /etc/sysconfig/network to the new file
# ln -s /etc/sysconfig/networking/devices/ifcfg-eth1 /etc/sysconfig/network/ifcfg-eth1
This provides a persistent configuration for the network device should you reboot your vCenter Server Appliance.
That finishes up the Deployment Network configuration. Now we need to configure all of the other services.
I started with DHCP. In poking around the /etc/ directory on the appliance, I found that VMware kindly provided a mostly pre-configured configuration template for the DHCP server: /etc/dhcpd.conf.template

So, being kind of lazy, I simply backed up the existing dhcpd.conf file:
# cp /etc/dhcpd.conf /etc/dhcpd.conf.orig
And then copied the template into place as the config:
# cp /etc/dhcpd.conf/template /etc/dhcpd.conf
And got to editing. My final config file looks like this:

Once that’s done, you can start the DHCP server:
# /etc/init.d/dhcpd start
Then you need to start the TFTP server:
# /etc/init.d/atftpd start
At this point, I have an ESXi VM PXE booting and doing all the right things – SUCCESS!.
I don’t have Auto Deploy configured from PowerCLI quite yet. I’ve got a default image loaded up, but without Auto Deploy rules waiting, it’s a wash. I’ll update when I have things set up more completely. You probably know more about PowerShell and PowerCLI than do I, but this is what I’m getting (even right after I Connect-VIServer). Something’s wacky with PowerCLI communications:

I’ll get it figured out, but until then, take this as a start to your Auto Deploy adventures with the vCenter Storage Appliance!
***EDIT***
Well, stilly me figured out the “cannot connect” problem with PowerCLI. Turns out the Auto Deploy services weren’t started on my vCenter Server Appliance. A quick jaunt to https://:5480, then to the Services tab, then clicking the magic “Start ESXi Services” button resolved that one. I think the “Stopped” status for ESXi Autodeploy was what gave it away 🙂 I’m off and running again!