How To: Install a Linux operating system for maximising VMware resources

Installing VMware on a Linux server is a cheap and easy way to get virtual machines up and running. In order to maximise system resources for VMware, an absolutely minimal Linux base operating environment provides the ideal platform to build upon.

Please note: This article was written a while ago now – you’ll see from the references to an e.x.p. build of VMware Server. Whilst these instructions should still work, they may not…

Installing the Operating Environment

Installing Linux is, for the most part, quick, easy and painless. For this exercise, I’ve found probably the best and lightest installation is that of Debian.

Firstly, you’ll need to acquire a copy of Debian. This is pretty easy. For these notes, I’ve chosen to use Debian Linux version 3.1 release 2. Download the “Network Install” CD – it’s only around 110Mb. There’s no point in downloading all eleven CD’s or four DVDs when we’re going to be using a tiny subset of Linux – most of the required packages are on the Network Install CD, and those that aren’t are a small download.

Once you’ve downloaded the CD, boot from it and at the boot: prompt type linux26

Follow the install process; it’s pretty straightforward. Eventually, the install process will be complete, and your server will reboot. At the next boot, a package manager called “aptitude” will start. Press ‘q’ to quit out of this application as (1) it won’t work and (2) we don’t need it.

Next, logged in at root, you’ll need to edit the apt package management lists file, sources.list. It’s located in /etc/apt/sources.list, so just type in vi /etc/apt/sources.list. Delete every line that’s in this file (typing dd in VI will delete the entire line beneath the cursor’s current position), and add in our closest mirror (which happens to be in Ireland). The line you’ll need to add is:

deb http://ftp.ie.debian.org/debian/ stable main

Use :w and :q to write the file and quit the VI application.

Updating the OE and installing VMware dependencies

CAUTION: Your firewall may block downloading executables and the like. You’ll need to ensure that the server you are using is not being filtered.

The commands you’ll need to run are:

apt-get update

This updates the apt package manager to use the mirror we specified earlier.

apt-get install mc ssh

This installs the OpenSSH commands and libraries needed for VMware’s web management module.

apt-get install kernel-headers-$(uname –r) build-essential xlibs-dev

This installs the kernel headers for the version of Linux you have installed; the $(uname –r) command in the middle of this statement ensures that, even if you choose to use an earlier or later version of Linux, you’ll still get the correct headers! Also please note that, although that command looks like it might break across a couple of lines it doesn’t – it should all be entered on one line.

apt-get install libdb2

VMware server requires the libdb2 set of libraries – this ensures we download and make them available!

mkdir /installs

Creates a directory ready for storing the VMware installation files.

mkdir /mnt/cdrom

Creates a directory ready for mounting the VMware CD-ROM you’ll need in the next section.

If you’ve not told Debian not to start Exim, the mail handler, you’ll need to do one other step.

rm /etc/rc?.d/*exim4

This removes all files relating to Exim’s automated startup. As we’re not interested in this machine being a mail server, we don’t really care about permanently disabling it.

There! That was easy. Now we’ve got a lightweight Linux install ready to run VMware.

Installing VMware

Now we’ve got the Operating Environment perfected, we can install VMware on our lovely server. It’s really easy – you’ll just need:

  • A CD with the latest VMware tar.gz Linux files – we need the Server and Web Management Module files only.
  • The Windows “VMware Server Console” installed on your Windows desktop

Place the CD with the VMware files in your server’s CD-ROM drive, and type the following commands:

mount /dev/cdrom /mnt/cdrom

This command makes the CD-ROM system device available as a readable file system to the Linux Operating Environment.

cd /installs

Moves the current working directory to where you want to place the VMware files.

tar –zxf /mnt/cdrom/VMware-server-e.x.p-23869.tar.gz

This will extract the VMware server installation routine to your /installs folder.

tar –zxf /mnt/cdrom/VMware-mui-e.x.p-23869.tar.gz

This will extract the VMware Web Management installation routine to your /installs folder.

umount /dev/cdrom

Remove the CD-ROM from the system; VMware’s installation routine makes some modifications to the /mnt folder so best to be safe!

Now, we’re finally ready to actually do the installation of VMware! Hurrah!

cd /installs/vmware-server-distrib

Change to the folder where the VMware setup files live.

./vmware-install.pl

This runs the setup routine. You can safely just keep hitting return all the way through and accepting the defaults, except where you have to agree to the licensing terms – you have to read this all the way through and then type yes to continue.

Hurrah! You now have a fully functional VMware server running. Some documents say you should reboot the server at this point; as it’s not in production at this stage I can’t see any harm in doing this. However it seems to work just fine without a reboot.

Verify you can connect to the VMware server through your Windows-based VMware Server Console. If you’ve used DHCP to install this server (if it’s a production server this shouldn’t be the case, unless you’re using DHCP reservations!) then you can find out the system’s IP address by using the ifconfig Linux command.

The next step is optional; only use it if you plan to use the web-based management interface!

cd /installs/vmware-mui-distrib

Change to the folder where the VMware Web Management setup files live.

./vmware-install.pl

This runs the setup routine. As before, you can safely keep hitting return and accepting the defaults.

And there we go – you have the Web Management utility up and running too. Verify the install by hitting the VMware server on port 80 from your web browser.

Enjoy VMware!






This entry was posted on Tuesday, June 6th, 2006 at 11:45 am and is filed under Virtualisation. Find similar posts by selecting any of the following tags: . You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

No Comments

Be the first to comment on this entry.

Have your say

Fields in bold are required. Email addresses are never published or distributed.

Some HTML code is allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
URIs must be fully qualified (eg: http://www.domainname.com) and all tags must be properly closed.

Line breaks and paragraphs are automatically converted.

Please keep comments relevant. Off-topic, offensive or inappropriate comments may be edited or removed.

  1. About Me

    Rob Whitehouse is an IT professional from Fulham in London, the UK. As an MCITP in Windows Server 2008 and with MCTS qualifications in Windows Server Virtualisation and SCVMM 2008, his work focus is on large scale virtualised application delivery infrastructures based on Windows Server 2008, IIS 7, Hyper-V and vmWare. This is backed up with MCTS qualifications in Exchange 2007, SQL 2005, 2008, 2008 BI and SharePoint, along with MCSEs in Windows NT4, 2000 and 2003 and extensive experience with FC, iSCSI and SAS SANs.
  2. Search:

  3. Recent Posts