Server Virtualization in Action: A View From the Trenches
The following is an excerpt of a chapter from Practical Virtualization Solutions, a book that serves as a guide for managers and CIOs involved in planning, deploying, or managing virtualization projects. Among the topics the book covers are: how to transition your data center from being focused on the physical to being primarily virtual; a comparison of VMware ESXi, VMware Server, Microsoft Hyper-V, Citrix XenServer, and other virtualization technologies; advanced techniques for simplifying virtual machine management; and where virtualization comes into play for networking and storage.Virtually Speaking: Looking to get started with server virtualization but don't know where to start? This excerpt from Practical Virtualization Solutions will point you in the right direction.
In general, ServerWatch does not publish book excerpts. In this case we've made an exception, as the authors of Practical Virtualization Solutions are ServerWatch editor and Virtually Speaking columnist Amy Newman, and ServerWatch's Cover Your Assets columnist Kenneth Hess.
We hope you find it useful and informative. Should you wish to read more, the book is available for purchase from InformIT.
This chapter enters the mix of solving problems with virtual machines (VM) and services. We’ve chosen solutions that are somewhat generic in nature and thus applicable to the widest range of situations. The software we will use to demonstrate those solutions are VMware Server and Microsoft Virtual PC. In this and the two subsequent chapters, the software is ancillary to the solution and should not be viewed as an endorsement of a particular solution or company. In this case, VMware Server and Virtual PC were chosen because they are free and work well with a variety of guest operating systems. There is also a huge repository of VM templates, server appliances, and images available for both platforms.
This chapter illustrates how to create and configure dedicated virtualized servers; then it covers migrating physical machines to virtual ones. It also provides an overview of backup and recovery, server appliances, VM migration, tuning, and concludes with a look at VM security.
Configuring Dedicated Servers with Virtualization
This section is probably going to take the most time to absorb because it is such a shift from tradition. The next server you create and use will not be a physical one with a system board, drives that you plug in, or memory boards that snap into place. You won’t need to worry about downloading drivers for that video card, network card, or controllers of any kind. In fact, there might not be any hardware compatibility troubleshooting whatsoever.
These days we hardly even bother with CD/DVD drives to install an OS. ISO images are much easier to deal with, and there is hardly a point in searching for a disk that might be scratched in some vital area, making installation frustrating, if not impossible.
A dedicated virtual server (system) is one that, like a physical server, is dedicated to a job or jobs for which it is designed. Configuring a virtual dedicated server is much the same as configuring a physical dedicated server. After installation, the server needs security patches, software updates, and service pruning. Service pruning is halting or removing unneeded services from your system.
Service pruning is necessary to reduce the number of potential vulnerabilities that exist with some network services. You should install and run only the services you need for your dedicated server to perform its designated function.
In this first dedicated server example, a Debian system is installed to function as a mail server. Debian was chosen because it installs quickly without a lot of superfluous services and software. We used an ISO image to install from and boot the VM.
Preparing the Virtual Machine
To do this in VMware Server, create a new VM and, when it is complete, browse to your ISO image under Edit Virtual Machine Settings from the main VMware Server screen, and change as shown in Figure 9-1.
Selecting the ISO image from which to boot in VMware.
Or, if you’re using Virtual PC, you need to start the new VM, then choose CD, Capture ISO Image before the VM boots. See Figure 9-2.
Capturing the ISO image in Virtual PC.
If your VM doesn’t boot to the ISO image in VMware, you will need to set the VM to boot to the CD/DVD drive using VMware’s Boot Menu. To get to the Boot Menu, press ESC when the VM begins to boot, as shown in Figure 9-3, and then select CD-ROM Drive.
Press ESC for Boot Menu..
Note - The booting VM must have focus before you’re able to press ESC and select from the Boot Menu. You give the VM focus by clicking the VM with your mouse.
The VM will now boot from the ISO image. Follow this same procedure to boot from the CD/DVD drive if you have a physical CD or DVD disk from which to boot.
After the new VM boots to the CD image, install the operating system as you would for a physical system. In the case of a Linux installation, you may find that on first boot the X Window system (graphical interface) starts incorrectly or fails to start altogether. This is because the video setup is incorrect or not supported. VMware and Virtual PC have additional software available to assist you in setting up your system for unsupported hardware. VMware includes VMware Tools and Virtual PC provides Virtual Machine Additions.
To install Virtual PC’s Virtual Machine Additions, select Action, Install or Update Virtual Machine Additions, Continue. The installation should start automatically.
Note - Virtual Machine Additions are available only for DOS, OS2, and Windows Operating Systems in Virtual PC.
Installing VMware’s Tools for Windows computers is a simple task—click VM, Install VMware Tools. You may be prompted to reboot when the installation completes. The installation begins and proceeds automatically with only a few interactions from you. Linux, however, is more complex, depending on the distribution. Here’s how to install VMware Tools for any Linux distribution:
Click VM, Install VMware Tools, Install.
Mount your CD/DVD drive (if it doesn’t automatically mount and open for you). Enter the following code:
The dialog box disappears and it looks as if VMware Tools are installing for you in the background, but they aren’t. The Tools are now available to you in a virtual CD format.
# mount cdrom or mount /dev/cdrom.
Two files on the virtual CD contain the VMware Tools: VMwareTools- (version).rpm and VMwareTools-(version).tar.gz. You can install the rpm directly, if your distribution supports it. The tar.gz file is the source code for the VMware Tools and the only way we have ever been successful at installing them. Your experience may vary.
The prerequisites for a successful installation include, but may not be limited to, the following:
A C compiler (gcc).
Kernel header sources.
Others—Check your error messages.
Copy the tar.gz file to a directory on your hard drive, unzip, and untar it.
CD into the vmware-tools-distrib directory and execute the install script using the following code:
The script will guide you through a series of installation questions. Use the default answer unless you know how to answer the prompts for your system. If all goes well, your installation should proceed without issue. If you get errors, you will have to download and install any missing pieces.
Check for the vmware-guestd after installation by entering the following:
# ps –ef |grep vmware
You should see a response similar to the following:
/usr/sbin/vmware-guestd –background /var/run/vmware-guestd.pid
Now that you have successfully installed VMware Tools, you can install the video support drivers so your X Window interface will work properly. To get to that, enter
# apt-get install xserver-xorg-video-vmware
This excerpt © Copyright Pearson Education. All rights reserved.
Want to read more than that? Pick up a copy of Practical Virtualization Solutions from InformIT.
Next >> Dedicating the Server