Oracle VM Templates Readme ========================== This document contains information on installing the Oracle VM templates. This document contains: - Oracle VM Templates - Default Passwords - Importing an Oracle VM Template into Oracle VM Manager - Importing from an Oracle VM Server - Importing from an HTTP or FTP Server - Importing an Oracle Database Template into Oracle VM Manager - Creating an Oracle Enterprise Linux Virtual Machine - Creating an Oracle Enterprise Linux Virtual Machine with an Oracle Database - selinux Oracle VM Templates =================== The templates listed below can be used for creating two types of virtual machines: - Oracle Enterprise Linux - Oracle Enterprise Linux with an Oracle Database The following Oracle VM templates are available: Template Kernel VCPU RAM Storage ---------------------------- ------------------------- ---- --- ------- OVM_EL4U5_X86_HVM_10GB 2.6.9-55.0.12.100.1.ELsmp 2 2GB 10GB OVM_EL4U5_X86_HVM_4GB 2.6.9-55.0.12.100.1.ELsmp 1 1GB 4GB OVM_EL4U5_X86_64_HVM_10GB 2.6.9-55.0.12.100.1.ELsmp 2 2GB 10GB OVM_EL4U5_X86_64_HVM_4GB 2.6.9-55.0.12.100.1.ELsmp 1 1GB 4GB OVM_EL4U5_X86_PVM_10GB 2.6.9-55.0.12.9.1.ELxenU 2 2GB 10GB OVM_EL4U5_X86_PVM_4GB 2.6.9-55.0.12.9.1.ELxenU 1 1GB 4GB OVM_EL5U1_X86_HVM_10GB 2.6.18-53.1.13.0.1.el5 2 2GB 10GB OVM_EL5U1_X86_HVM_4GB 2.6.18-53.1.13.0.1.el5 1 1GB 4GB OVM_EL5U1_X86_64_HVM_10GB 2.6.18-53.1.13.0.1.el5 2 2GB 10GB OVM_EL5U1_X86_64_HVM_4GB 2.6.18-53.1.13.0.1.el5 2 1GB 4GB OVM_EL5U1_X86_PVM_10GB 2.6.18-53.1.13.9.1.el5xen 2 2GB 10GB OVM_EL5U1_X86_PVM_4GB 2.6.18-53.1.13.9.1.el5xen 1 1GB 4GB OVM_EL5U1_X86_64_PVM_10GB 2.6.18-53.1.13.9.1.el5xen 2 2GB 10GB OVM_EL5U1_X86_64_PVM_4GB 2.6.18-53.1.13.9.1.el5xen 1 1GB 4GB The following Oracle Database disk images are available: Release Compressed Disk Image Files -------------------------- --------------------------- Oracle Database 11g X86 oracle11g_x86.tar.bz2.1 oracle11g_x86.tar.bz2.2 Oracle Database 11g X86_64 oracle11g_x86_64.tar.bz2.1 oracle11g_x86_64.tar.bz2.2 Oracle Database 10g X86 oracle10g_x86.tar.bz2.1 oracle10g_x86.tar.bz2.2 Oracle Database 10g X86_64 oracle10g_x86_64.tar.bz2.1 oracle10g_x86_64.tar.bz2.2 Default Passwords ================= The "root" user password for all Oracle VM templates is: ovsroot The "oracle" user password for all Oracle Database templates is: oracle If the Oracle Database disk image is added to the virtual machine, you are prompted for the "oracle" user password during the first boot. Importing an Oracle VM Template into Oracle VM Manager ====================================================== There are two ways to import an Oracle VM template into Oracle VM Manager: - importing from the Oracle VM Server hard disk - importing from a remote site using HTTP or FTP The following section describes how to import Oracle VM templates into Oracle VM Manager. Importing from an Oracle VM Server ---------------------------------- To import an Oracle VM template into Oracle VM Manager from an Oracle VM Server: 1. Download the Oracle VM template .tgz file to an Oracle VM Server and place it in the /OVS/seed_pool directory. 2. Uncompress the .tgz file. This step creates a directory with the name of the template. For example # cd /OVS/seed_pool # tar xzf /OVS/seed_pool/OVM_EL5U1_X86_64_HVM_4GB.tgz Creates the directory: /OVS/seed_pool/OVM_EL5U1_X86_64_HVM_4GB 3. Log into Oracle VM Manager and navigate to the Resources tab. The Virtual Machine Templates screen is displayed. Click Import. The Source screen is displayed. 4. Choose Select from Server Pool (Discover and register) and click Next. The General Information screen is displayed. 5. Enter or select the following general information: Server Pool Name: Select the server pool on which the virtual machine will be located. Virtual Machine Template Name: Select the Oracle VM template to be imported. Operating System: Select the operating system of the virtual machine. Virtual Machine System Username: Enter the username used to log in to the virtual machine. Virtual Machine System Password: Enter the password used to log in to the virtual machine. Description: Enter a description of the virtual machine. Click Next. The Confirm Information screen is displayed. 6. Click Confirm. The Virtual Machine Template screen is displayed with a message to confirm the template is imported. 7. To make the virtual machine template available for use, select the virtual machine template and click Approve. The View Virtual Machine Template screen is displayed. Click Approve. The virtual machine template is imported and ready for use in Oracle VM Manager. Importing from an HTTP or FTP Server ------------------------------------ To import an Oracle VM template from an HTTP or FTP server: 1. Download the Oracle VM template .tgz file to an HTTP or FTP server. 2. Uncompress the .tgz file. This step creates a directory with the name of the template. For example # tar xzf OVM_EL5U1_X86_64_HVM_4GB.tgz Creates the directory: /OVS/seed_pool/OVM_EL5U1_X86_64_HVM_4GB 3. Log into Oracle VM Manager and navigate to the Resources tab. The Virtual Machine Templates screen is displayed. Click Import. The Source screen is displayed. 4. Select Download from External Source (HTTP or FTP) and click Next. The General Information screen is displayed. 5. Enter or select the following general information: Server Pool Name: Select the server pool on which the virtual machine will be located. Virtual Machine Template Name: Select the Oracle VM template to be imported. Operating System: Select the operating system of the virtual machine. Virtual Machine System Username: Enter the username used to log in to the virtual machine. Virtual Machine System Password: Enter the password used to log in to the virtual machine. Description: Enter a description of the virtual machine. Click Next. The Import Information screen is displayed. 6. Enter the URL of the Oracle VM template, for example http://host/OVM_EL4U5_HVM_10GB ftp://username:password@host/vm If you use a proxy server to connect to your HTTP or FTP server, select Use Proxy and enter the address of the proxy server. Click Next. The Confirm Information screen is displayed. 7. Click Confirm. The Virtual Machine Template screen is displayed with a message to confirm the template is imported. 8. To make the Oracle VM template available for use, select the virtual machine template and click Approve. The View Virtual Machine Template screen is displayed. Click Approve. The Oracle VM template is imported and ready for use in Oracle VM Manager. Importing an Oracle Database Template into Oracle VM Manager ============================================================ All of the Oracle VM templates support Oracle Database 11g and Oracle Database 10g. When a compatible Oracle Database disk image is added to an Oracle VM template as the second disk, the Oracle VM template detects the disk and guides the user to configure the Oracle Database during the first boot. You can import an Oracle Database template from an Oracle VM Server or from a remote HTTP or FTP server. To import an Oracle Database template: 1. Mount the /OVS partition with the 'sync' option on the Oracle VM Server. For example, if the mounted disk is named "hda3", change the entry in the /etc/fstab file from: /dev/hda3 /OVS ocfs2 defaults 1 0 to /dev/hda3 /OVS ocfs2 sync 1 0 Reboot the Oracle VM Server, or run the following command: # mount -o remount,sync /OVS 2. Download an Oracle Enterprise Linux virtual machine template *.tgz file to an Oracle VM Server, or an HTTP or FTP server. 3. Uncompress the .tgz file. This step creates a directory with the name of the template. For example # cd /OVS/seed_pool # tar xzf /OVS/seed_pool/OVM_EL5U1_X86_64_HVM_4GB.tgz Creates the directory: /OVS/seed_pool/OVM_EL5U1_X86_64_HVM_4GB 4. Download the compatible Oracle Database disk image with the matching architecture. For example, the compatible Oracle Database 11g disk image files for the Oracle VM template OVM_EL5U1_X86_64_HVM_4GB are oracle11g_x86_64.tar.bz2.1 and oracle11g_x86_64.tar.bz2. 5. Uncompress the downloaded files into the Oracle VM Server template directory # cd /OVS/seed_pool/OVM_EL5U1_X86_64_HVM_4GB # cat oracle11g_x86_64.tar.bz2.1 oracle11g_x86_64.tar.bz2.2 | tar xvj ./oracle11g_x86_64.img ./README.oracle 6. Open the vm.cfg file and modify the "disk=..." line to add oracle11g_x86_64.img as the second disk, for example, replace the line disk = [ 'file:/OVS/seed_pool/OVM_EL4U5_X86_64_HVM_4GB/system.img,hda,w', ] with disk = [ 'file:/OVS/seed_pool/OVM_EL4U5_X86_64_HVM_4GB/system.img,hda,w', 'file:/OVS/seed_pool/OVM_EL4U5_X86_64_HVM_4GB/oracle11g_x86_64.img,hdb,w',] 7. Save the vm.cfg file and follow the steps in the section "Importing an Oracle VM Template into Oracle VM Manager" to import the Oracle VM template into Oracle VM Manager. Creating an Oracle Enterprise Linux Virtual Machine =================================================== To create an Oracle Enterprise Linux virtual machine using an Oracle VM template: 1. Follow the steps in section "Importing an Oracle VM Template into Oracle VM Manager" to import the virtual machine template into Oracle VM Manager. 2. Log in to Oracle VM Manager and navigate to the Virtual Machines tab. Click Create Virtual Machine. The Creation Method screen is displayed. 3. Select Create virtual machine based on virtual machine template. Click Next. The Shared Pool screen is displayed. 4. Select the Server Pool on which to create the virtual machine. Select an option from the Preferred Server dropdown. Click Next. The Source screen is displayed. 5. Select the template you imported in Step 1, and click Next. The Virtual Machine Information screen is displayed. 6. Enter the virtual machine name in the Virtual Machine Name field. Enter the console password in the Console Password field. Confirm the console password by entering it again in the Confirm Console Password field. Select the network Interface Card. Click Next. The Confirm Information screen is displayed. 7. Confirm the virtual machine information, and click Confirm. The Virtual Machine screen is displayed with the message "Creating Virtual Machine". 8. When the virtual machine is created, the Status changes from Creating to Powered Off. To power on the virtual machine, click Power On. Alternatively, if you want to create the virtual machine from the Oracle VM Server command line, enter # xm create vm.cfg If the template is imported and the virtual machine created by Oracle VM Manager, the network MAC address is configured automatically by Oracle VM Manager. If the template is used to create a virtual machine from the Oracle VM Server command line, the network MAC address must be configured the first time the virtual machine is started. To configure the network MAC address of a virtual machine in Oracle VM Server: 1. If the virtual machine has not already been started, start it with the "xm create" command at the Oracle VM Server command line. For example # cd /OVS/seed_pool/OVM_EL5U1_X86_64_HVM_4GB # xm create vm.cfg 2. Log into the virtual machine, and enter the following command to identify the network interface card's MAC address: # ifconfig eth0 The address is the field marked "HWaddr" and begins with "00:16:3E". 3. Edit the /etc/sysconfig/network-scripts/ifcfg-eth0 file and add the line: HWADDR=00:16:3E:xx:xx:xx where "00:16:3E:xx:xx:xx" is the MAC address identified in the previous step. 4. Edit the vm.cfg file and change the line: vif = [ 'type=netfront', ] to: vif = [ 'type=netfront, mac=00:16:3E:xx:xx:xx', ] where "00:16:3E:xx:xx:xx" is the MAC address identified in Step 2. The network MAC address is now configured for the virtual machine. Creating an Oracle Enterprise Linux Virtual Machine with an Oracle Database =========================================================================== All of the Oracle VM templates support Oracle Database 11g and Oracle Database 10g. When a compatible Oracle Database disk image is added to an Oracle VM template as the second disk, the Oracle VM template detects the disk and guides the user to configure the Oracle Database during the first boot. To create an Oracle Enterprise Linux virtual machine with an Oracle Database: 1. Follow the steps in the section "Importing an Oracle Database Template into Oracle VM Manager" to import the virtual machine template into Oracle VM Manager. 2. Follow the steps in section "Creating an Oracle Enterprise Linux Virtual Machine" to create a virtual machine from the template. When an Oracle VM template with an Oracle Database boots up for the first time, the boot up process gathers the database configuration information from the user and configures the database automatically. Make sure the VNC console has been setup correctly and monitor the console closely. A sample database configuration follows: ---- Starting cups-config-daemon: [ OK ] Starting HAL daemon: [ OK ] Changing permissions of /u01/app/oraInventory to 770. Changing groupname of /u01/app/oraInventory to dba. The execution of the script is complete Running Oracle 11g root.sh script... The following environment variables are set as: ORACLE_OWNER= oracle ORACLE_HOME= /u01/app/oracle/product/11.1.0/db_1 Enter the full pathname of the local bin directory: [/usr/local/bin]: Copying dbhome to /usr/local/bin ... Copying oraenv to /usr/local/bin ... Copying coraenv to /usr/local/bin ... Creating /etc/oratab file... Entries will be added to the /etc/oratab file as needed by Database Configuration Assistant when a database is created Finished running generic part of root.sh script. Now product-specific root actions will be performed. Finished product-specific root actions. Relinking Oracle Binaries... Oracle Relinking Completed Successfully Oracle Database 11g Release 1 Configuration ------------------------------------------------- This will configure on-boot properties of Oracle Database 11g Release 1 The following questions will determine whether the database should be starting upon system boot, the ports it will use, and the passwords that will be used for database accounts. Press to accept the defaults. Specify the HTTP port that will be used for Oracle Database 11g Release 1 [8080]: Specify a port that will be used for the database listener [1521]: Specify a password to be used for database accounts. Note that the same password will be used for SYS and SYSTEM. Oracle recommends the use of different passwords for each database account. This can be done after initial configuration: Confirm the password: Do you want Oracle Database 11g Release 1 to be started on boot (y/n) [y]: Starting Oracle Net Listener...Done Starting Oracle Database 11g Release 1 Instance...Done Configuration Completed Successfully. To access the Database Home Page go to "http://127.0.0.1:8080/apex" Starting Oracle Database 11g Release 1 Instance. selinux ======= selinux is disabled in all Oracle VM templates. If you want to use selinux, you must enable it.