This action might not be possible to undo. Are you sure you want to continue?
HOWTO: PXE Boot ESXi At VMworld this year during my Deploying VMware in a Linux Shop I demonstrated how to PXE boot VMware ESXi and automatically add it to Virtual Center. As promised a long time ago I'm finally documenting everything I did to get it to work. All of the work for this project was really done by an incredible engineer here at VMware named Lance Berc. I'm just putting some more step-by-step to it and making the process easier to find. Thanks, Lance for all of your work on this and the long night just before VMworld trying to troubleshoot issues! The Tools Here's all of the stuff that you'll need to complete this exercise. Start the downloads now. - VMware ESXi (free) - VMware Virtual Center Server - PXE Boot Midwife Scripts (free) - Post boot configuration scripts (free) - VMware Infrastructure Toolkit for Windows (free) - Virtual Infrastructure Perl Toolkit (free) - Windows PowerShell (free) - TFTPd32 for Windows or some other TFTP server (free) - ISO Buster (shareware) - WinRAR (free) - WinImage (free) - Syslinux 3.72 or later (free) The Docs There are two great documents on how to get ESXi to PXE boot and on how to extract the files necessary how to do this. You can get both from the VMware Communities. - PXE Boot How-To - Extraction Process The Process Now that you have all of the necessary documents and software let's begin. In a nutshell this process works by getting a server to PXE boot in a normal PXE environment, download ESXi bits, and then when the server loads it will run a midwife script that will contact a midwife server that assists in the "birth" of the ESXi host by adding it to Virtual Center. Get it - midwife...birth. Yes, Lance has that kind of humor. Here's an overview of the setup. Overall the steps to introduce the new ESXi host to the environment are: 1) Boot ESXi via DHCP/PXE and pass it the address for the midwife server 2) After the initialization the new system sends a birth message to the midwife server 3) The midwife cleans up any previous instances of the server from Virtual Center 4) The midwife uses the Virtual Center API to configure the new system The midwife script is written in Powershell. The code performs these steps: 1) Set ESX password 2) Adds host to Virtual Center cluster 3) Configures virtual switches 4) Configures port groups 5) Adds NFS partitions 6) Adds iSCSI partitions 7) Configures NTP 8) Configures VMotion Obviously the VMware Toolkit for Windows can do a lot more things so feel free to modify the script to do whatever you'd like. Setup the PXE Environment I decided to use Windows for my PXE server. I did this because I was creating a demo to run on my laptop and just wanted 1 Windows server to run Virtual Center, the TFTP server, the midwife, the DNS server, and the PXE server. I also used several Windows based tools for the extraction and troubleshooting. Since I'm using a Mac I ran all of this in VMware Fusion. To keep things a little brief I'm going to assume you can install Windows, configure DNS and Active Directory on it, and install Virtual Center. You're pretty much choosing the defaults. If you do need help here then just email me and I'll see if I can walk you through it quickly.
http://www.gronau.it Powered by Joomla! Generiert: 20 July, 2010, 07:18
tgz file to a folder of your choice (I put it on the desktop). These are the files that actually run the ESXi server.dd. Inside of the pxelinux. Edit the "default" file to look like the following: default http://www.i386.bz2. After the install you'll have an icon on the desktop for Powershell. We'll run it a little later on.0_Update_2-110271. You'll see 3 different tracks when you open the image. Partition 5 contains the ESXi files.txt extension on it you might need to show file extensions to make sure it's not there). Partition 4 holds the booter files.gronau. You'll now have a dd disk image file. launch the VI Toolkit window and issue "GetVICommand". In your boot folder create another folder named "pxelinux. In order for the scripts to run later we'll need to relax the security policy for Powershell or sign our scripts. You'll need more tools for this and it's very important that you put the right files in the right places so pay attention. After the installation completes.0 Next we need to setup the menu that will appear when we PXE boot the host. Download the zip file for the latest version of syslinux and open the zip archive. launch it and then open the ISO image of ESXi installable. I used TFTPd32. Extracting the Files for PXE The hardest part of this whole operation is extracting the right files to the right places to the TFTP server so they all get downloaded correctly.Microsoft Powershell . You can confirm it's installed by opening a command prompt and running "perl -version".5. After downloading and installing the tool.This is the foundation for the VI Toolkit . It's a small package. We'll put that file into place in just a bit. Navigate to /usr/lib/vmware/installer and using Winrar again. The biggest thing you'll need to make sure of is the boot file references "pxelinux. all that's needed is to download and install the tool with the defaults. If you're using a different DHCP server then you can reference the TFTPd32 documentation on how to configure DHCP to reference the TFTP server and provide the necessary PXE information. The last step for the midwife server setup is to unzip the files from the midwife into a folder on the Windows server.cfg". If you get a response you're all set. If everything is working right then you'll see a list of commands that you can use with VMware Virtual Infrastructure. Again.c32 . The midwife server is setup and ready to go.c32 . In the document from Lance that talks about extraction he uses a tool from Access Data called the Forensic Toolkit. extract VMware-VMvisor-big-3. Below is a screenshot of the general settings for tftpd32.This is what our script uses . You'll want to go to the second track (the Rock Ridge track designated by the gold colored RR letters) and extract the install.core\pxelinux. For this lab we'll just relax the security policy with "Set-ExecutionPolicy Unrestricted" as seen below. I created a directory for my new build of C:\tftpd32\tftpboot.it Powered by Joomla! Generiert: 20 July. You can see there aren't very many of them. Here are the settings for my DHCP server.VMware Perl SDK . That's it. Setting up the Midwife The midwife is a set of powershell scripts that are launched by a perl process running in the background.cfg folder create a text file named default (do not put the . To finish out our boot folder we're going to need to get some files from syslinux that will allow our image to actually boot for a PXE install and give us a menu of the different options available to us. .com32\menu\menu. Once you've extracted install. I ended up using TFTPD32 for my DHCP server in order to simplify things in my lab setup. Next let's install the Windows Powershell package. You can also adjust the IP settings to reflect your environment.Now that Windows is ready we need a TFTP server to serve up our image. Use all of the defaults and after a few screens it will be fully installed. Copy the following files from the syslinux distribution to the "boot" folder on your desktop.tgz use Winrar to extract the files from the archive to a folder. fully patched installation of Windows Server then all you really need to do is download the Powershell package and install it with the defaults. If you've done a recent. Inside of it you'll find several partitions. 07:18 . Using WinImage open the dd file that you just extracted. Partition 8 contains a bunch of tools such as VMTools and the Virtual Infrastructure Client. Unfortunately I couldn't find a version that was free or cheap so I used ISO buster instead. With the Powershell base installed you can now install the VI Toolkit for Windows.We use this to launch the process server To install the Perl SDK simply download the executable and run it.VMware Infrastructure Toolkit (for Windows) .0". 2010. In order to get them to run we need to setup 3 things: . We're going to need the ESXi files from Partition 5 (the first partition in the list if opening with WinImage) so go ahead and extract them to a folder on your desktop called "boot".com32\modules\mboot.
mikedipetrillo. This one contains a few other entries that you'll need to edit such as the NAS or iSCSI settings.10.ps1. $VCpassword = 'vmware' $defaultESXPassword = '' #$newESXPassword = $VCpassword $newESXPassword = 'vmware' The last file you'll need to edit is esx-profile. Open a command prompt and type in "perl c:\midwife\configsvc. The next step is to launch the midwife server process. the network settings. To finish things off you'll see ESXi booting.0.html http://www.pl". $VCpassword = 'vmware' #$VC = '172. Leave the default choice selected and then you'll start to see the files being downloaded from the TFTP server. The first one up is esx-master.c32 append vmkernel. This will complete the setup for booting ESXi. If everything goes according to plan you should see something very similar to the demo video from the beginning of this blog.0.tgz (the post boot configuration files) into the boot foler.lance-boot. I hope you enjoy the tip. The last step to prepare the boot folder is to copy lance-boot.gz PBHOST=172. 2010.cim. After you have made the edits to the file copy the entire contents of this boot folder into the folder you created during the TFTP server set (ex. It shouldn't take too long to customize this file to your environment.c32 menu title PXE Boot VMware ESXi timeout 100 label ESXi menu label Boot VMware ESXi kernel mboot. the datastore names.tgz --.environ. # To run as current user: $VC = "localhost".tgz straight over. C:\tftpd32\tftpboot). Configure the Midwife All that's left is to modify the configuration PowerShell files to match what you'd like in your environment. Doing a PXE Boot The first step is to start the TFTPd server.gronau.binmod.ps1. http://www. Just copy lance-boot.120:3333 --. Once you're done it's time to try a run-through.120' .tgz --.it Powered by Joomla! Generiert: 20 July. etc.10.menu.tgz ipappend 2 label Hard menu label Boot from local drive localboot 0 You should edit the PBHOST variable to be the same as the IP address of the host where you just installed the midwife script (usually the Virtual Center server).tgz --. Now boot your target server. Do not extract the files.tgz --. Simply launch TFTPd32 and you'll be ready to go. 07:18 . If it's connected to the same network as where TFTPd32 is running then you should eventually see the PXE boot menu on your host.oem.com/mikedvirtualization/2008/11/howto-pxe-boot. You should edit the top portion of the file to include the Virtual Center server name or IP as well as the administrator account and password.
This action might not be possible to undo. Are you sure you want to continue?
We've moved you to where you read on your other device.
Get the full title to continue listening from where you left off, or restart the preview.