As a technology writer and trainer, I test a great number of networking scenarios. Many of these scenarios require that I have six or more computers free. These machines need to be completely disposable; they’ll be reconfigured, broken, fixed, wiped out, and reinstalled over and over. Broken operating systems are part and parcel of a test network.

The problem is that I don’t always have half a dozen machines sitting around that I can crater at a moment’s notice. Sometimes I’m running a class on the test network; other times my wife, Debi, is using the machines for her own testing. Even when the physical test network is free, I may need more machines than we have to simulate the enterprise scenarios that I’m testing.

In the past, my only choice was to take down some production machines or buy more hardware. Neither option was particularly attractive. Fortunately, I don’t have to make that decision anymore because I have a new tool in my arsenal: VMware.

VMware is a software tool that allows you to install and run multiple operating systems concurrently. This is significantly different from installing multiple operating systems on the same machine in a multiboot configuration. With a multiboot setup, you can only run one operating system at a time; with VMware, you run multiple operating systems at the same time.

VMware Workstation for Windows NT/2000 supports the following operating systems:

  • MS-DOS
  • Windows 3.1
  • Windows 95/98
  • Windows NT 4.0
  • Windows 2000
  • Linux
  • FreeBSD

You can install and run as many virtual machines (VM) as you like, and you can run them at the same time. Best of all, the VMs can all be connected to your network. They can communicate with all computers connected to the network, including the machine that is hosting the VMs. I have run up to six VMs on a single system and did not experience any problems with system stability or functionality. You can also install VMware on other machines on the network and run even more VMs on the network.

VMs can be created, destroyed, broken, and fixed over and over again. If you find that you can’t fix one, blow it away and create a new one. You can even create backup copies of your VMs; if there are configurations you would like to keep, you can just back them up and make changes to the copy. You can keep a copy of a base operating system and copy that one over and over as you need; you don’t even need to reinstall!

In this Daily Drill Down, I’ll cover the specifics of creating a VM with VMware and connecting it to your network. You will learn how to:

  • Create a VM.
  • Configure the VM hardware.
  • Prepare a VM to move to another computer.

After reading this Daily Drill Down, I think you will see that an investment made in this software will pay for itself many times over.

Creating the VM
The steps to create the VM include:

  1. Preparing the hard disk on the host system
  2. Running the VM Wizard
  3. Configuring the VM hardware
  4. Installing and configuring the operating system

Let’s look at each of these steps in more detail.

Preparing the hard disk on the host system
VMs can eat up a lot of disk space. VMware Workstation for Windows NT/2000 allows you to create virtual hard disks of up to 2 GB each. Each VM can be configured with several IDE and SCSI virtual hard disks. Therefore, you need to put the VMs on a disk that can support the number of VMs you want to install and run.

Virtual disk size limitations

The default virtual disk type allows you to configure virtual disks of up to 2 GB. These disks are dynamically resized based on the amount of data stored on the virtual disk. You can also create virtual disks larger than 2 GB, but these disks are statically sized and remain the same size regardless of how much data is stored on the disk.

I recommend you install a hard disk that is at least 60 GB. This way, you’ll be able to install a reasonable number of VMs that have been configured with multiple virtual disks. Note that even if you configure virtual disks that are 2 GB, the entire 2 GB will not necessarily be used by the guest operating system. The virtual disk uses only the amount of physical disk space necessary to hold the data on the virtual disk. The virtual disk grows dynamically as more data is stored on it.

For example, in Figure A, you see the folder containing the files for a VM that was configured to use a single 2-GB drive. There is only about 802 MB of data on the machine, though, so the entire 2 GB is not used on the host operating system’s hard disk. After installing the physical disk on the host operating system, make a directory that is dedicated to the VMs. Each VM is installed in its own directory, which can be given a descriptive name that will allow you to distinguish one VM from another.

Figure A
The virtual disk dynamically resizes itself to support the amount of data stored.

Fast disks and plentiful RAM optimize VM performance

Most late-model desktop computers have an UDMA/100 IDE interface integrated into the motherboard. VM performance is most affected by the memory and disk subsystems. Be sure to install a UDMA/100 disk so that you can take advantage of the IDE interface features. You can significantly increase performance by using a SCSI RAID controller and placing the machines on a RAID 0 array. Also, install as much RAM as possible in the computer, as each VM requires a minimum of 16 MB to 64 MB of physical RAM on the host machine. If you want to run multiple VMs simultaneously, install at least 512 MB of RAM.

Running the VM Wizard
After the hard disk is prepared, run the VM Wizard by performing the following steps:

  1. Open the VMware Workstation application. Close the pop-up dialog box and then click File | New. You will see the new VMware dialog box, as shown in Figure B. Select Run The Configuration Wizard and click OK.

Figure B
Run the Configuration Wizard by selecting that option and clicking OK.

  1. The first page (Figure C) asks which guest operating system you want to install to run in the VM. In this example, we’ll select Windows 2000 and click Next.

Figure C
Select the guest operating system from the drop-down list.

  1. The Virtual Machine Directory page (Figure D) appears next. Type in or browse to the path of the directory you created for the VM. The directory must exist already, because the application will not create a new directory. Click Next.

Figure D
Enter the path to your VMware directory.

  1. On the Disk Type page (Figure E), select Virtual Disk. You have the option to use an existing disk partition, but you have to dedicate the partition to the VM. Click Next.

Figure E
Select Virtual Disk to create a dynamically resized virtual disk.

  1. On the Virtual Disk Size page (Figure F), type in the maximum size of the virtual disk that will be used for the boot partition (or system partition, in Windows parlance). The default is 2,000 MB. The disk will start with a very small size, but grows dynamically to hold data. Your dynamically resized virtual disks are limited to 2 GB in VMware Workstation for Windows NT/2000, but you can create virtual disk sizes of up to 4 GB with VMware GSX Server for Windows. We’ll use the maximum disk size by typing in 2,000 MB and clicking Next.

Figure F
Enter the maximum size of the virtual disk and click Next.

  1. On the CD-ROM Device Setting (Figure G) page, you determine whether you want the VM to start with the CD-ROM enabled. If there are multiple CD-ROMs connected to the host operating system, you can select which CD-ROM the VM will use. If you do not want the CD-ROM available during VM boot-up, you can select CD-ROM Disabled. We will go with the defaults and click Next.

Figure G
Configure the CD-ROM settings for the virtual machine.

  1. On the Floppy Device Setting page (Figure H), you can choose to enable or disable the floppy drive on the VM. If you have multiple floppy drives, you can select which one you want the VM to use and whether or not you want the floppy drive enabled when the VM starts up. In this example, we’ll go with the defaults and click Next.

Figure H
Configure the floppy drive for the VM.

  1. On the Network Setting page (Figure I), choose whether or not you want to allow the VM to connect to the network. The Bridged Networking option allows the VM to connect to other computers on the network, as well as to the host operating system over the network. We will select this default networking setting and click Next.

Figure I
Configure Bridged Networking to connect the VM to the rest of the network.

  1. The last page is the Confirmation page (Figure J). Confirm your settings and click Finish.

Figure J
Review your settings and click Finish.

Configuring the virtual disks
After you confirm your settings, you will be returned to the main VMware window. The next step is to configure the hardware components in the VM. You could begin installing the guest operating system now, but then the installation routine wouldn’t have the opportunity to detect the VM’s hardware.

To begin the VM hardware configuration, click Settings | Configuration Editor to bring up the Configuration Editor window, as shown in Figure K.

Figure K
Configure additional virtual disks by copying and editing the default disk configuration.

When you expand the IDE Drives node, you can see which virtual disks are configured for the VM. The setup wizard creates the boot disk and the IDE CD-ROM. You can add up to two more IDE disks and up to seven SCSI disks.

Perform the following steps to create a new disk:

  1. Click on the IDE 0:0 entry in the left pane of the Configuration Editor and then click in the text box for the name of the disk. This text box contains the path and the name of the file used to store the virtual disk information. Right-click on the text box, click Select All, right-click again, and then click Copy.
  2. Click on the IDE 0:1 entry in the left pane, click on the Name text box, right-click, and then select Paste. The name of the disk file should be Win2000.dsk. Change the name of the file to something like Win2001.dsk.
  3. Click the Create button, enter the size of the disk you want to create, and click OK.
  4. Repeat the procedure to create more IDE or SCSI disks.

Configuring Ethernet adapters
An Ethernet adapter was configured when you ran the configuration wizard. You can dualhome a VM by adding up to two more Ethernet adapters. Expand the Ethernet Adapters node in the left pane and click the Ethernet 2 node. The screen in Figure L will appear. Click the Add button and select Bridged.

Figure L
If you want to trihome your VM, click on the Ethernet 3 node.

Configuring serial ports
If you have a modem connected to the host operating system, you can allow the VM to connect to it. To configure the serial port on the VM, expand the Serial Ports node in the left pane and click the Serial 1 entry (Figure M). Click Add to add the serial port and then select which COM port the VM should use to connect to the modem. This is the same port used on the host operating system. Select the Device type. Finally, make sure the Start Connected check box is checked so that the guest operating system will detect that this port is available during installation.

Figure M
Adding a serial port to support modem connections to the Internet and RAS servers

Configuring the sound adapter
Expand the Sound Adapter node in the left pane and click on the Sound node (Figure N). Click the Add button. This adds your sound card to the VM. Make sure the Start Connected check box is checked so the guest operating system can detect and install the drivers for the sound card.

Figure N
Configure the VM’s sound card.

After making all the hardware configuration changes to the VM, click Save. You will be returned to the main VMware window. The hardware configuration is saved, and now you’re ready to install the operating system.

Installing the operating system
The easiest way to install the operating system is to have a bootable CD-ROM, although not all operating systems support this feature. If you don’t have bootable installation media, you have two choices:

  1. Install a version of DOS on the VM
  2. Use a boot disk that can detect the IDE CD-ROM drive

If you install a version of DOS, you also have to install a CD-ROM driver that works with your CD-ROM drive. After installing the driver, you can begin the setup routine from the CD-ROM. Operating systems like Windows 98 come with a bootable disk that works with VMware.

Press the Power On button to begin the installation. This boots up the VM. The VM has its own configurable Phoenix BIOS; you will see the BIOS sequence during system startup, as shown in Figure O.

Figure O
On the right side of the status bar, there are several icons representing the floppy drive, hard disks, CD-ROM drive, and Ethernet adapters.

The remainder of the installation is the same as it would be if you were installing on a physical machine. You do not need to take any special actions to make the operating system work or to connect to the network.

Installing the VMware Tools
Installing the VMware Tools is optional, but the tools do provide some features that add significantly to your VMware experience, including:

  • Support for high-resolution monitor configuration
  • Automatic release of the mouse when it is moved away from the VMware window
  • Sharing of a common clipboard with the host operating system
  • Better overall VM performance

To install the VMware tools, perform the following steps:

  1. While the VM is running, click the Settings menu and then click the VMware Tools Install command.
  2. A dialog box will appear asking you whether you would like to read the installation instructions. Click Yes. Another dialog box will appear, informing you that the VM configuration has changed to allow you to configure the VMware tools. Click OK.
  3. Open the My Computer object on the desktop and then open the 3.5 Floppy (A:) icon.
  4. Double-click on the VMwareTools installation icon (Figure P). Note that the three folders contain drivers for Windows 2000, Win9x, and Windows NT 4.0. Follow the prompts to complete the installation. At the end of the installation, select the option to restart the machine.

Figure P
Run the VMware Tools installation routine from the virtual floppy disk.

  1. After you log on, the instructions for installing the VMware Tools Video adapter will appear, and a Digital Signature Not Found warning box will appear if you are installing Windows 2000 in the VM. Click Yes to install the VMware driver. Next, reenable the VMware Tools installation from the Settings menu, as you did earlier.
  2. The Insert Disk dialog box asks for the disk labeled “VMware Inc.” Click OK. In the Files Needed dialog box, browse to the folder that matches the guest operating system. In this example, the files are in the A:\Win2k folder. After selecting the folder, click OK.
  3. The driver is installed, and you will be asked to restart the system.
  4. During the boot up, this message will appear: Please Select Settings > Cancel VMware Tools Install And Press Reset. Follow these instructions. A dialog box will appear informing you that the VM has been restored to its original state. Click OK.
  5. After logging on, change the display size to a higher resolution, such as 800×600.

Copy a VM to another system
There may be times when you want to use the same VM on another computer or you may want to move the VM to another hard disk on the same computer. To do this, you have to inform VMware of the new location of the virtual hard disks. All other configuration options will work when the VM is copied to a new location.

To move the VM, first copy the files in the original VM directory to the new location. Then, open the .vmx file for that VM in Notepad. You will see several entries similar to the following:
ide0:1.present = TRUE
ide0:1.fileName = “G:\VMTest\Win2kVM\Win2000.dsk”
scsi0:0.present = TRUE
scsi0:0.fileName = “G:\VMTest\Win2kVM\Win2002.dsk”

For each IDE or SCSI disk entry, type in the new path to the .dsk file. You do not need to change the filename. Only the path to the file needs to be changed.

In this Daily Drill Down, I detailed how to install Windows 2000 in a VM. You saw how to configure the hardware on the VM, including multiple virtual disks, multiple adapters, and even sound card configuration. Once one or more VMs are configured and started on the host operating system, they can all communicate with each other, as well as with other computers on the network, including the host operating system. VMware has the potential to save you thousands of dollars in physical hardware costs and allows you to test multiple service and networking scenarios that might otherwise be impossible to simulate.