April 3, 2009, 8:29 a.m.
posted by void
Split Your Machine's Personality
Give your machine split personalities by installing VMware Server, and get some virtual machines running. Virtualization is one of the current buzzwords in the computer industry. Virtualization is where a thin software layer is installed on a computer that allows its processor and other resources to be split among several virtual machines (VMs). This allows the computer operator to run several different operating systems underneath this virtualization layer. Each virtual machine has its own set of resources and operates independently from any other virtual machines that may be running at the same time. VMware (http://www.vmware.com) is one of the oldest companies in the virtualization business. It has had a Linux-based product lineup available for some time, both in the personal computer space (its Workstation product) and the server space (GSX and ESX server). Recently, however, VMware has released two new free (as in beer) products: VMware Player (http://www.vmware.com/products/player/) and VMware Server (http://www.vmware.com/products/server/). The VMware Player product allows you to "play," or use, a premade virtual machine. The VMware Server product is much more interesting, as it allows the creation of new virtual machines, and its modular, network-enabled console lets you control the virtual machines whether they're installed on your computer or another computer on the network. VMware Server is like a Swiss army knife: its uses are limited only by your imagination. Need a particularly sticky Windows application working, but still want to run Linux? If it doesn't work in Wine [Hack #87], you can install VMware Server and run that application in a virtual machine. Want to test the latest Linux distribution but have only one computer? Install the new distro in a virtual machine and don't worry about your main system. Installing VMware ServerVMware Server is really designed for use on a Red Hat-based Linux distribution, but it does work fine on Ubuntu. However, it requires that some packages be in place before installation, since it has to compile the VMware-specific kernel modules. VMware also has a dependency on inetd, if you want to remotely connect to your virtual machines from another computer on the network. To install VMware, start by installing the build-essential and netkit-inetd packages. If you use the aptitude package manager, the additional recommended packages will get installed without any other intervention (be sure to replace linux-headers-386 with the appropriate package for your architecture, such as linux-headers-686 or linux-headers-k7): bill@lexington:~$ sudo aptitude install build-essential \\
linux-headers-386 netkit-inetd
Next, get VMware Server from the download page (http://www.vmware.com/download/server/). You'll need to register on the site, and VMware will send you a serial number to activate your VMware Server installation. Ensure that you get the .tar.gz package, and not the rpm variant. Optionally, you can download the web interface and Windows console program separately. Once you've downloaded the package, untar it by running this command: bill@lexington:~$ tar zxvf VMware-server-e.x.p-22088.tar.gz
Then start VMware installer and answer the questions it asks. In most cases, you can accept the defaults. At the end of the installer, you will be prompted for your serial number. This was emailed to you by VMware after you registered, so check your mail for it: bill@lexington:~/vmware-server-distrib$ sudo ./vmware-install.pl Password: Creating a new installer database using the tar3 format. Installing the content of the package. In which directory do you want to install the binary files? [/usr/bin] What is the directory that contains the init directories (rc0.d/ to rc6.d/)? [/etc] What is the directory that contains the init scripts? [/etc/init.d] In which directory do you want to install the daemon files? [/usr/sbin] In which directory do you want to install the library files? [/usr/lib/vmware] The path "/usr/lib/vmware" does not exist currently. This program is going to create it, including needed parent directories. Is this what you want? [yes] In which directory do you want to install the manual files? [/usr/share/man] In which directory do you want to install the documentation files? [/usr/share/doc/vmware] The path "/usr/share/doc/vmware" does not exist currently. This program is going to create it, including needed parent directories. Is this what you want? [yes] The installation of VMware Server e.x.p build-22088 for Linux completed successfully. You can decide to remove this software from your system at any time by invoking the following command: "/usr/bin/vmware-uninstall.pl". Before running VMware Server for the first time, you need to configure it by invoking the following command: "/usr/bin/vmware-config.pl". Do you want this program to invoke the command for you now? [yes] ... lots of output truncated ... The configuration of VMware Server e.x.p build-22088 for Linux for this running kernel completed successfully.
Running VMware Server
Once this process is over, the VMware installer will have added a VMware Server entry to your Applications Starting the VMware console
The VMware console is where you will create, manage, and interact with your virtual machines. Once the console starts, it will ask you if you want to connect to your locally installed VMware Server instance or connect over the network to another VMware server. Select "Local host," as shown in Figure, and then click Connect. Connecting to a VMware Server
Once you've successfully connected to the VMware Server, you'll be presented with a screen in the console with various options (see Figure). You're going to create a new virtual machine, so click "Create a new virtual machine." The main console window
The New Virtual Machine wizard will start up. Select Next to move past the splash screen. The wizard will ask you if you'd like to use a typical or custom virtual machine configuration; select Typical and click on Next. Now you get to the meat of the wizard: what type of operating system you'd like to install (see Figure). Select the guest OS family that you want to install in your new virtual machine and choose the version. Click Next to move on. Choosing your VM's operating system
At this point, you'll be prompted to name the new virtual machine and select a location to store its files. The defaults are usually fine here, unless you'd like to name the system something more descriptive. When you've named your machine, click on Next, and you'll be asked to select the type of networking you want for your virtual machine (see Figure). There are several different types of network options: bridged networking, where your virtual machine will appear as another host on your LAN; network address translation, where your VM will be "firewalled" behind your host machine; and host-only, where your VM can communicate only with the host computer. In this example, you'll select "Bridged networking." Click on Next to continue. Selecting VM networking types
The final screen, shown in Figure, lets you select how large you want the virtual machine's hard disk to be. We usually uncheck the "Allocate all disk space now" and "Split disk into 2GB files" boxes. If the "Allocate all disk space now" checkbox is selected, VMware Server will consume the amount of space specified in "Disk size" upon virtual-machine creation. If that box is unchecked, the virtual machine's disk will grow dynamically, so as you install the OS and add applications, the disk will gradually get larger. The only real reason to check that box is for performance reasons, as it is faster than dynamic allocation; otherwise, leave it unchecked. Click on Finish to complete the New Virtual Machine Wizard. Specifying VM disk size
At this point, your virtual machine is ready to be powered up for the first time and begin its OS installation. You can perform any tweaking to the virtual machine in the console here, prior to OS installation. All the items in the right pane are clickable and adjustable, such as the amount of RAM you want to dedicate to the VM and what installation media or mount point you wish to use. One cool thing about the VMware console is that you can install your virtual machine from a CD in your server, a CD in your client, or straight from an .iso image (select VM First boot
Once you start using VMware, you'll find new uses and ways to leverage virtual machines that you never thought possible. We've even used a virtual machine to kick-start other physical Linux boxes! |
- Comment

Figure). Click on this entry to start the VMware console.
CD-ROM 1
All that remains at this point is to click the Power On button in the toolbar and watch your virtual machine boot for the first time. It will go through a virtual BIOS and POST check (see