DBA Tips Archive for Oracle

  


Creating a New Virtual Machine - (Solaris 10)

by Jeff Hunter, Sr. Database Administrator


Contents

  1. Overview
  2. Host Machine and Virtual Machine Configuration
  3. Create a New Virtual Machine for Solaris 10 (x86)
  4. Optional Virtual Machine Configuration Steps
  5. Installing Solaris 10 (x86)
  6. Backing up the New Virtual Machine



Overview

This article provides the necessary steps to successfully create a new Virtual Machine (VM) using WMware Workstation 6.0.0 to host the Solaris 10 - (x86 Platform Edition / November 2006) Operating Environment.

Why post an article like this on the Oracle DBA Tips section of my website? Well, this product provides a unique opportunity for me to have Windows XP running on my laptop with the ability to install another operating environment (Linux, Solaris x86, or even another version of Windows) on the same machine without the need for dual-booting. VMware Workstation provides me with a virtual machine that can run any of the above mentioned operating systems simultaneously with Windows XP on my laptop. This provides me with the flexibility to perform new installs or test new features of the Oracle database while not interrupting my somewhat stable Oracle install on the laptop.

With VMware Workstation, the virtual machine is nothing more than a directory of several files. After creating a virtual machine (Linux, Solaris, etc.) I typically close down the virtual machine and backup the 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 leaves me the ability to install and configure Oracle on the virtual machine without the worry of messing anything up that will take a long time to fix. 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 Linux and Solaris x86 when I have only my laptop. Although I have several Linux and Sun machines at home, I may be on the road with no access to my vast array of equipment. This is where both VMware and Solaris (x86) come in handy.

For instructions on installing VMware Workstation on to the Windows XP Professional operating environment, see my article entitled "Installing VMware Workstation 6.0 - (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. Note that I have a 300GB external hard drive connected to my laptop. While the VMWare Workstation software will be installed on the internal hard drive, (C:), I will be using the external hard drive, (M:), for all virtual machines.

Host Machine
Host Machine Name melody.idevelopment.info - (192.168.1.106)
Host Operating Environment Windows XP Professional
WMware Version VMware Workstation - Release 6.0.0 (Build 45731)
Host Machine Dell Inspiron 8600 Laptop
Memory 2GB Installed
(The new virtual machine will take 1GB from this 2GB)
Internal Hard Drive 60GB
External Hard Drive 300GB
Processor 2.0 GHz.
File System NTFS
Guest Machine
Virtual Machine Configuration
Guest Operating Environment Solaris 10 - (x86) / November 2006
Guest Machine Name vmsun1.idevelopment.info - (192.168.1.115)
Memory 1GB
Hard Drive 32GB
Virtual Machine Location M:\My Virtual Machines\Workstation 6.0\vmsun1



Create a New Virtual Machine for Solaris 10 (x86)

Finally, we get to actually creating the virtual machine for Solaris 10. 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 the 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: - Choose the Virtual Machine Hardware Compatibility

This screen allows you to select the "Hardware Compatibility" features that will be needed for the new virtual machine. Keep the default "Hardware Compatibility" selection of [Workstation 6] and click [Next] to continue.


Screen 4: - Select a Guest Operating System

You are now asked for what guest operating system will be installed to this new virtual machine. Choose [Sun Solaris] as the Guest Operating System and [Solaris 10] as the version. Click [Next] to continue.


Screen 5: - Name the 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.e. "Solaris 10"). 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 [vmsun1] so this is what I will type in for the name and the directory. Also note that I am creating the new virtual machine on my external hard drive M:. 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 and location for the virtual machine, click [Next] to continue.


Screen 6: - Processor Configuration

Select the number of virtual processors to be used for this virtual machine. I typically stick with the default value of one. Click [Next] to continue.


Screen 7: - Memory for the Virtual Machine

Both Oracle9i and Oracle10g require a minimum of 512MB 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 1GB of memory (1008MB) given that I have 2GB 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 8: - 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 9: - 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 10: - Select a Disk

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


Screen 11: - Select a Disk Type

You now need to choose a disk type. I always keep the default option which for Solaris 10 (x86) makes the new virtual disk an IDE disk. Click [Next] to continue.


Screen 12: - 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 32GB of space. Although I have the space on my internal hard drive for my laptop, I will be using an external hard drive connected to my laptop, M:, to store the virtual machine. Using the external hard drive, I now have plenty of spare room and decide to make mine 32GB. 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 and should pre-allocate this space (in my case 32GB) by selecting the check-box "Allocate all disk space now". After selecting the disk size and choosing to allocate all disk space now, click [Next] to continue.


Screen 13: - 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 call it "Disk0.vmdk". 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 14: - Creating the disk - Progress Dialog

After clicking 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) [Creating the disk] progress dialog.


Screen 15: - Virtual machine created successfully

If everything was successful, the wizard will display the "Virtual machine created successfully" dialog. If you do not want the new virtual machine wizard to disaply this dialog after creating a new virtual machine, select the "Do not show this page again" checkbox and click [Close].


Screen 16: - New Virtual Machine Created

The new virtual machine wizard will place the new virtual machine created 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 components 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, I want to remove the floppy drive and audio device. Select [Edit virtual machine settings] and navigate to the device you want to remove. The following screen shot shows how to remove the floppy drive:


The following screen shows the devices that are now configured for my new virtual machine after removing the audio device and floppy drive:



Installing Solaris 10 (x86)

Now that we have our new virtual machine, the only step remaining is to install Solaris 10 (x86) to this virtual machine. Solaris 10 (x86 Platform Edition / November 2006) comes on five CDs.

To start, insert Disk #1 of Solaris 10 (x86) 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 Solaris 10 (x86) to our new virtual machine.


Screen 1: - GRUB O/S Boot Screen

The first screen is the [GRUB O/S Boot Screen] which provides a list of which O/S kernel to boot. Leave the default of [Solaris] selected and hit [Enter].


Screen 2: - Installation Type

You are now being asked for the session type to use for installation. You will want to select [Solaris Interactive (default)] and hit [Enter] to continue.


Screen 3: - View and Edit Window System Configuration

For my configuration, the installer was able to detect my video driver and monitor. If you need to make any changes, hit [Esc] and make any appropriate modifications; otherwise, hit [Enter] to continue.


Screen 4: - Select a Language

The installer now goes into graphical mode to continue the install. Select the language you will be using then hit [Enter] to continue.


Screen 5: - Solaris Install Console

The installer now goes into full graphical mode to continue the install. From the [Welcome] screen, click [Next] to start the installation / configuration process.


Screen 6: - Network Connectivity

If you want this machine to be networked (mine will be), keep the default option of [Networked] and click [Next] to continue.


Screen 7: - DHCP

Since I will be using this virtual machine to host Oracle, we DO NOT want to configure this machine for DHCP. Select [No] DHCP and click [Next] to continue.


Screen 8: - Host Name

Enter the host name for this machine and click [Next] to continue.


Screen 9: - IP Address

Enter the IP Address for this machine and click [Next] to continue.


Screen 10: - Netmask

Depending on the IP address you entered, the installer attempts to choose the correct netmask based on its class. For my IP address, I will be using the default option of [255.255.255.0]. Verify the correct netmask for your subnet and click [Next] to continue.


Screen 11: - IPv6

In most cases, we will not want to configure this machine using the newest IPv6 Internet Protocol. Keep the default option of [No] and click [Next] to continue.


Screen 12: - Set the Default Route

The default option is to detect a default route on reboot. I would rather specify a specify gateway. If you know your default gateway, select the second option [Specify one] and click [Next] to continue.


Screen 13: - Kerberos

I will not require Kerberos security when working with my Oracle configurations and keep this option to [No]. Click [Next] to continue.


Screen 14: - Name Service

I will be using DNS as the naming service for my new machine. Choose your naming service and click [Next] to continue.


Screen 15: - Name Service

My domain name is "idevelopment.info". Enter your domain name and click [Next] to continue.


Screen 16: - DNS Server Address

If you selected DNS as the naming service for you machine, you will need to supply valid IP addresses for your DNS server(s). When done, click [Next] to continue.


Screen 17: - DNS Search List

Enter any domain names you would like to be used for DNS queries. After adding any domain names (if any) click [Next] to continue.


Screen 18: - Time Zone

Select which method you want to use to specify your time zone then select your time zone.


Screen 19: - Date and Time

Enter the correct date and time and click [Next] to continue.


Screen 20: - Root Password

Enter the root password you want to use for this node and click [Next] to continue.


Screen 21: - Enabling Remote Services

Keep the default selection which is to "Enable" remote services and click [Next] to continue.


Screen 22: - Confirm Information

This is simply a confirmation screen. Review the options you have made and click [Confirm] to continue.


Screen 23: - Welcome / Installation Options / Software License Agreement

The next several screens specify the Solaris installation options. You are asked to specify the media you will be using for the installation as well as reading and agreeing to the Software License Agreement.


Screen 24: - Install Type

I generally select the [Custom Install] type of installation. Click [Next] to continue.


Screen 25: - Software Localizations

Select the geographic regions for your install and click [Next] to continue.


Screen 26: - System Locale

Select the locale to be used for your system and click [Next] to continue.


Screen 27: - Select Additional Products

Select any additional (add-on) products to install. I typically select the "Sun Validation Test Suite", however non of the add-on products are needed when the node will be used for Oracle. Plus they can be added at a later time if needed. Click [Next] to continue.


Screen 28: - Solaris Software Group

When installing Solaris for hosting Oracle, I always install the [Entire Group] option. Click [Next] to continue.


Screen 29: - Disk Configuration

We configured this virtual machine with one 32GB disk. That disk will be selected by default to be used to install the Solaris software to. Select this disk to partition. I generally select to create only one partition for the entire disk. Then when presented with the file system layout, I like to Modify the default settings to remove the /export/home directory and allocate all of its space to root (/). I then allocate at least 2GB for the swap partition.


Screen 30: - Ready to Install

This is simply a confirmation screen. Review the options you have made and click [Install Now] to start the Solaris installation.


Screen 31: - Installation Complete / Reboot

After the installation is complete, you will be asked to reboot the system in order to continue the installation process. Click [Next] on the Installation Summary screen then [Reboot now] to reboot the system.


Screen 32: - Reboot Screens

When the system reboots, you can allow the boot loader (GRUB) boot the default kernel (Solaris 10). You can select [No] when asked if you would like to override the system's default NFS 4 version domain name.


Screen 33: - Install Disks 2 / 3 / 4 / 5

The Solaris installer will continue by asking what media device you will be using to continue the install. You will select the [CD/DVD] option and click [Next] to continue. The installer will eject the CD from the CD-ROM. Insert Disk #2 from the Solaris 10 Software kit and click [Ok] to continue. After the installer verifies the correct CD has been entered, you can then continue with the installation process by clicking [Install Now].

Continue switching out disks 3, 4, and 5 until the Solaris software is completely installed.


Screen 34: - Installation Complete / Reboot

When the installation of disk 5 is complete, the installation of Solaris 10 is complete. You will then be asked to reboot the system one final time.

  After the Solaris x86 Operating Environment boots for the first time, it will take longer than normal to fully come up. During the boot process, the screen may go blank (just a black screen) for several minutes! During this time, do not power down the virtual machine. Eventually, the GUI Windows Manager will come up and you will be able to login to further customize Solaris.



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 Solaris. 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 "M:\My Virtual Machines\Workstation 6.0"
 Volume in drive M is Maxtor II (1394a FW400 - VMs)
 Volume Serial Number is 0C08-8CA4

 Directory of M:\My Virtual Machines\Workstation 6.0

07/15/2007  06:09 PM    <DIR>          .
07/15/2007  06:09 PM    <DIR>          ..
07/15/2007  06:09 PM    <DIR>          racdb1
07/15/2007  06:09 PM    <DIR>          racdb2
07/15/2007  06:09 PM    <DIR>          racdb3
07/15/2007  06:09 PM    <DIR>          racdb4
07/15/2007  06:09 PM    <DIR>          vmlinux1
07/15/2007  06:09 PM    <DIR>          vmlinux2
07/15/2007  06:09 PM    <DIR>          vmlinux3
07/15/2007  06:09 PM    <DIR>          vmlinux4
07/15/2007  06:09 PM    <DIR>          vmlinux5
07/15/2007  06:09 PM    <DIR>          vmlinux6
07/15/2007  07:42 PM    <DIR>          vmsun1
07/15/2007  06:09 PM    <DIR>          vmsun2
07/15/2007  06:09 PM    <DIR>          vmsun3
07/15/2007  06:09 PM    <DIR>          vmsun4
07/15/2007  06:09 PM    <DIR>          vmwindows1
07/15/2007  06:09 PM    <DIR>          vmwindows2
07/15/2007  06:09 PM    <DIR>          vmwindows3
07/15/2007  06:09 PM    <DIR>          vmwindows4
               0 File(s)              0 bytes
              20 Dir(s)  264,422,053,888 bytes free


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

C:\> xcopy "M:\My Virtual Machines\Workstation 6.0\vmsun1" "N:\Virtual Machine Backups\vmsun1" /s /e
M:\My Virtual Machines\Workstation 6.0\vmsun1\Disk0-flat.vmdk
M:\My Virtual Machines\Workstation 6.0\vmsun1\Disk0.vmdk
M:\My Virtual Machines\Workstation 6.0\vmsun1\Solaris 10.nvram
M:\My Virtual Machines\Workstation 6.0\vmsun1\Solaris 10.vmsd
M:\My Virtual Machines\Workstation 6.0\vmsun1\Solaris 10.vmxf
M:\My Virtual Machines\Workstation 6.0\vmsun1\vmware.log

6 File(s) copied


Copyright (c) 1998-2014 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
Saturday, 18-Sep-2010 17:56:31 EDT
Page Count: 19166