Cookies

This site uses cookies. By accessing this site you are consenting to the use of these cookies. To find out more about the cookies we use, visit More About Cookies

03. Creating A Virtual Machine With VMware Workstation Software

Recommended: Click here to fix Windows errors and optimize system performance

Having two operating systems on your PC can be advantageous, particularly when, like Windows Vista, applications will run on say Windows XP but not Windows Vista. If you have purchased Windows Vista and found that a majority of your current software will not run on Vista, even though it runs perfectly well on XP, then you basically have two options.

  • Option 1: Create a dual boot system by partitioning your hard drive into two separate partition and installing Windows XP on the first partition and Windows Vista on the second partition.
  • Option 2: Install Virtual Machine software such as VMware Workstation. (You could also use Microsoft's Virtual PC 2007 if you wish, however, for this tutorial we will be using VMware Workstation.)

Preliminaries

The first thing you need to do is install your copy of VMware Workstation. You install VMware onto Windows Vista (or whatever operating system you are using as a host operating system) This is pretty straightforward and doesn't really need any explanation.

Once VMware has been installed then you need to create a virtual machine onto which you can install your copy of Windows XP. There are two terms you need to keep in mind here.

  • Host
  • Guest

The virtual machine Host is the operating system that you have installed virtual machine on. The virtual machine Guest is the operating system you are going to install on the virtual machine. It is important that you know the difference between these two terms.

Creating The Virtual Machine

Once VMware WorkStation has been installed, Click the VMware Icon on your desktop to launch the application. Once VMware opens you will see the following screen (see fig:3-1 below)

Fig: 3-1 VMware's Home Window

Fig: 3-1 VMware's Home Window

The Home Window contains three options:

  • New Virtual Machine
  • New Team
  • Open Existing Virtual Machine

Because you are creating a virtual machine for the first time, Select the New Virtual Machine option and click on it. The Virtual Machine Wizard will now start and will guide you through the creation process.

Configuration

For simplicity it is wise to select the default configuration which, if you look at figure 3-2 is Typical. This, as you can see, is already selected for you. You should only use the Custom option if you need to create a virtual machine which requires additional devices to be added or requires a specific configuration.

Fig: 3-2 Virtual Machine Configuration Window

Fig: 3-2 Virtual Machine Configuration Window

As we are going to be using the Typical option for the virtual machine you can now click the Next button.

Guest Operating System

The next window to appear allows you to select the operating system that you are going to install on the virtual machine as guest. As you can see from the screenshot (fig:3-3) the Windows operating system is not the only operating system you can actually install on a virtual machine. However, if you are currently using a Windows operating system as your Host then VMware will automatically select an appropriate version of Windows for the Guest operating system. If the operating system that VMware has automatically selected is not the correct one, then choose another from the drop down list of operating system versions. You can do this by clicking the down arrow to the right of the Version dialogue box. Once you have selected the operating system you are going to use as Guest, press the Next button

Fig: 3-3 Selecting the Guest operating system

Fig: 3-3 Selecting the Guest operating system

The next thing you need to do is give the virtual machine a name and also specify the location of the virtual machine files (fig:3-4) VMware, as with VPC 2007, has its own folder where virtual machine files are stored. This is situated on the Host drive. This means that the Guest operating system files will also be stored on the Host drive unless you specify otherwise.

While the screenshot below (fig:3-4) shows the location as the Host drive you can, by clicking the browse button, place the virtual machine files on another drive or partition if you so wish. The choice is up to you.

Fig: 3-4 Name The Virtual Machine And Select Its Location

Fig: 3-4 Name The Virtual Machine And Select Its Location

Because the guest operating system will be using the hosts Internet connection you now need to select which type of network you are going to use. If the Host machine is not connected to a network then I would suggest you do as I do and select the Use network address translation (NAT) option. If you intend giving the Guest operating system its own internet connection (obviously you will need to install your modem software etc) then select the do not use a network connection option. The NAT connection option works fine for me using a DSL modem. After you have selected the network option you need, Click the Next button

Fig: 3-5 Network Connection Options

Fig: 3-5 Network Connection Options

Now we come to specifying the disk capacity for the virtual machine. The default is 8GB, but remember 8GB is not a lot when you start installing other programs to your virtual machine. Once the disk capacity is set it can be difficult to change it. There is a command prompt command line for changing disk size but it has never worked for me, so make sure you allocate enough space the first time around.

You should also remember that, if the virtual machine files are to reside on the host machine's hard drive/partition then you must have enough space for your host to run and the guest files to grow. Currently I have create a separate partition of around 15GB and installed my virtual machine to this partition.

Once you have allocated the disk space you have three options (see fig: 3-6)

  • Option 1: Allocate all the disk space now
  • Option 2: Split the disk into 2GB files
  • Option 3: Do nothing

Fig: 3-6 Disk Capacity Allocation Window

Fig: 3-6 Disk Capacity Allocation Window

If you allocate all of the space right away there will be a performance enhancement, but it will take VMware longer to actually create the virtual machine files.

If you don't like the idea of allocating all of the disk space right away you can always opt to split the disk into 2GB files instead.

Should you decide to leave well alone and not tick any of these options then the disk will start off small and will enlarge or decrease as you add or remove programs or data.

Once you have enabled the option you want to use, Click the Finish button. VMware will now start to create the disk and all the necessary files for the virtual machine. This may take a while, especially if you have checked the allocate all disk space now option.

After VMware has created the necessary virtual machine files you should see the Virtual Machine created successfully window appear (see fig:3-7). Now click the Close button

Fig: 3-7 This window will appear once VMWare has created the virtual machine.

Fig: 3-7 This window will appear once VMWare has created the virtual machine.

After you have clicked the Close button on the last screen (fig:3-7) the screen will change to display the details of your current Guest operating system. In the left hand pane of this new window (fig:3-8) you will see a list of commands and in the right hand pane you will see the details of devices from the new guest operating system.

Fig: 3-8 Guest virtual machine details window

Fig: 3-8 Guest virtual machine details window

From this window (fig:3-8) you will not only be able to Start the new virtual machine but also edit the devices. Before we continue let us just take a look at the edit options. To edit the virtual machine setting, Click the edit virtual machine settings option (fig:3-9)

Fig: 3-9 Virtual machine settings window

Fig: 3-9 Virtual machine settings window

From the settings window you can change certain aspects of the virtual machine. For example, you can change whether the floppy drive is auto detected or not, whether sound is available (the default for all of these setting is auto detect). You can even change the Ethernet options. However, the most important, at the moment, is system memory. The virtual machine will use its default settings for memory depending upon how much system memory you have and also which operating system you are using as the guest. The more system memory you have on the host, the more you will be able to allocate to the guest.

For example, if you look at figure 3-8 you will see that the recommended minimum for Windows XP is 128MB, while the recommended memory is 256MB. If you have, say 2GB of memory on your host machine, you can easily increase the memory to your guest machine to say, 512MB or 1GB, simply by moving the memory slider to the desired memory allocation.

You should ensure that you have allocated the necessary memory you feel happy with prior to actually activating the guest operating system. If you decide to increase the memory after the guest operating system has been activated the new settings will trigger the windows activation option, and you will be required to go through the activation process one again.

You can go through the different settings on your own (fig:3-10) to see exactly what options are available. Incidentally, clicking on the hard drive option and then clicking the utilities button will bring up the option to defragment the virtual machine; this actually is a useful addition.

Fig: 3-10 Virtual machine hard drive settings

Fig: 3-10 Virtual machine hard drive settings

After you have viewed the available settings, Click the OK button to close the window. You are now returned to the Home window (fig: 3-1)

Installing Guest Operating System

Now comes the most important part, installing the guest operating system. Before you touch anything relating to the virtual machine, place the Windows XP CD (or other operating system CD) into your CD-ROM.

One major downside to virtual machine software is that the Windows Auto Run feature can play havoc with the installation. For this reason the virtual machine software will suggest that auto run be turned off. Where VMware virtual machine is concerned I have actually found that Auto run/Play is turned off regardless of whether you have the turn off auto run option enabled or not. Turning the auto run option off does however have repercussions with Vista in that, regardless of whether you are installing software or simply playing music CDs, the relevant CD/DVD will not automatically run, so please be aware of this and don't think that something is wrong with Vista when you insert a music CD and it doesn't play. The reason is because auto run/play has been turned off.

Once the CD/DVD has stopped spinning, Click the start the virtual machine option on the Home page. You will see the virtual machine BIOS information, just as you would with any standard physical PC. As soon as the virtual machine has gone through the BIOS test and started, the CD-ROM will spin and the Windows installation will start. You install Windows (or any other operating system) on a virtual machine in exactly the same way that you would a normal PC. The virtual PC will also restart periodically just as a normal PC would do during the installation.

After the installation has completed the virtual machine will restart once more and then your guest operating system will load (fig: 3-11)

Fig: 3-11 Windows XP loading

Fig: 3-11 Windows XP loading

Once your operating system has loaded you will need to double click your mouse in the virtual machine window to give the virtual machine focus. To move back to your Host operating system simple click the Ctrl + Alt buttons together and the mouse pointer will be released so that you can go about your business in the Host operating system.

You will find the mouse pointer a little sluggish after you first install the operating system to the virtual machine. This is because a special set of tools still needs to be installed. To install the VMware tools, Click the VM option tab on the main toolbar and the following drop down menu will appear (see fig:3-12)

Fig: 3-12 Installing the VMware Tools

Fig: 3-12 Installing the VMware Tools

From the drop down menu, Click on the install VMware Tools option. The VMware tools will now be installed, after which your virtual machine will be more responsive to your mouse and keyboard. VMware tools is basically a set of utilities that will greatly enhance the virtual machines' performance and also generally improve the management of the virtual machine.

Once you have installed the VMware Tools you are ready to start using your new virtual machine and installing programs of your choice. Figure 3-13 shows the virtual machine guest (in this case Windows XP) in the foreground and the host machine (Windows Vista Ultimate) in the background of the desktop.

Fig: 3-13 Display Guest and Host desktops

Fig: 3-13 Display Guest and Host desktops

Installing Programs

Installing third party software on the virtual machine is just as easy as installing it on a stand alone PC. Just launch your virtual machine and then, once everything has loaded and the desktop appears, insert the software application's CD into the CD-ROM and let it auto run. Then proceed just as you would if you were installing the same software onto your main PC.

Anti Virus and Firewall

Even though the virtual machine is technically networking with the host machine and sharing the host machines internet connection, the virtual machine still requires its own anti virus and firewall. It is, therefore, important to install anti virus software prior to using the virtual machine with the hosts internet connection. If you are not using Windows XP's built in firewall then I also suggest that you install a third party firewall for added protection.

Sharing Files

You can share files between the guest and the host operating systems by enabling shared folders. This can be done by selecting the edit virtual machine settings option on the virtual machine details window. When the virtual machine settings window opens, Click the Options tab and then click on the shared folders option. You then have the options of 'Always Enabled' or Enabled until next power off or suspend.

Shared folders can, of course, be a security risk. An alternative is to simply copy the desired document/data from the host machine to the guest virtual machine and visa-versa.

Shutting Down

Shutting down a virtual machine is no different to shutting down your main PC. After you have finished using the virtual machine, simply click the Windows Start button and select the Shut Down option, it really is as simple as that!