Skip navigation

Installing VMware Infrastructure - 11 Oct 2007

In last month’s article, I discussed the two primary benefits (performance and higher consolidation rates) of using VMware ESX Server as your virtualization platform. This month I’ll cover the installation of ESX and the necessary steps to get you up and running.

Before you purchase anything, go to http://www.vmware.com/support/pubs/vi_pubs.html and download the hardware compatibility guide for ESX. If you’ve already purchased your server and it doesn’t appear on the hardware compatibility list, it still might work with your server hardware, but it won’t be officially supported by VMware. If you want to run an x64 Windows Server guest on your host, make sure your server is capable of x64 virtualization. Most server hardware vendors have a guide that will list which servers are capable of running x64 guests. Both the processor and the BIOS must support x64 virtualization in order to run an x64 guest on the host. If you plan to use the Virtual Infrastructure Starter Package the host will be limited to 8GB of memory, and you can only store virtual guest images on locally attached storage or a Network Attached Storage (NAS) device.

The type of guests you plan to run on your server will have a significant impact on the type of drive array you'll use on the host. For example, if you plan to run a SQL Server 2005 guest that has high transaction volume, consider creating a RAID 1 or 10 array for your SQL Server Logs and a RAID 5 or 10 array for the data portion of the SQL Server database. When possible try to use the newer Serial Attached SCSI (SAS) drives for the best guest performance.

I typically create a single RAID 5/10 array if I don’t anticipate any heavy logging activity with a virtual guest running Exchange Server or SQL Server. A RAID 10 array will give you the best performance with the most fault tolerance, but it also has the most overhead. Of course with a single RAID array on the host, all the virtual guest files are stored on this array.

If an Exchange or SQL virtual guest will generate heavy log activity, I create two RAID 1 arrays and one RAID 5 array. I install ESX and the guest’s C drives on the first RAID 1 array, a guest’s server Exchange/SQL Log files on the second RAID 1 array, and the remaining guest drives on the RAID 5 array. If the host is connected to a SAN, I usually configure the host with a single RAID 1 array and only install ESX on the RAID 1 array because the guest files will reside on the SAN.

After you purchase VMware, you'll receive an email with the link to register and download the software. You must activate your ESX server by installing a license file on the ESX host. Create an account (or use an existing one) and register the license key at the License Activation Code link on the VMware Product Registration page at http://www.vmware.com/vmwarestore/newstore/product_register.jsp. Access and activate your licenses on the VMware Web-based license portal at http://www.vmware.com/download/licensing.html. For detailed instructions on the license file activation process, see the license portal online Help. Keep the license file in a safe place, because it must be installed on the ESX host after you complete the installation.

As of this writing, the current ESX version is 3.0.2. After you burn the ISO image to CD, install it on the host and boot to the ESX CD. Be sure to create your RAID array before you install ESX. I typically accept the disk partition sizes that ESX creates by default during the installation process. You are prompted with a few simple questions such as the host IP’s address configuration, root password, time zone, and DNS name. In the Time Zone section, I clear the box that says the system clock uses UTC time; otherwise your ESX server time will be off regardless of the time zone you selected during the installation. During the installation, you can specify a Fully Qualified Domain Name (FQDN). If you’re running Windows DNS servers, consider creating an A Record entry for the ESX host, to make it easier to access the ESX host in the future. After the installation is complete, download any patches for the version you just installed. The patches for 3.0.2 are available at http://www.vmware.com/download/vi/vi3_patches_302.html. Follow VMware’s instructions for the patching process. Although the patch utility lets you install the patches in any order, I've heard of some problems installing certain patches out of order. Therefore, I suggest installing the patches sequentially starting from the oldest to the newest patch. That way you should avoid any conflicts with earlier versions of ESX files.

After you’ve download the patches, you’ll probably want to get a copy of Putty and WinSCP. Putty lets you connect to the VMware console from a remote computer, and WinSCP lets you copy files from any Windows machine to the ESX host. If you want to allow remote root access from a remote computer via Secure Shell (SSH), you must edit the firewall configuration file on the ESX server to allow remote root access. To allow remote root access from Putty complete the following steps:

1. Login as root on the local console.
2. Change to the /etc/ssh folder.
3. Edit the file sshd_config using the vi editor with the command vi sshd_config.
4. Using the arrow keys move down to the line "PermitRootLogin no."
5. Press :e i to edit the file, and place vi in insert mode. Change the line to read "PermitRootLogin yes".

6. Press Esc :w (this saves the file); :q (this quits vi)
7. Then restart the sshd service by typing

service sshd restart

Now you’re ready to install the Virtual Infrastructure Client (VIC) on a workstation. The VIC allows you to manage the ESX host and add/modify/delete virtual server guests. It’s very similar to the management consoles that come with Virtual Server 2005 and VMware Server. To install the VIC, open a browser, enter the IP address of the ESX host in the browser address line, and click the link to download the VIC. After you install the VIC on a Windows machine, enter the root password to connect to ESX.

Install the license file by either placing the license file on the host or centrally managing it with a VirtualCenter Management Server. To install the license file directly on the host, start the VIC, click your ESX host server, Configuration Tab, Licensed Features, and click Edit, which is directly to the right of License Sources. Select Use Host License File and upload the license file. The features of the license file should be displayed after you upload the file.

I suggest that you create some base images for any guests you plan to run on ESX. Typically this will include at least a 32-bit version of Windows Server 2003 and a x64 version of Windows 2003. I usually create a base image with a 20GB C: drive for each base image. Unlike Virtual Server 2005 and VMware Server, ESX forces you to preallocate all the disk space on any disk you create, so the disk requirements on ESX may be higher than you’re used to. Make sure to install the OS with the latest service pack and get all of the critical updates for the OS, but do not join the domain.

After the base images are created, you can clone these images to quickly start up any new servers. Make sure to use the vmkfstools –i command at the ESX console to clone any disk images. Do not use the Linux cp (copy) command to clone disk images as this may corrupt the images. To create a new server using a base image perform the following steps:

1. Create the new server guest using the VIC. Create a very small (1MB) C: drive for the guest.
2. Clone the base image using the vmkfstools –i command and move the disk file to the folder where the new guest was created.
3. Edit the properties of the new server guest, then delete the original C: drive and add in an existing drive using the image file that was created using the vmkfstools cloning process.
4. Start up the new guest.
5. Change the name of the guest and assign a static IP to the guest. Reboot. 6. Join the new server to the domain.
7. Create any additional drives for the new server guest as necessary.

Using this technique you should be able to bring up a new server guest within 20 minutes. To start any virtual guest automatically when the ESX host is started, start the VIC, select your host server in the right window, click the Configuration Tab, click Virtual Machine Startup/Shutdown, click Properties and move the appropriate machines to the Automatic Startup Section.

Congratulations! You’re up and running on ESX. Happy virtualization!

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish