NSF logo

Cloud Computing Lab vSphere

Setting up Auto Deploy AutoDeploy Image

VMware Auto Deploy Administrator’s Guide: http://labs.vmware.com/wp-content/uploads/2010/08/autodeploy_fling.pdf

Required client/server resources:

  • Server 2008 R2 box with ADDS, DNS and DHCP
  • Server 2008 R2 box to serve as ADC
  • Server 2008 box to host the TFTP service and vCenter Server/vSphere Client
  • ESXi 5.1 server
  • PXE bootable client workstation(s)

Required implementation software:

Optional (but helpful) software:

Please Note: The security settings in place in server deployments of internet explorer can make browsing to various websites to get the software you need a headache. For security purposes it would be wise to obtain all the necessary software on a different workstation and import them through the use of removable media. If convenience is important, however, we suggest using an alternate browser – and the 7-zip file manager utility available from (http://www.7-zip.org/) provides a speedy alternative to unzipping archived folders in the usual manner.

up arrow

Server Setup
  • In order to prepare the auto-deploy server, we have to set up TFTP. The TFTP feature provided by windows server 2008 doesn’t get along well with vCenter and vSphere, so we opted to use the TFTPd64 application (available from http://tftpd32.jounin.net/tftpd32_download.html). To configure TFTPd64 once it’s installed, begin by creating a folder named “TFTP_Root” in the root directory of C:\ . Next, open the application and click the TFTP Server tab, then click Options and ensure that PXE Compatibility is checked. Leave the application running.
  • Be sure to create firewall rules that allow tftpd64.exe to touch the greater network!
  • Next, insert the vCenter / vSphere media and run the autorun executable if it doesn’t do so automatically. In order to install vCenter Server, the installations of .NET framework 3.5SP1, Windows Installer 4.5, vCenter Single Sign On and vCenter Inventory Service are all required. While attempting to install vCenter Server itself will automatically install all the prerequisite software, if problems present then individual installation and configuration is sometimes a necessity.
  • In the case of our test environment, we opted install a SQL Server 2008 Express instance.
  • When prompted, we checked the Use SYSTEM Account box and supplied the FQDN of the TFTP/auto deploy server.
  • Since only a single vCenter server was being used, we opted to click the radio button that would Create a standalone VMWare vCenter Server instance.
  • We accepted the default port numbers. Changing them depending on your security policy and network setup is left to the discretion of the network administrator. Increasing the number of ephemeral ports in likely not a necessity, but in our case we opted to check that box.
  • Since our test environment is on the smaller scale, we selected the first Small radio button when determining our Inventory Size.
  • Creating a username and password for vCenter Single Sign On was the next step. In our case we used the usual combination of Administrator and P@$$w0rd.
  • With those steps completed, we installed and configured the vSphere Client. When running the client, supplying the FQDN or IP address of the TFTP/auto deploy server and checking the Use Windows Session Credentials box was sufficient, since vCenter Server was running locally. One irregularity that arose was the fact that after each shutdown or reboot of the server, the services necessary for the vSphere client to successfully connect would not start automatically and had to be manually activated before the fact. A fix for this has not yet been established.
  • Download and install VMWare PowerCLI (dropbox URL: http://dl.dropbox.com/u/VMWare-PowerCLI-5.1.0=-793510.exe). This package will provide both the 32- and 64-bit versions of PowerCLI, so be sure to rename the correct version to something obvious in order to avoid mistakes.

Setting up Auto Deploy
  • Once the TFTP server is configured and vCenter / the vSphere client are installed, preparing for auto deploy can begin. First, open windows powershell and input the command “Set-ExecutionPolicy RemoteSigned”. This will enable you to apply commands from PowerCLI and administer auto deploy in the GUI.
  • Second, download the Auto Deploy GUI fling from VMWare (obtainable at http://labs.vmware.com/flings/autodeploygui - be sure to select the correct version in the drop-down box!) and install it.
  • Next we need to provide the necessary TFTP boot information. To get it, go into the Home menu in the vSphere Client and click the Auto Deploy button (the green arrow). There should be a link that reads “Download TFTP Boot ZIP” (NOTE: Be sure to go into internet explorer and click Tools>Internet Options>Security>Custom Level and then select the radio button that enables file downloads, or you will be unable to obtain the file!). Once the file is downloaded, unzip it and place its contents in the TFTP_Root folder you created earlier.
  • Next, you need to use the Vib2Zip application downloaded with the ESXi customizer (dropbox URL: dl.dropbox.com/u/97021501/ESXi-Customizer-v2.7.1exe) to convert the NIC drivers packaged in the .vib file downloaded from dropbox (dropbox URL: http://dl.dropbox.com/u/97021501/net-e1001e-1.0.0.x86_64.vib) into .zip format.
  • In the vSphere Client’s home menu, click the Auto Deploy button. In the Software Depot tab, right click the upper frame and select Add .zip Depot. Navigate to the folder containing your ESXi depot and add it, then do the same with the newly converted drivers. Following these steps, right-click again and select Add HA Depot to get the required files from VMWare’s servers.
  • In the Image Profile tab, right-click the VMWare-ESXi-799733-standard depot and select Clone to create an editable copy of the depot with whatever name you choose. This will be the image that will ultimately deploy to the PXE booted workstations. Be sure to specify that the copy is community-supported in the drop-down menu so that you can add non-VMWare software packages to the image. When the client asks if you wish to commit this change, click NO.
  • Right-click the new image and select Add Software Packages, then specify the drivers you converted from the .vib file and commit the change.
  • In the Deploy Rule tab, right-click the upper frame and create a new rule, specifying the domain on which the rule will be active and the IP range corresponding to the DHCP scope you set aside for PXE booting your workstations.
  • After the rule has been created, right-click it and set it to Active.
  • Attempt to PXE boot a workstation. If the auto deploy configuration was successful, a dialogue should automatically engage, ending with “Sleeping for five minutes and then rebooting.” Now that the hosts and deploy environment are provisioned, you are ready to create answer files in order to proceed to the next deployment steps.

up arrow

Integrating the vCenter Server Appliance with NETLAB

Setting up a trunk line between the large ESXi server and NETLAB:

  • At least one NIC needs to have a cable running from the ESXi host to the control switch associated with NETLAB. This must also be configured as a trunk line in order to allow proper communication between NETLAB and the contents of the vCSA’s datastore.
  • Console into the control switch using the appropriate credentials (you should use the defaults suggested by the NETLAB documentation to maintain proper automation and support compatibility).
  • Input the following commands:
    • interface x/x
    • description inside connection for ESXi Server
    • switchport mode trunk
    • switchport nonegotiate
    • no switchport access vlan
    • no shutdown

Create a NETLAB+ user on the appliance:

  • Login to the appliance’s CLI with the username and password you configured when you built it out from .ovf
  • Enter useradd –m NETLAB
  • To change the new user’s password, enter passwd NETLAB. You will be prompted to enter and then confirm the new password for the NETLAB user

Create a NETLAB role in the appliance

  • Enter the appliance through vSphere and click on Administration > Roles.
  • Right click the Administrator role and select Clone, entering NETLAB for the new role object’s name.
  • Right-click on the NETLAB role and select Add Permission.
  • In the window that appears, click Add and then select the NETLAB account and click OK.
  • Back in the Assign Permissions window, use the drop-down menu on the right to select
  • NETLAB and associate the cloned administrative permissions to the NETLAB user you created earlier.

Create a new vSwitch and bind it to a physical NIC

  • In the appliance’s vSphere view, navigate to Inventory > Hosts and Clusters and click on the ESXi host you want to configure in the left pane.
  • In the main pane, click Configuration and then click Networking in the Hardware Group box, then click Add Networking in the upper left.
  • To allow the ESXi host kernel to communicate with the inside NETLAB network, select the VMkernel radio button and click next.
  • Select the Create a Virtual Switch radio button, then select the physical NIC that’s associated with the trunk line to the control switch.
  • In the next screen, set the Network Label to “NETLAB Inside” and check the box labeled “Use this port group for management traffic”.
  • Enter a unique IP address from the table that appears on page 77 of NetDevGroup’s “Remote PC Guide Series – Volume 2” document.

up arrow