Oracle DBA Tips Corner |
|
Creating a New Virtual Machine - (Solaris 9)
by Jeff Hunter, Sr. Database Administrator
Contents
Overview
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 Solaris while not
wanting to disturb my somewhat stable Oracle install on the laptop.
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 Solaris
when I have only my laptop. Although I have several Sun and Linux 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 9 (x86 Platform Edition) 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
Creating a New Virtual Machine for Solaris 9
The first screen is simply a Welcome screen. Click [Next] to
start the virtual machine creation process.
The default option in this screen will be to create a 'Typical' configuration. Change
this option to 'Custom' and click [Next] to continue.
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 9 (experimental)" as the version. Then click [Next] to continue.
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 "vmsun1" 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.
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.
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.
I always accept VMware's default option regarding the SCSI adapter to be
used and click [Next] to continue.
Once again, keep the default option of "Create a new virtual disk" selected and
click [Next] to continue.
You now need to choose a disk type. You should always keep the default
option here which for Solaris 9 (x86) is IDE.
Click [Next] to continue.
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.
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.
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.
If everything goes successful, you will have the new virtual machine in your
"Favorites" list.
Optional Virtual Machine Configuration Steps
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:
Installing Solaris 9 (x86 Platform Edition)
To start, insert Disk 1 of 2 of the Solaris 9 Software 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 9 (x86 Platform Edition) to
our new virtual machine.
The first screen is the "Solaris Device Configuration Assistant" screen.
To start the scan, hit the [F2] key.
The installer then displays all of the devices that it was able
to identify. Hit the [F2] key to continue.
The installer now wants to know where to find the Solaris kernel
to boot for the install. I am performing the install from CD-ROM.
Select the proper device and hit the [F2] key to continue.
You are now being asked for the install type. You will want to
select "Solaris Interactive" (1) and hit [Enter] to continue.
You may get a warning dialog message from VMware.
If this happens, it can be ignored. Hit [OK]
to continue.
Select the language you will be using.
Hit [Enter] to continue.
Select the locale you will be using.
Hit [Enter] to continue.
You are now in the Solaris Installation Program.
Hit the [F2] key to continue.
Hit the [F2] key to view and edit the current configuration
details for the window system.
For my configuration, the installer was not able to detect my
video driver and monitor. I had to navigate through the "Change Video Device/Monitor" screens
and put in my video card and monitor settings.
After making all of the changes for my system, here is a screen
shot of those choices:
You should now hit the [F2] key to test and save
the configuration.
To start the test hit the [F2] key.
If your window system configuration is valid, you should get this
screen. To continue and accept these values, click on the
large [Yes] button.
The installer now goes into graphical mode to continue the install. Using
the "sysidtool" screen, hit the [F2] key to continue.
If you want this machine to be networked (mine will be), keep the
default option of "Yes" and hit the [F2] key.
Since I will be using this virtual machine to host Oracle, we DO NOT
want to configure this machine with no DHCP. This is the default
option. Hit the [F2] key to continue.
Enter the host name for this machine and hit the [F2] key to continue.
Enter the IP Address for this machine and hit the [F2] key to continue.
In most cases, you will be configuring this machine as part of a subnet.
Keep the default selection of "Yes" and
hit the [F2] key to continue.
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.
Hit the [F2] key to continue.
In most cases, we will not want to configure this machine using
the newest IPv6 Internet Protocol. Keep the default option of
"No" and hit the [F2] key to continue.
The default option when selecting the Default Route is to detect
one on reboot. I would rather specify a specify gateway.
If you know your default gateway, select the second option "Specify one"
and hit the [F2] key to continue.
This screen allows me to enter my default route: 192.168.1.1.
Hit the [F2] key to continue.
This is simply a configuration screen. Review the options you have made
and hit the [F2] key to continue.
I will not require Kerberos security when working with my Oracle configurations
and keep this option to "No". Hit the [F2] key to continue.
This is simply a configuration screen. Review the options you have made
and hit the [F2] key to continue.
I will be using DNS as the naming service for my new machine. Choose
you naming service and hit the [F2] key to continue.
My domain name is "idevelopment.info".
Enter your domain name and hit the [F2] key to continue.
If you selected DNS as the naming service for you machine, you will need
to supply valid IP addresses to your DNS servers. When done,
hit the [F2] key to continue.
Enter any domain names you would like to be used for a DNS query.
After adding all domain names hit the [F2] key to continue.
This is simply a configuration screen. Review the options you have made
and hit the [F2] key to continue.
Select your time zone and hit the [F2] key to continue.
Select your Country / Region and hit the [F2] key to continue.
Select your time zone and hit the [F2] key to continue.
Enter the correct date and time and hit the [F2] key to continue.
This is simply a configuration screen. Review the options you have made
and hit the [F2] key to continue.
Select the "Standard" option and hit the [F2] key to continue.
Select geographic regions for your install and hit the [F2] key to continue.
When installing for hosting Oracle, I always install the
"Entire Distribution". Hit the [F2] key to continue.
We configured this virtual machine with one 10GB disk. That disk will be
selected by default to be used to install the Solaris software to.
Since this development there is no need to edit the disk partitions.
You can simply hit the "[F2]" key to continue.
Since this is development, we can simply let the installer autolayout
the file systems. You can simply hit the "[F2]" key to select
the autolayout option.
Simply accept the default file systems (/ and /swap) and hit the "[F2]" key to continue.
You may want to change some of the options in this screen although it is not
necessary for a successful configuration to support Oracle. Some of the things
I like to do is increase the size of the swap partition to 1GB. Also for development
purposes, I like to remove the /export/home partition and allocate all remaining
space to root (/). To edit any of these options, select the [F4] key
or simply hit the [F2] key to accept the defaults.
I have no remote file systems that I want to mount. If you do, enter them
and hit the [F2] key to continue.
This is simply a configuration screen. Review the options you have made
and hit the [F2] key to continue.
Leave the default option to "Auto Reboot" and hit the
[F2] key to start the installation.
You can safely ignore this screen and hit the
[F2] key to start the installation.
During the installation, the system will reboot and then ask for the
password for the root user account.
In many cases, you will receive a kdmconfig Mismatch Detected error. If this happens,
you can hit the [F2] key and go through the same configuration and test
process you did back in screen 9.
After getting past the kdmconfig screens, you should boot into CDE and
are asked where what media device you will be using to continue the
install. You will select the "CD/DVD" option (option 1) and hit the [Enter] key
to continue.
The installer will eject the CD from the CD-ROM. Insert Disk #2
from the Solaris 9 Software kit and hit the [Enter] key to continue
with the installation.
When the installation of Disk 2 is complete, the entire installation
of Solaris 9 is complete. From this screen, you can accept the default
option of "Done" and exit from the installer. You will then
be asked to reboot the system.
Backing up the New Virtual Machine
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:
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.
This article provides the necessary steps to successfully create
a new Virtual Machine (VM) using WMware Workstation 4.5.2 to host Solaris 9
(x86 Platform Edition).
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
Solaris 9 (x86 Platform Edition)
Guest Machine Name
vmsun1.idevelopment.info - (192.168.1.115)
Memory
512MB
Hard Drive
10GB
Finally, we get to actually creating the virtual machine for Solaris 9.
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
Screen 2: - Select Appropriate Configuration
Screen 3: - Select a Guest Operating System
Screen 4: - Name of Virtual Machine
Screen 5: - Memory for the Virtual Machine
Screen 6: - Network Type
Screen 7: - Select I/O Adapter Types
Screen 8: - Select a Disk
Screen 9: - Select a Disk Type
Screen 10: - Specify Disk Capacity
Screen 12: - Specify Disk File
Screen 13: - Creating the disk - Progress Dialog
Screen 14: - New Virtual Machine Created
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.
The following screen show shows the devices that are configured now for
my new virtual machine:
Now that we have our new virtual machine, the only step remaining is to
install Solaris 9 (x86 Platform Edition) to this virtual machine.
Solaris 9 (x86 Platform Edition) comes on three CDs:
in the toolbar.
Screen 1: - Solaris Device Configuration Assistant
Screen 2: - Identified Devices
Screen 3: - Boot Solaris
Screen 4: - Installation Type
Screen 5: - Select a Language
Screen 6: - Select a Locale
Screen 7: - The Solaris Installation Program
Screen 8: - kdmconfig - Introduction
Screen 9: - kdmconfig - View and Edit Window System Configuration
Screen 10: - Solaris Install Console
Screen 11: - Network Connectivity
Screen 12: - DHCP
Screen 13: - Host Name
Screen 14: - IP Address
Screen 15: - Subnets
Screen 16: - Netmask
Screen 17: - IPv6
Screen 18: - Set the Default Route
Screen 19: - Default Route IP Address
Screen 20: - Confirm Information
Screen 21: - Configure Security Policy
Screen 22: - Confirm Information
Screen 23: - Name Service
Screen 24: - Domain Name
Screen 25: - DNS Server Addresses
Screen 26: - DNS Search List
Screen 27: - Confirm Information
Screen 28: - Time Zone
Screen 29: - Country or Region
Screen 30: - Time Zone
Screen 31: - Date and Time
Screen 32: - Confirm Information
Screen 33: - Solaris Interactive Installation
Screen 34: - Select Geographic Regions
Screen 35: - Select Software
Screen 36: - Select Disks
Screen 37: - Automatically Layout Filesystems?
Screen 38: - Automatically Layout File Systems
Screen 39: - File System and Disk Layout
Screen 40: - Mount Remote File Systems?
Screen 41: - Profile
Screen 42: - Reboot After Installation?
Screen 43: - Information
Screen 44: - Enter root Password
Screen 45: - kdmconfig Mismatch Detected
Screen 46: - Media - Disk 2 of 2
Screen 47: - Media - Disk 2 of 2
Screen 48: - Disk 2 Complete
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.
# init 0
C:\> dir /A-R "C:\Documents and Settings\jhunter\My Documents\My Virtual Machines"
Volume in drive N is Large disk
Volume Serial Number is 400D-7710
Directory of N:\
File Not Found
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 07:08 PM <DIR> .
01/13/2005 07:08 PM <DIR> ..
01/14/2005 12:12 AM <DIR> vmlinux1
01/14/2005 12:12 AM <DIR> vmsun1
01/14/2005 12:12 AM <DIR> vmwindows1
0 File(s) 0 bytes
5 Dir(s) 5,606,281,216 bytes free
C:\> mkdir "N:\Virtual Machine Backups\vmsun1"
C:\> xcopy "C:\Documents and Settings\jhunter\My Documents\My Virtual Machines\vmsun1" "N:\Virtual Machine Backups\vmsun1" /s /e
C:\Documents and Settings\jhunter\My Documents\My Virtual Machines\vmsun1\nvram
C:\Documents and Settings\jhunter\My Documents\My Virtual Machines\vmsun1\solaris9.vmx
C:\Documents and Settings\jhunter\My Documents\My Virtual Machines\vmsun1\vmsun1-flat.vmdk
C:\Documents and Settings\jhunter\My Documents\My Virtual Machines\vmsun1\vmsun1.vmdk
C:\Documents and Settings\jhunter\My Documents\My Virtual Machines\vmsun1\vmware.log
5 File(s) copied
Sunday, 15-Jul-2007 22:20:48 EDT
Page Count: 5752