Monday, April 28, 2008

Oracle VM Server

Installing and Configuring Oracle Enterprise Linux 5 with Oracle Database 11g Release 1 as a Paravirtualized Machine (PVM) on an Oracle VM Server

This tutorial describes how to install Oracle Enterprise Linux 5 with Oracle Database 11g Release 1 as a paravirtualized machine (PVM) on an Oracle VM Server.


This tutorial covers the following topics:
Preparing the environment
Creating a paravirtualized machine with Oracle Enterprise Linux 5
Performing Linux operating system pre-installation steps for Oracle Database 11g
Installing Oracle Database 11g
Viewing Screenshots

Place the cursor over this icon to load and view all the screenshots for this tutorial. (Caution: This action loads all screenshots simultaneously, so response time may be slow depending on your Internet connection.)

Note: Alternatively, you can place the cursor over an individual icon in the following steps to load and view only the screenshot associated with that step. You can hide an individual screenshot by clicking it.

When completed, Oracle Enterprise Linux 5 along with Oracle Database 11g Release 1 will be installed and configured as paravirtualized machine.

Back to Topic List

Before you perform this tutorial, you should:
1. Download the ISO files for Oracle Enterprise Linux 5 from
2. Download the ISO file for Oracle VM Server from
3. Download Oracle VM Server Installation Guide Release 2.1 from
4. Install Oracle VM Server using Oracle VM Server Installation Guide Release 2.1. The documentation includes step by step instructions with screen shots similar to Oracle By Example.
5. To access the GUI console of the virtual machine you will need to use a VNC viewer from a host other than the Oracle VM Server. Download a VNC Viewer such as TightVNC, to the host from which you will access the console.

TightVNC Viewer is available for Linux and Windows. A VNC Viewer for Linux may be downloaded as an RPM from For Windows from

Preparing the environment

Perform the following steps:
1. Prior to beginning this tutorial you should have completed the installation of Oracle VM Server. The Oracle VM Server Installation Guide Release 2.1 includes step by step instructions with screen shots similar to Oracle By Example.

Connect to the Oracle VM Server as root. When connecting to the Oracle VM Server as root, you are connecting to dom0.

2. The install of Oracle VM Server will have created a /OVS directory. Verify the directory exists.

ls -al /OVS

3. Create directories /OVS/running_pool and /OVS/iso_pool. If you choose to implement Oracle VM Manager at a later time, creating and using these directories will ease the transition.

mkdir /OVS/running_pool
mkdir /OVS/iso_pool

Directory running_pool will contain virtual machines. Directory iso_pool will contain ISO files.

4. Make directory /media/iso and /el/EL5-x86. Directory /media/iso will be used as the mount point for the ISO files. Directory /el/EL5-x86 will contain the operating system installation software and will be exported to the virtual machine.

mkdir /media/iso
mkdir -p /el/EL5-x86

5. During the installation of the operating system for a paravirtualized machine, the location of the install media can not be changed, thus installing directly from multiple CD ISO files is not possible. Steps 7 through 9 show the steps to create a directory tree of the CD ISO files for installing the operating system.

The install can be made directly from a single ISO file such as the DVD ISO of Enterprise Linux 5. Step 11 shows how to setup the install from a single DVD ISO.

Oracle VM Server User's Guide Release 2.1 contains other installation options.

6.The prerequisites section instructed you to download the ISO files for Enterprise Linux 5 from Move the CD ISO files for Enterprise Linux 5 to directory /OVS/iso_pool.

This example shows the installation of the operating system files from the Oracle VM Server using NFS. The operating system installation files do not have to be installed from the Oracle VM Server. The operating system can be installed from another server as long as the server can provide the files to PVM using NFS or HTTP.

7. Mount the first Enterprise Linux 5 ISO file to /media/iso.

mount -t iso9660 -o ro,loop /OVS/iso_pool/Enterprise-R5-U1-Server-i386-disc1.iso /media/iso

8. Change directory to /media/iso. Copy the contents of /media/iso to /el/EL5-x86 using the -var options.

cd /media/iso
cp -var * /el/EL5-x86/

9. Change to another directory and umount the /media/iso directory.

umount /media/iso

10. Repeat the steps 7 to 9 for each ISO file. If prompted to overwrite a file reply no, 'n'.

11. This step is for setting up installation from a single DVD ISO file. If you have multiple CD ISO files skip this step.

mount -t iso9660 -o ro,loop /OVS/iso_pool/Enterprise-R5-U1-Server-i386-dvd.iso /el/EL5-x86

12. Make certain the services related to NFS are started

service portmap start
service nfs start

13. Check the location to be exported.

ls -al /el/EL5-x86

14. Export the mount point to make it available to domU. The first command below exports the directory. The second and third commands verify the export.

exportfs *:/el/EL5-x86
showmount -e stcovmsvr01

Creating a paravirtualized machine with Oracle Enterprise Linux 5
1.You will need to know a few pieces of information before running the script to create the virtual machine.

* Name of the virtual machine. This example will use the name vm01
* Amount of memory to allocate to the virtual machine in megabytes, this example will use 1536 (1.5G).
* Path to the disk. The path to the disk will be under /OVS/running_pool, to keep in line with the standard of Oracle VM Manager. The path this example will use is /OVS/running_pool/vm01/system.img. The format for Oracle VM Manager is /OVS/running_pool//system.img.
* Size of the disk in gigbytes. We will use 20.
* Do you want to enable graphics support? (yes or no). Do you want a GUI OS install or a text based OS install? This example while choose yes for a GUI OS install.
* Location of the install media, nfs:oraclevmserverhostname:/el/EL5-x86. The format here is nfs followed by a colon, the hostname of the box containing the mount point followed by a colon, then the mount point. This example uses When hosting the NFS mount point on the Oracle VM Server where you are creating domU, you must use the IP Address of the Oracle VM Server in place of the hostname.

2. Create the directory that will contain the virtual machine files, /OVS/running_pool/vm01.

mkdir /OVS/running_pool/vm01

3. Create the virtual machine by executing the command virt-install


4. Answer the prompts:

What is the name of your virtual machine? vm01
How much RAM should be allocated (in megabytes)? 1536
What would you like to use as the disk (path)? /OVS/running_pool/vm01/system.img
How large would you like the disk to be (in gigabytes)? 20
Would you like to enable graphics support? yes
What is the install location? nfs:oraclevm_server_ip_address:/el/EL5-x86

5. Next you will see something similar to this:

Starting install...
libvir: Xen Daemon error: GET operation failed:
Unable to connect to graphical host: DISPLAY is not set.
Please connect to localhost :5900
Domain installation still in progress. You can reconnect
to the console to complete the installation process.

6. Oracle VM Server attempted to connect to a graphics enabled installation of the operating system. Since virt-install is executed from a non-GUI environment, it is unable to display the console within the given window.

To display the GUI OS installation, Oracle VM Server started the GUI session in a VNC Session on port 5900. From another computer, use a VNC Viewer to view the console for the virtual machine. No password is required for connecting to the VNC Viewer when using virt-install to create a virtual machine. It is possible to configure the the setup to require a password before starting virt-install.

The message displayed: "Please connect to localhost:5900." Access to the VNC session must be from another computer. Using the hostname localhost from another computer will not work, the hostname of the Oracle VM Server is required. The value 59xx determines the port to be supplied with the hostname. In this case port 5900 is the port is :0 for a VNC viewer. If the was port 5901 then the port would be :1 for a VNC Viewer.

In a VNC Viewer use the format oraclevm_server_hostname:port to connect to the console for domU.

Making the following changes to the options in TightVNC is useful for better mouse control within the session.

Click Options. Under the Connection tab, in the section Mouse cursor, select Let remote server deal with mouse cursor.

Under the Globals tab, in the section Local cursor shape, select No local cursor.

Click OK.

7. Choose a Language.

8. Choose a keyboard.

9. Configure TCP/IP. Make the appropriate chooses for your network environment.: dynamic (DHCP) or manual. This example will demonstrate manual. When manual configuration is chosen an additional TCP/IP configuration screen will appear.

10. Manual TCP/IP Configuration. Make the entries appropriate for your network environment: IPv4 address, netmask, gateway, and name server.

11. Click Next.

12. Click Yes.

13. Choosing default partitioning creates a swap area smaller than the requirements of the Oracle Database installation. The partitioning layout will need to be modified.

Check the box next to Review and modify partitioning layout.
Click Next.

14. A warning will pop up. Read the warning.

Click Yes.

15. Highlight VolGroup00. Click Edit.

16. Highlight LogVol00. Click Edit.

17. Size (MB), change the value to 16256.

Click OK.

18. Highlight LogVol01. Click Edit.

19. Size (MB), change the value to 4096.

Click OK. Click OK.

20. Click Next.

21. Click Next.

22. Click Next.

23. Choose the appropriate time zone.
Click Next.

24. Enter a secure password.
Click Next.

25. Check the box next to Software Development. Select Customize now. Click Next.

26. Select Base System. Check the box next to Legacy Software Development. Click Optional packages.

27. Check the box next to compat-db. Click Close.

28. Select Base System. Check the box next to System Tools. Click Optional packages.

29. Slide down and check the box next to sysstat. Click Close.

30. Click Next.

31. Click Next.

32. Installing Packages.

33. Click Reboot.

34. After clicking Reboot domU, the paravirtualized machine, shuts down. The VNC session connection closes as well. You must restart domU to continue the installation. In a terminal window connection to the Oracle VM Server management domain (dom0) issue this command to restart domU:

xm create vm01

35. The port used for displaying the console in VNC should be the same as before. To verify, execute this command:

xm list -l

36. In the VNC Viewer use the format oraclevm_server_hostname:port to connect to the console for domU.

37. Click Forward.

38. Read the license agreement. If you agree, select Yes, I agree to the License Agreement.

Click Forward.

39. Click on the Firewall drop down menu and select Disabled. Click Forward.

40. Read the warning. Click Yes.

41. Click on the SELinux Setting drop down menu and select Disabled. Click Forward.

42. Read the warning. Click Yes.

43. Click Forward.

44. Set the correct date and time. Click Forward.

45. Click Forward.

46. Read the warning. Click Continue.

47. Click Forward.

48. Click Finish. Click OK.

49. After clicking Finish and OK, domU reboots. This time the VNC Viewer session will close, but domU does not require a manual start. Restart the VNC Viewer session using the same port as the previous session. A quick restart of the VNC Viewer session will generate an error. Give the operating system a moment to restart before starting a VNC Viewer session.

50. OS installation complete.

Login. User root. Password oracle.

51. Open a terminal window. Two options for opening a terminal window:

1. Right click on the desktop and select Open Terminal.

2. From the menu bar select Applications -> Accessories -> Terminal.

52. Install additional RPMs needed for the Oracle Database installation.

Mount the OS installation media.

In the open terminal window execute these commands:

mkdir /mnt/el5
mount -t nfs -o ro oraclevm_server_ip:/el5/EL5-x86 /mnt/el5
cd /mnt/el5/Server

53. Install RPM libaio-devel.


rpm -ivh libaio-devel*

54. Install RPMs unixODBC and unixODBC-devel.


rpm -ivh unixODBC-2* unixODBC-devel-2*

Back to Topic List
Performing Linux operating system pre-installation steps for Oracle Database 11g

Perform the following steps:
1. Configure the kernel.

Edit /etc/sysctl.conf.

Add the following to the file:

# Kernel parameters required by Oracle 11gR1
fs.file-max = 6553600
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 262144

2. For the /etc/sysctl.conf changes to take effect now issue this command.

sysctl -p

3. Edit /etc/security/limits.conf

Add these lines:

oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536

4. Edit /etc/pam.d/login

Add these lines:

session required /lib/security/
session required

5.Edit /etc/profile

Add these lines:

if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
ulimit -u 16384 -n 65536

6. Create the operating system user to own the software installation and the supporting groups.

groupadd oinstall
groupadd dba
groupadd oper
useradd oracle
usermod -g oinstall -G dba,oper,oracle oracle
passwd oracle

7. Edit /home/oracle/.bash_profile

Add these lines:

umask 022


export PATH

8. Create the software installation directory.

mkdir -p /u01/app
chown root:oinstall /u01/app
chmod 775 /u01/app

Back to Topic List
Installing Oracle Database 11g

Perform the following steps:
1. If you are logged into the virtual machine as root logout

2. Click Logout.

3. Login as oracle. Password oracle.

4. Click the Globe with a mouse icon on the top menu bar.

5. Firefox will start. To continue you may need to configure your browser for your firewall if one is in place. If you are uncertain of the proper settings for your network environment consult your network administrator.

6. Enter the URL

Follow the links on the Oracle web site to Database 11g and download the database software.

7. The zip file downloads to /home/oracle/Desktop. Once the download is complete the file should be seen on the desktop. Right click on the desktop and open a terminal window.

8. Create a directory to contain the unzipped files. As root, create directory /stage and give it permissions 777. The password used for root in this tutorial is oracle.

su - root
mkdir /stage
chmod 777 /stage

9. Unzip the file under /stage.

cd /stage
unzip /home/oracle/Desktop/

10. Change directory to OS user oracle home directory and start the Oracle Universal Installer.


11.Select a database password and enter the password in the text boxes for Database Password and Confirm Password.

Click Next.

12. Click Next.

13.If all of the pre-configuration steps where completed you should receive the message:

0 requirements to be verified.

Click Next.

14.Click Next.

15.Click Install.

16. Wait.

17. Click OK.

18. The installer now directs you to run to scripts as root.

19.Open a terminal window and execute the following commands. The password for root is oracle.

su -

20. In the same terminal window and execute this command. When prompted press ENTER.


21. Return to the Oracle Universal Installer. Click OK.

22. Click Exit.

23. Click Yes.

Back to Topic List


In this tutorial, you learned how to:
Install Enterprise Linux 5 General Availability
Configure the operating system for an Oracle Database 11g installation
Install Oracle Database 11g Release 1


A configurable set of resources, including memory, virtual CPUs, network devices and disk devices, in which virtual machines run. A domain is granted virtual resources and can be started, stopped and rebooted independently. See also dom0 and domU.

An abbreviation for domain zero. The management domain with privileged access to the hardware and device drivers. Dom0 is the first domain started by the Oracle VM Server at boot time. Dom0 has more privileges than domU. It can access the hardware directly and can manage the device drivers for other domains. It can also start new domains.

An unprivileged domain with no direct access to the hardware or device drivers. Each domU is started by Oracle VM Server in dom0. The xm command-line tool is used to interact with each domU.

A guest operating system that runs within a domain in Oracle VM Server. A guest
may be paravirtualized or hardware virtualized. Multiple guests can run on the same
Oracle VM Server.
Hardware virtualized machine (HVM)

A virtual machine with an unmodified guest operating system. It is not recompiled for the virtual environment. There may be substantial performance penalties running as a hardware virtualized guest. Enables Microsoft Windows™ operating system to be run, as well as legacy operating systems. Hardware virtualization is only available on Intel VT or AMD SVM CPUs.
Paravirtualized machine (PVM)

A virtual machine with a kernel that is recompiled to be made aware of the virtual environment. Runs at near native speed, with memory, disk and network access optimized for maximum performance.
Virtual Machine (VM)

A guest operating system and the associated application software that runs within Oracle VM Server. May be paravirtualized or hardware virtualized machines. Multiple virtual machines can run on the same Oracle VM Server.