VMware vSphere 5.1 Cookbook
上QQ阅读APP看书,第一时间看更新

Testing Auto Deploy

Now that we have deploy rules created, let's boot up an ESX Server in the subnet and check if it is able to fetch and load the image from the Auto Deploy server.

How to do it…

Start the machine intended to host the ESXi server. If everything has been configured correctly then it will PXE-boot and will start loading the VIBs into from the cache to the server's memory.

Once it is done, it will load all the VIBs to the memory and it will finish booting up the ESXi server.

As per the deploy rule, it should add the host to the Cluster-21-25 cluster. You should also, see it applying the Host Profile to the ESX Server.

How it works…

Now that we learned how to Auto Deploy an ESXi server, it will be beneficial to understand what happens in the background during the first and the subsequent server boot-up operations.

First boot

When a machine chosen to be provisioned with ESXi is powered-on, it does a PXE boot by fetching an IP address from the DHCP server. The DHCP scope configuration option 66 and 67 will direct the server to contact the TFTP server and load the bootable gPXE image and an accompanying configuration file. The configuration will direct the server to send an HTTP Boot Request to the Auto Deploy server. The HTTP Boot Request will contain the server attributes such as the IP address, MAC address, vendor details, and so on.

On receipt of the HTTP Boot Request, the Auto Deploy server will check its rule engine to see if there are any rule criteria that match with the host attributes. If it finds a corresponding rule then it would use that rule from the active rule set to load an appropriate ESXi Image from an Image Profile.

Subsequent boot

After the host is provisioned and added to the vCenter Server, the vCenter Server holds the details of the Image Profile and the Host Profile associated with the host object, in its database. Hence during a subsequent reboot, the Auto Deploy server doesn't have to leverage its Rule Engine again. Instead, it would use the information from the vCenter database.

If for whatever reason the vCenter Server is unavailable then the Auto Deploy Rule Engine is engaged to determine the Image Profile and the Host Profile to be used. Since vCenter is unavailable, the Host Profile cannot be applied to the server.