DBA Tips Archive for Oracle

  


Creating a New Virtual Machine - (Windows XP Professional)

by Jeff Hunter, Sr. Database Administrator


Contents

  1. Overview
  2. Host Machine and Virtual Machine Configuration
  3. About Microsoft Windows "Professional" Editions
  4. Creating a New Virtual Machine for Windows
  5. Optional Virtual Machine Configuration Steps
  6. Installing Windows XP Professional
  7. Install VMware Tools
  8. Backing up the New Virtual Machine



Overview

This article provides the necessary steps to successfully create a new Virtual Machine (VM) using WMware Workstation 4.5.2 to host Windows XP Professional.

Why post an article like this on the Oracle DBA Tips section of my website? Well, the WMware Workstation product provides a unique opportunity for me to have Windows XP (Professional) running on my laptop with the ability to install another operating environment (Linux, Solaris x86, or even another version of Windows) - all on the same machine without the need for dual-booting. VMware provides me with a virtual machine that can run any of the above mentioned operating systems simultaneously with Windows XP on my laptop. I often find it necessary to do new installs or unique configurations of Oracle on any of the Microsoft Windows professional editions while not wanting to disturb my somewhat stable Oracle install on the laptop. This article should be sufficient as a template for configuring a virtual machine for any of the professional editions of Microsoft Windows - not just Windows XP Professional.

In VMware Workstation, a virtual machine is nothing more than a directory of several files. After creating a virtual machine, (Linux, Solaris, etc.), I typically close down the VM and backup that directory to my NAS. Once this directory is backed up, I have a complete copy of the virtual machine that can be restored at any time. This gives me the ability to install and configure Oracle on the virtual machine without the worry of messing anything up that would otherwise take a long time to fix (or re-install the O/S). When I want to go back to a fresh virtual machine, I simply restore the directory and I am done - back to a fresh install.

As previously mentioned, I prefer to run Windows XP Professional on my main laptop along with the most recent releases of Oracle9i and Oracle10g for Windows on that laptop. I also, however, need the ability to work with different Oracle configurations on Windows when I have only my laptop. Although I have several different Windows machines at home, I may be on the road with no access to my vast array of equipment. This is where both VMware and Windows come in handy.

For installation instructions on installing VMware Workstation 4.5 on to the Windows XP Professional operating environment, see my article entitled "Installing VMware Workstation 4.5 - (Windows XP)".



Host Machine and Virtual Machine Configuration

Before diving into the instructions for creating the new virtual machine, let's first talk about the host machine and operating system that I have VMware Workstation installed on. Also in the table below is the configuration I will be using for the new virtual machine we will be creating in this article.

Host Machine
Host Machine Name melody.idevelopment.info - (192.168.1.106)
Host Operating Environment Windows XP Professional
WMware Version VMware Workstation - Release 4.5.2 (Build 8848)
Host Machine Dell Inspiron 8600 Laptop
Memory 1GB Installed
(The new virtual machine will take 512MB from this 1GB)
Hard Drive 60GB
Processor 2.0 GHz.
File System NTFS
Guest Machine
Virtual Machine Configuration
Guest Operating Environment Windows XP Professional
Guest Machine Name vmwindows1.idevelopment.info - (192.168.1.113)
Memory 512MB
Hard Drive 10GB



About Microsoft Windows "Professional" Editions

I mentioned earlier that the instructions in this article should be sufficient for any of the professional versions of Microsoft Windows. What do I mean by professional editions of Windows?

Here is a list of the different Windows editions that I consider professional and will work with this configuration. They are the only editions that I use in my Oracle articles based on Microsoft Windows:

The following is a list of Windows releases that are not considered professional Windows versions and typically will not be used in any of my Oracle configurations:



Creating a New Virtual Machine for Windows

Finally, we get to actually creating the virtual machine for Windows XP Professional. The process for creating a new virtual machine is very straightforward given VMware's wizard driven menu system. The following screen shots demonstrate how to create our new virtual machine. Start the VMware Workstation software and choose "[File] -> [New Virtual Machine]".


Screen 1: - Welcome

The first screen is simply a Welcome screen. Click [Next] to start the virtual machine creation process.


Screen 2: - Select Appropriate Configuration

The default option in this screen will be to create a 'Typical' configuration. Change this option to 'Custom' and click [Next] to continue.


Screen 3: - Select a Guest Operating System

You are now asked for what guest operating system will be installed to this new virtual machine. Choose which edition of Windows you will be installing. For the purpose of this example, I will be configuring this virtual machine for Windows XP Professional. Click [Next] to continue.


Screen 4: - Name of Virtual Machine

VMware Workstation uses a user defined name to identify each virtual machine. The default name is the same name as the guest operating system that you chose for the new virtual machine. I typically change this to the server name (host name) I will be using for the virtual machine. For the purpose of this example, my new server name for the virtual machine will be "vmwindows1" so this is what I will type in for the name and the directory. You can, however, simply leave it to the default. This is a matter of choice and what you want to name the new virtual machine. After deciding on the name for the virtual machine, click [Next] to continue.


Screen 5: - Memory for the Virtual Machine

Both Oracle9i and Oracle10g require a minimum of 256MB of RAM memory although more memory is always better for performance. In my case, I do have the memory to spare and will be giving the new virtual machine 512MB of memory given that I have 1GB of RAM on my laptop. Select the amount of memory you want to dedicate to the new virtual machine and click [Next] to continue.


Screen 6: - Network Type

You are now being asked for the network configuration. I typically keep the default, which is a bridged network. This allows other computers on my network to access the virtual machine. The other option, NAT allows your virtual machine to share the same IP address of your physical (host) machine. Do not select the NAT option as the Oracle installation will fail. The third option, host-only networking, allows only your physical (host) machine access the new virtual machine. If you select this option, other computers on your network will not be able to access the new virtual machine, but the Oracle install will still be successful. After making your network choice, click [Next] to continue.


Screen 7: - Select I/O Adapter Types

I always accept VMware's default option regarding the SCSI adapter to be used and click [Next] to continue.


Screen 8: - Select a Disk

Once again, keep the default option of "Create a new virtual disk" selected and click [Next] to continue.


Screen 9: - Select a Disk Type

You now need to choose a disk type. When creating a virtual machine for Windows XP Professional, the default value will be IDE. Here you should choose the default (recommended) option of IDE. If we were creating a virtual machine for Linux, Solaris, or one of the Windows Server editions (i.e. Windows 2000 Server, Windows NT), the default would be SCSI.

NOTE: When creating a virtual machine for Windows 2003 Server, however, the default option is IDE. I am not sure why this is as I would have expected it to be SCSI. Not sure if this is a bug, or if I am missing something.

If the default (recommended) option is SCSI for your edition of Windows, then choose that. Yes, this works even though you may have no SCSI I/O disks in your system. There is no performance differences by choosing IDE or SCSI here. Keep in mind that the system will only perform to what you actually have installed physically. If you do choose IDE, however, you will be limited to a max of 4 disk that can be attached to the virtual machine.

NOTE: With Windows XP Professional, you must choose the IDE option. The Windows XP installer will fail when trying to identify the SCSI disk. If you do require a SCSI disk for this virtual machine, (e.g. shared disk for Oracle database files), we can create an additional hard drive (SCSI) after performing the Windows XP Professional installer. We would then use VMware to edit the properties for our virtual machine and add the new SCSI hard drive. Windows could then be used to identify and partition the new disk for SCSI.

Make your choice and click [Next] to continue.


Screen 10: - Specify Disk Capacity

Since I will be using this new virtual machine for Oracle, I will need a minimum of around 6GB (O/S files, RDBMS Software and new Oracle Database). Even at 6GB, space is going to be tight. I would recommend somewhere between 8GB and 10GB of space. I have the spare on my laptop, so I made mine 10GB. By default, the entire space you request here is not immediately allocated. As VMware needs more space for the virtual machine, it will allocate it to the upper limit you supply here. Since I know that I will be using most of the space, I like to pre-allocate this space. You can pre-allocate this space (in my case 10GB) by selecting the check-box "Allocate all disk space now". After selecting the disk size, click [Next] to continue.

If you elected to have the disk space pre-allocated, you will be given a warning that this process can take a long time and some programs running on your system may become unresponsive. I have never had an issue with pre-allocating space and simply acknowledge this message.


Screen 12: - Specify Disk File

WMware Workstation implements a virtual machine by using a disk file. This screen allows you to name the VMware file. It really doesn't matter the name of this file. I do, however, like to change it to the server name of the new virtual machine. Again, this is simply a matter of choice and any name will be fine. Make your selection and click [Finish] to start the creation process for the new virtual machine.


Screen 13: - Creating the disk - Progress Dialog

After hitting the Finish button, the virtual machine process begins. If you selected to have the space for the new virtual disk pre-allocated, you will get the (above) "Create the disk" progress dialog.


Screen 14: - New Virtual Machine Created

If everything goes successful, you will have the new virtual machine in your "Favorites" list.



Optional Virtual Machine Configuration Steps

Since the virtual machine I have created will only be used to host Oracle, there are several devices that I can successfully remove from the virtual machine. Having the virtual machine virtualize these unnecessary hardware is a waste of resources that could be better served with running Oracle.

Some considerations are removing floppy drives and sound cards. In my configuration, the only device I want to remove is the audio device. Select the "Edit virtual machine settings" and navigate to the device you want to remove. The following screen shot shows how to remove the audio device:


The following screen show shows the devices that are configured now for my new virtual machine:



Installing Windows XP Professional

Now that we have our new virtual machine, the only step remaining is to install Windows XP Professional to this virtual machine. Microsoft Windows XP Professional comes on one CD. To start, insert the CD into the physical CD-ROM drive and then power up the new virtual machine. There are several ways to power up the virtual machine:

As I did in the previous section for creating the new virtual machine, I provide all screen shots for installing Windows XP Professional to our new virtual machine.


Screen 1: - Setup Screen

After inserting the Windows XP Professional Installation CD into the physical CD-ROM and powering up the new virtual machine it should boot from the installation CD. What happens now is a normal Windows installation.

The first screen is main Windows setup screen. To start the Windows XP installation process press [Enter] to continue.


Screen 2: - License Agreement

Read over the Microsoft Windows XP License Agreement. If you agree, hit [F8] to continue.


Screen 3: - Installation Destination

The installer is asking where to install the Windows XP operating system files. If you have been following the example in this article, we created a 10GB IDE disk for this virtual machine. It is that disk we will use, however, notice that it is not partitioned. At this point, we can hit [C] to create a partition or simply select to [Install] to the unpartitioned slice. I always just choose to [Install] to the unpartitioned slice. If you do simply hit [Enter] on the unpartitioned slice, it will create a single partition that is the size of the entire disk. This will be sufficient for this install.


Screen 4: - Format Disk

The installer now wants to know how to format the new disk. Always use the default option, "Format the partition using the NTFS file system".


Screen 5: - Formatting Hard Drive

The installer will then format the new disk. This process should take only a minute or two and no user intervention is required. You should see the above screen shot when the format is complete.


Screen 6: - Copying Files

Once the format is complete, the installer will then start copying files. Once again, no user intervention is required.


Screen 7: - Reboot System

The installer will then need to reboot the machine. (Just wouldn't be Windows without a reboot!)


Screen 8: - Continue Setup

After the virtual machine reboots Windows, the installer will continue copying more files for the installation. No user intervention is required.


Screen 9: - Regional and Language Options

The installation program will now start asking questions starting with the Regional and Language Options. Click [Next] to accept the defaults displayed or use the [Customize...] or [Details...] button to change the Language or Keyboard options.


Screen 10: - User Settings

Enter your personal / user information and click [Next] to continue.


Screen 11: - Computer Name / Administrator Password

Now enter the hostname that will be used for this computer (virtual machine). You will also need to set the password for the Administrator account. Click [Next] to continue.


Screen 12: - Date and Time Settings

Enter the correct date and time along with your time zone. Click [Next] to continue.


Screen 13: - Networking

Now for the most important part of the install process - Networking. My virtual will be used to host Oracle. For this reason, I want to ensure that the virtual machine will not use DHCP. Using the default option "[Typical settings]" will configure this machine with DHCP. I typically choose "[Custom settings]". This will allow me to configure my IP address along with other settings.


Screen 14: - Configure TCP/IP

Select the component "Internet Protocol (TCP/IP)" and click the [Properties] button.


Screen 15: - Internet Protocol (TCP/IP) Properties

Enter all networking parameters for your environment and click [OK]. This will put you back to the Network Components screen. Click [Next] to continue.


Screen 16: - Workgroup or Computer Domain

My new virtual machine will not be part of a Windows Domain. Make your choice and click [Next] to continue.


Screen 17: - Continue Installation

The installer will then continue the installation. No user intervention is required. On my laptop, this installation took about 15 minutes. Once that is complete, the virtual machine will be re-booted.


Screen 18: - Welcome to Microsoft Windows

After the re-boot, the Windows XP installation is complete. Windows will then display a Welcome Screen. Simply navigate through the next several screens to complete the install.



Install VMware Tools

Although this is an optional step, you really should install the VMware Tools for the new virtual machine. First, make sure that your virtual machine (Windows XP Professional) is running. Note that you will have to hit [CTL] - [ALT] to gain control of your mouse outside of the virtual machine. From the VMware menu, choose [VM] -> [Install VMware Tools].


Screen 1: - Installing the VMware Toolkit

Accept the following dialog box by clicking on [Install].


Screen 2: - Welcome Screen

This will start the VMware Tools installation wizard from within the new virtual machine. Click [Next] to start the installation process.


Screen 3: - Setup Type

For my new virtual machine, I will only be using it with WMware Workstation to the default option of [Typical] is good enough for me. Click [Next] to continue.


Screen 4: - Ready to Install the Program

Click [Install] to start the installation.


Screen 5: - Hardware Installation Warning

During the install process, Windows puts up several warnings indicating that the drivers being installed are "unsigned". You can ignore these warning and select the option needed to proceed with the installation. For Windows XP, this is the [Continue Anyway] button.

After finishing the installation, you will need to re-boot the virtual machine. (Just wouldn't be right if we didn't reboot once more!)



Backing up the New Virtual Machine

Now that you have your new virtual machine configured and working, this would be a good time to back it up. This is a very straightforward process as the virtual machine is nothing more than a few files in a directory.

The first step is to shutdown the virtual machine. You can power down the virtual machine by simply shutting down Windows. I also like to completely close out VMware before starting the copy.

Once this is done, simply backup the appropriate files as shown below:

C:\> dir /A-R "C:\Documents and Settings\jhunter\My Documents\My Virtual Machines"
 Volume in drive C has no label.
 Volume Serial Number is 64AF-1569

 Directory of C:\Documents and Settings\jhunter\My Documents\My Virtual Machines

01/13/2005  03:17 PM    <DIR>          .
01/13/2005  03:17 PM    <DIR>          ..
01/13/2005  05:26 PM    <DIR>          vmlinux1
01/13/2005  05:26 PM    <DIR>          vmwindows1
               0 File(s)              0 bytes
               4 Dir(s)   5,637,087,232 bytes free

C:\> mkdir "N:\Virtual Machine Backups\vmwindows1"

C:\> xcopy "C:\Documents and Settings\jhunter\My Documents\My Virtual Machines\vmwindows1" "N:\Virtual Machine Backups\vmwindows1" /s /e
C:\Documents and Settings\jhunter\My Documents\My Virtual Machines\vmwindows1\nvram
C:\Documents and Settings\jhunter\My Documents\My Virtual Machines\vmwindows1\vmware.log
C:\Documents and Settings\jhunter\My Documents\My Virtual Machines\vmwindows1\vmwindows1-flat.vmdk
C:\Documents and Settings\jhunter\My Documents\My Virtual Machines\vmwindows1\vmwindows1.vmdk
C:\Documents and Settings\jhunter\My Documents\My Virtual Machines\vmwindows1\winXPPro.vmx
5 File(s) copied


Copyright (c) 1998-2017 Jeffrey M. Hunter. All rights reserved.

All articles, scripts and material located at the Internet address of http://www.idevelopment.info is the copyright of Jeffrey M. Hunter and is protected under copyright laws of the United States. This document may not be hosted on any other site without my express, prior, written permission. Application to host any of the material elsewhere can be made by contacting me at jhunter@idevelopment.info.

I have made every effort and taken great care in making sure that the material included on my web site is technically accurate, but I disclaim any and all responsibility for any loss, damage or destruction of data or any other property which may arise from relying on it. I will in no case be liable for any monetary damages arising from such loss, damage or destruction.

Last modified on
Sunday, 15-Jul-2007 22:21:02 EDT
Page Count: 14345