I have seen several comments, blogs, questions, OTN forum posts, etc from people like me wanting to know how to run Oracle's PeopleSoft VM templates without OVM. If I had the hardware, I would love to run OVM templates directly, but I don't think it would be wise to reformat my Dell laptop as an OVM host. This post contains the steps I used to convert the FSCM FP2 PeopleTools 8.52.03 OVM template into a VirtualBox guest (currently running on my Dell XPS laptop). I started with the PeopleSoft Oracle Virtual Machine Templates Development and Customization Guide, which gave me some clues about the design of these OVM's. I'm typing all of this from memory, so let me know if I forget anything.
PeopleSoft's OVM templates are split into two tiers (instances): A database tier and a generic tools tier. If you were to boot these images in OVM, the database tier would ask you a series of questions (SID, etc), and then configure the database based on your answers. The tools tier will perform a similar initialization to acquire database information and then will mount the database's PS_APP_HOME as well as create a PS_CFG_HOME, with app, batch, and web server instances. The "pairing" process includes updating Integration Broker and other host specific database settings.
The steps
- Download and install VirtualBox.
- Download an OS. I chose OEL 5.2. You can download it from the Oracle Linux Software Delivery Cloud. In the Media Pack Search, select the Product Pack Oracle Linux and the Platform x86 64 bit. Select the DVD download.
- Download both a PeopleSoft DB and PeopleTools OVM template. These are also available on the Oracle Linux Software Delivery Cloud. In the Media Pack Search, select the Product Pack Oracle VM Templates and the Platform x86 64 bit. While constructing this example, I used PeopleSoft VM Templates for FSCM 9.1 Release Media Pack v3 for x86 (64 bit), which requires 5 total downloads.
- After the templates finish downloading, extract all the zip files. Each one is a tgz fragment and will need to be concatenated into a single, large .tgz file. For example, on Windows I concatenated the 3 DB files into a single tgz file using the command:
copy /b OVM_EL5U2_X86_64_FSCMDB_9_1_2_PVM.tgz.1of3+OVM_EL5U2_X86_64_FSCMDB_9_1_2_PVM.tgz.2of3+OVM_EL5U2_X86_64_FSCMDB_9_1_2_PVM.tgz.3of3 OVM_EL5U2_X86_64_FSCMDB_9_1_2_PVM.tgz
In the end, you should have one tgz file for the DB image, and one tgz file for the PeoleTools image. - Untar and unzip the two tgz file (On Windows I use 7-Zip).
- You should now have 2 main directories: One containing .img files for the DB (mine is named OVM_EL5U2_X86_64_FSCMDB_9_1_2_PVM) and one for the PeopleTools .img files (mine is named OVM_EL5U7_X86_64_TOOLS8_52_03_PVM). These .img files are raw disk images. If we were using OVM, OVM would pretend they were physical disk drives and make them available to the OS for mounting. Using losetup, it would be possible for us to mount these .img files directly, but I find it is a LOT easier to convert them to VirtualBox images (.vdi files). When you installed VirtualBox, you received a command called VBoxManage. If your host OS is windows, then add the VirtualBox installation directory (C:\Program Files\Oracle\VirtualBox) to your PATH environment variable (right-click on "My Computer", select Properties, then Advanced Properties, then Advanced, then Environment Variables). Once you have VBoxManage on your path, open a command prompt and CD to one of the folders containing your .img files. For example, inside your database folder, you will find oracle11g_x86_64_asm.img, System.img, and XXXXDB.img. For each of these files, execute
VBoxManage convertfromraw xxx.img xxx.vdi
(replace xxx with the .img file name) - Launch VirtualBox and create a new Guest OS with an OS type of Linux and a version of Oracle (64 bit). Set the memory to 2048 MB (2 GB of RAM). For the Virtual Hard Disk, choose "Create new hard disk." Walk through the new hard disk wizard. I chose a dynamically allocated disk of 20 GB, but the OS only required 8 GB. When the wizards finish, you will have a Guest definition. Open the guest's settings to insert a virtual DVD into the drive. Click on the Storage setting on the left. In the storage tree, select the CD icon to show the CD drive attributes. Click the little CD icon to the right of the "IDE Secondary Master" drop-down to select your OS's install media. In my case, this is the Enterprise-R5-U2-Server-x86_64-dvd.iso DVD image.
- Network adapters: if you know what you are doing, configure your network adapters. For the initial install, I kept one adapter with the default NAT. After install, I reconfigured my network adapters and I'll tell how I configured them in a few steps.
- Start your new guest and install OEL. You can accept most of the defaults. I turned off the firewall and set selinux to permissive. No, I don't recommend anyone do this, it was just the fastest way to get the image working. What you do about firewalls, etc is your responsibility.
- Configure sudo if you would rather use sudo instead of becoming root for later steps. I did, and I recommend you do as well, but it is not required. As root, I think I ran visudo and added this line to the end of the file:
%admin ALL=(ALL) ALL
I then added myself to the admin group. - Configure Yum to use the Oracle Public Yum server. Instructions are on the Oracle Public Yum site (Look for Oracle Linux 5).
- In your guest, open a terminal, become root (or use sudo) to run
yum update
. Install all available updates to get your system current. - From the VirtualBox menu at the top of your guest window, select Devices > Install Guest Additions. This will mount the guest additions CD. From a terminal as root (or sudo), cd to /media/VBOXADDITIONS_4.1.16_78094 and run
./VBoxLinuxAdditions.run
. Expect it to fail the first time it runs. When I ran it, I saw this:Building the VirtualBox Guest Additions kernel modules The headers for the current running kernel were not found. If the following module compilation fails then this could be the reason. The missing package can be probably installed with yum install kernel-uek-devel-2.6.32-300.25.1.el5uek Building the main Guest Additions module [FAILED]
To resolve the issue, I copied the line from the VBox install output,yum install kernel-uek-devel-2.6.32-300.25.1.el5uek
, and ran it. I then I re-ran./VBoxLinuxAdditions.run
to success. - Shutdown your guest to configure more network adapters.
- In the VM's network settings, set Network Interface 1 to Host Only. This is probably the easiest way to get your host and guest communicating over the network. Unfortunately, Host Only network adapters can't access the internet. To get internet access, add a second Network Interface for NAT. This will allow your VM to download updates, etc, over the internet.
- Start your VM and ensure that mouse capture, shared folders, etc are working.
- Later we will run the delivered OVM configuration scripts, but since we aren't running OVM, we will have to fake some of the OVM infrastructure. As root (or sudo), create the directory /usr/lib/oraclevm-template (
mkdir -p /usr/lib/oraclevm-template
). Create and edit the file /usr/lib/oraclevm-template/functions (vim /usr/lib/oraclevm-template/functions
). Paste in the following contents:ovm_info() { echo "INFO: $1" } ovm_log() { echo $1 } ovm_warn() { echo "WARN: $1" } ovm_error() { echo "ERROR: $1" }
The oraclevm templates will call these functions to log/report information about the process. Note: we waited until now to create this file so we would have Guest Additions copy/paste. We are doing this prior to cloning so we will have this file in both the tools and db images. - Create the following users and groups. Please pay careful attention to the uid and gid parameters below. I found these values in the /etc/passwd and /etc/group files from the OVM system image. You can use whatever uid and gid values you prefer, but changing them will require you to chown files. It is also important that psadm3 and appinst match between your database and tools image. Your tools image will nfs mount files owned by psadm3 and appinst.
groupadd oinstall groupadd dba groupadd -g 505 oracle groupadd -g 506 appinst useradd -g oinstall -G dba oracle useradd -u 505 -g oracle -G appinst psadm1 useradd -u 506 -g oracle psadm2 useradd -u 507 -g appinst psadm3
Please note that I did not configure any passwords for these users. If you want, you can set passwords. I just usesudo -u oracle -i
. - Create a temporary directory under /media for mounting the original OVM OS disk and then mount it. We will use this to copy a few files. While you are at it, create the destination folder for the files to copy:
mkdir -p /media/tmp mkdir -p /opt/oracle/psft/ mount /dev/sdd2 /media/tmp cp -R --preserve=all /media/tmp/opt/oracle/psft/vm /opt/oracle/psft/
- Shutdown your guest and clone it. You want a clone for two reasons: #1 in case you mess up and #2 to use as a base for the later tools image. To clone, select the machine in the VirtualBox Manager list, and then choose Clone from the Machine menu. I suggest keeping the original as a base image in case you want to create more instances (or need to start over). If you keep the original for a backup, create two clones: one for the DB, and one for the middle/PeopleTools tier. I named my clones FSCM912_DB and FSCM912_PT
- After creating your clones, move the vdi files you created earlier into the appropriate VM folder. For example, move oracle11g_x86_64_asm.vdi, System.vdi, and FSCMDB.vdi into the folder containing your Virtual Box DB guest files.
- Switch back to the VirtualBox Manager and open the settings for each of your 2 VM's. Add each of the vdi files to the appropriate guest's Storage SATA Controller. For example, in the DB Guest, add FSCMDB.vdi, oracle11g_x86_64_asm.vdi, System.vdi. System.vdi represents the boot/OS disk image used by OVM. We will use it to copy a few files, and then drop it.
The Database Image
- Boot the database image and log in.
- For a static IP on the host-only network do this: (Note: the benefit of having a static IP is that you don't have to update your hosts file every time your db IP address changes) Open a terminal and become root to execute the command (or sudo, which is what I do) ifconfig. Look for the IP address for eth0. In my configuration it is 192.168.56.101. Copy all but the 101 part (the first 3 segments). In the OEL menu bar, select System | Administration | Network. Highlight eth0 and click the Edit button in the toolbar. On the general tab, select the Statically set radio button and enter an IP address and subnet mask. For my network configuration, I chose 192.168.56.50 for my IP address and a subnet of 255.255.255.0. Click OK to close the edit dialog, and then choose File | Save from the menu bar. Using the buttons on the right, deactivate eth0 and then activate eth0. This will activate your static IP. Note: It will also mess up resolv.conf, so don't expect to get internet access until reboot (or reactivate eth1, etc).
- This new guest needs a host name. Set the host name by editing /etc/sysconfig/network. Change the HOSTNAME line to something new (fscm912db?). In /etc/hosts, make sure you have an IP address mapping that matches the HOSTNAME line (add it to the localhost line if using DHCP and have no IP address reservations). Here is my /etc/hosts file:
127.0.0.1 localhost.localdomain localhost ::1 localhost6.localdomain6 localhost6 192.168.56.50 fscm912db fscm912db.example.com 192.168.56.51 fscm912pt fscm912pt.example.com
- Create the following directories (as root or sudo).
mkdir /opt/oracle/psft/ptdb mkdir /u01
- Run fsdisk -l to see the disks and partitions attached to the guest. Each hard disk should be /dev/sdx where x represents letters a through d. For example, /dev/sda is the primary disk associated with the guest. /dev/sdb should be the database disk and should have the largest reported size. Here is the output from my guest:
[root@fscm912db ~]# fdisk -l Disk /dev/sda: 21.4 GB, 21474836480 bytes 255 heads, 63 sectors/track, 2610 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 * 1 13 104391 83 Linux /dev/sda2 14 2610 20860402+ 8e Linux LVM Disk /dev/sdb: 53.6 GB, 53695479808 bytes 255 heads, 63 sectors/track, 6528 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sdb1 1 6528 52436128+ 83 Linux Disk /dev/sdc: 26.2 GB, 26214400000 bytes 255 heads, 63 sectors/track, 3187 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sdc1 1 1246 10008463+ 83 Linux /dev/sdc2 1247 2213 7767427+ 83 Linux /dev/sdc3 2214 3187 7823655 83 Linux Disk /dev/sdd: 6622 MB, 6622806016 bytes 255 heads, 63 sectors/track, 805 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sdd1 * 1 4 32098+ 83 Linux /dev/sdd2 5 413 3285292+ 83 Linux /dev/sdd3 414 805 3148740 82 Linux swap / Solaris Disk /dev/dm-0: 19.2 GB, 19260243968 bytes 255 heads, 63 sectors/track, 2341 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk /dev/dm-0 doesn't contain a valid partition table Disk /dev/dm-1: 2080 MB, 2080374784 bytes 255 heads, 63 sectors/track, 252 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk /dev/dm-1 doesn't contain a valid partition table
/dev/sda has 3 partitions, /dev/sdb has one partition, /dev/sdc has 3 partitions, and /dev/sdd has 3 partitions. To recap: /dev/sda is the primary OS/boot disk, /dev/sdb should be the database disk, /dev/sdc will have the $ORACLE_HOME, /dev/sdd is the original OVM OS disk. It is fine if yours are in a slightly different order. Just remember the order and change your mount points accordingly (or shutdown and reorder your SATA devices). - Add the following entries to /etc/fstab to mount the database disk and the oracle home disk:
/dev/sdb1 /opt/oracle/psft/ptdb ext3 defaults 1 3 /dev/sdc1 /u01 ext3 defaults 1 4
- Next time you reboot, these partitions will mount automatically. So that we can use them now, mount the new partitions with these commands:
mount /u01 mount /opt/oracle/psft/ptdb
- Since we are discussing disks, now might be a good time to check how much swap you allocated to make sure you allocated enough. I didn't. I ran through an 11.2.0.1.0 install on one of these base tools images and Oracle told me I should have roughly 3 GB of swap. I only had 2 GB, so I created some more. Check your swap by executing
[root@fscm912db psft]# swapon -s Filename Type Size Used Priority /dev/mapper/VolGroup00-LogVol01 partition 2031608 0 -1 /root/swapfile file 2097144 0 -2
The sizes are in kilobytes, so copy your number and paste it into google like so: 2031608 kilobytes in gigabytes. Google will do the conversion for you and return something like 2 031 608 kilobytes = 1.93749237 gigabytes. If you need to add more swap, an easy way is to use a swap file (or create a swap partition -- not sure if it matters since they are all virtual disk files anyway):dd if=/dev/zero of=/root/swapfile bs=1024 count=2097152 mkswap /root/swapfile chown root:root /root/swapfile chmod 0600 /root/swapfile swapon /root/swapfile
Add the following to your /etc/fstab so the swap file will load on boot:/root/swapfile swap swap defaults 0 0
See this handy tutorial for more information on adding swap. - Check your mounted partitions:
[root@fscm912db /]# ls /opt/oracle/psft/ptdb/ apptools lost+found oradata orapatch scripts templates [root@fscm912db /]# ls /u01/ app config db-cleanup.sh db-config db-reconfig.sh dbstart lost+found
- The db-reconfig.sh script expects to find oracleasmlib and oracleasm-`uname -r`. I was not able to find an oracleasmlib for my kernel (2.6.32-300.25.1.el5uek), and the test for oracleasm-`uname -r` seems a bit unnecessary since a different kernel version seems to be running just fine on my kernel (perhaps a test for the command oracleasm would have been more appropriate?). We will install as many of the dependencies as possible, and then comment out the rest. In fact, you could probably comment out the entire oracleasm section and skip these dependencies (I didn't try that, just went with the path of least resistance). Note: in steps 10 - 12, don't actually run db-reconfig.sh. The template script will call this script. We just need to make sure we take care of all the prerequisites.
- Install the following packages as root (or execute as sudo).
yum install oracle-validated # required (or you can do the manual kernel config) yum install oracleasm
Note, we won't really mount an ASM device, but the OVM scripts think one should exist. The template scripts will configure oracleasm, so you won't need to do that. If you are interested, though there is a nice tutorial here. Basically, you just need to runoracleasm configure
and use the values specified in the tutorial. - Open /u01/db-reconfig.sh and search for
fail "oracleasm-`uname -r` not installed.
It should be around line 400. Comment out that line by adding a#
in front of it. Do the same a few lines later for fail "oracleasmlib not installed." And then further down, comment out the network configuration section (VBox takes care of network configuration for us).# check if required packages have been installed if ! rpm -q oracleasm-`uname -r` >/dev/null 2>&1; then # fail "oracleasm-`uname -r` not installed." ovm_info "oracleasm-`uname -r` not installed." fi if ! rpm -q oracleasmlib >/dev/null 2>&1; then # fail "oracleasmlib not installed." ovm_info "oracleasmlib not installed" fi ... # Somewhere around line 430? # configure network DHCP/static IP # ovm_configure_network
Note: I used the ovm_info macro we created earlier to print what the template intended to print, but without halting the script. - The template scripts will attempt to relink the Oracle 11.1.0.7 database binaries. Right now, they probably aren't owned by user oracle. Unless they are owned by user oracle, the relinking script will fail with permission denied errors. Run the following command to change the ownership on all of these files:
chown -R oracle:oinstall /u01/app/oracle
- Now for the big moment... As root (or run with sudo), cd into
/opt/oracle/psft/vm
and run./oraclevm-template.sh
. The script will ask you if you want to relink the binaries. Say yes. The next prompt will be for an Oracle SID (database name). Come up with one that is only 8 ASCII characters long. But if you see error messages before the prompt, type Ctrl-C now. This will end the script. First, resolve the errors, then rerun the script. - When all is said and done, become user oracle. If you are root now, just type
su - oracle
. This will put you in your home directory. Type ll to see a long listing. You will see two new symbolic links: scripts and templates. Templates links back to the scripts we just ran. Scripts contains start/stop scripts, etc for the database. While here, review your .bash_profile (vim .bash_profile). You will notice that the script inserted entries for ORACLE_BASE, ORACLE_HOME, etc. - Edit the initXXX.ora script. I found the default
db_domain
property unsatisfactory for my configuration. If you don't want the db_domain, or it doesn't work for you, comment out the db_domain property.vim $ORACLE_HOME/dbs/initFSCM912.ora ########################################### # Database Identification ########################################### #db_domain=us.oracle.com # db_name=
- Edit the tnsnames to make the host, SID, and SERVICE_NAME match the initXXX.ora and host name. Here is my tnsnames.ora file. Notice that I removed all the qualified names:
vim $ORACLE_HOME/network/admin/tnsnames.ora # tnsnames.ora Network Configuration File: ORCL = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = fscm912db )(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl) ) ) FSCM912 = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = fscm912db)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = FSCM912 ) (SID = FSCM912 ) ) )
- Open lsnrctl and check the status. If it isn't started, start it:
[oracle@fscm912db ~]$ lsnrctl LSNRCTL for Linux: Version 11.1.0.7.0 - Production on 31-MAY-2012 21:58:12 Copyright (c) 1991, 2008, Oracle. All rights reserved. Welcome to LSNRCTL, type "help" for information. LSNRCTL> status Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=fscm912db)(PORT=1521))) TNS-12541: TNS:no listener TNS-12560: TNS:protocol adapter error TNS-00511: No listener Linux Error: 111: Connection refused Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521))) TNS-12541: TNS:no listener TNS-12560: TNS:protocol adapter error TNS-00511: No listener Linux Error: 2: No such file or directory LSNRCTL> # If you saw errors like above, then it isn't started. Start it: LSNRCTL> start Starting /u01/app/oracle/product/11.1.0/db_1/bin/tnslsnr: please wait... TNSLSNR for Linux: Version 11.1.0.7.0 - Production System parameter file is /u01/app/oracle/product/11.1.0/db_1/network/admin/listener.ora Log messages written to /u01/app/oracle/diag/tnslsnr/fscm912db/listener/alert/log.xml Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521))) Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521))) Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=fscm912db)(PORT=1521))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 11.1.0.7.0 - Production Start Date 31-MAY-2012 22:00:30 Uptime 0 days 0 hr. 0 min. 0 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/app/oracle/product/11.1.0/db_1/network/admin/listener.ora Listener Log File /u01/app/oracle/diag/tnslsnr/fscm912db/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521))) The listener supports no services The command completed successfully
Quit lsnrctl by typingquit
. - As user oracle, start your database:
~/scripts/startSID.sh FSCM912
If it is already running, you will see a note to that affect. In a matter of time, the database will register itself with the listener. If it doesn't, log into sqlplus / as sysdba and runalter system register;
sqlplus / as sysdba SQL> alter system register; System altered. SQL> quit
Now typelsnrctl status
. If you still don't see your database registered, run ~/scripts/stopSID.sh FSCM912 (your SID) and then ~/scripts/startSID.sh. Once registered, you should see:Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=fscm912db)(PORT=1521))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 11.1.0.7.0 - Production Start Date 31-MAY-2012 15:27:43 Uptime 0 days 6 hr. 30 min. 31 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/app/oracle/product/11.1.0/db_1/network/admin/listener.ora Listener Log File /u01/app/oracle/product/11.1.0/db_1/log/diag/tnslsnr/fscm912db/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521))) Services Summary... Service "FSCM912" has 1 instance(s). Instance "FSCM912", status READY, has 1 handler(s) for this service... Service "FSCM912_XPT" has 1 instance(s). Instance "FSCM912", status READY, has 1 handler(s) for this service... Service "XDB" has 1 instance(s). Instance "FSCM912", status READY, has 1 handler(s) for this service... The command completed successfully
- Test it out by trying to connect to SQLPlus as SYSADM:
[oracle@fscm912db ~]$ sqlplus SYSADM@FSCM912 SQL*Plus: Release 11.1.0.7.0 - Production on Thu May 31 22:10:08 2012 Copyright (c) 1982, 2008, Oracle. All rights reserved. Enter password: Connected to: Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> SELECT COUNT(1) FROM PSRECDEFN; COUNT(1) ---------- 71809 SQL> quit
- The database tier contains application specific files that the tools tier will require (PS_APP_HOME). There are a handful of ways to make these files available. The way I chose was to use nfs. At a minimum, you have to share out a file. You can also configure hosts.allow and hosts.deny, but I just did the minimum. Make sure you take the appropriate security precautions when sharing out nfs folders.
[root@fscm912db vm]# vim /etc/exports /opt/oracle/psft/ptdb/apptools FSCM912PT(ro) [root@fscm912db vm]# chkconfig nfs on [root@fscm912db vm]# chkconfig nfs --list nfs 0:off 1:off 2:on 3:on 4:on 5:on 6:off
Since we defined a host here in the exports file, we should also map it to an IP address in the /etc/hosts file. Update your hosts file accordingly. - If all is good here, you can move onto configuring your Windows workstation to connect to this guest. For the workstation, install PT 8.52.03 (download PT 8.52 and then the 03 patch). You will also need to install an Oracle client. I don't know if it is possible to still find an 11.1.0.7.0 client, but 11.2.0.1 works just fine. Add an entry to your Windows hosts file (c:\windows\system32\drivers\etc\hosts) to point to your VBox guest, and add a TNS entry for the VBox guest. The TNS entry will look very similar to the one on the guest. Here is mine:
FSCM912 = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = FSCM912DB)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = FSCM912) ) )
You should now be able to use App Designer, Data Mover, and all other two-tier PeopleTools client tools. - After configuring a client, run setspace.sqr to populate the list of Table spaces for App Designer:
c:\PT8.52\bin\sqr\ora\BINW>sqrw.exe -ZIFC:\PT8.52\sqr\pssqr.ini -iC:\PT8.52\sqr\ c:\pt8.52\sqr\setspace.sqr
- The next time you shutdown your database guest, you can remove the system.vdi SATA device from the list of storage devices.
You can find the steps for configuring the App, Batch, and Web server here.
55 comments:
Very nice one Jim ! I must admit that I've never took the time for such work, and since I have a spare server I do all work within Oracle VM...
Nicolas.
Jim, OMG! This is brilliant! Thanks for your comment on my blog, and thanks for sharing this with the community! I'm going to give this a try as soon I have a little chunk of time!
Cheers,
Amr
@Amr, please post any errors, omissions, or questions and I'll update these steps accordingly. I appreciate any feedback.
Thanks Jim. Very elaborate!
But this doesnt work on 32-bit m/c?
@mutyalarao, Starting with PeopleTools 8.50, PeopleSoft moved to 64 bit. A significant portion of the software included in the OVM templates is 64 bit. It is best to use a 64 bit GUEST to match what was delivered. I did not try a 32 bit guest.
As far as a 32 bit host, you may be able to run a 64 bit guest on a 32 bit host. See Chapter 3 of the VirtualBox manual for more information on using 64 bit guests with 32 bit hosts.
I just finished the PT VirtualBox conversion and learned a few things. I updated this post with what I learned from that experience so you won't have to make the same mistakes. I'll post the PT steps shortly and will add a link to this post.
Thanks a lot Jim! It just worked...I was able to install Oracle Linux 64-bit Guest by enabling Hardware Virtualization :)
Diving into installation of the VM templates....
Hi Jim,
I'm stuck at step 19:
Create a temporary directory under /media for mounting the original OVM OS disk and then mount it.
Which disk are you referring to? Is it in your case the FCMDB System disk (System.vdi)?
When I run the mount command I get this error:
mount: special device /dev/sdd2 does not exist
@Michael, yes, sorry. System.vdi. I think the /dev/sd[a-z] order is based on the VirtualBox device order. In my case, System.vdi is the last disk in the list, so it is sdd (4th disk). You can list all your disks with fdisk -l. Only two of them should have an asterisk in the the boot column. One of those should already be mounted because it is the one that was used to boot the VM. The second disk with an asterisk should represent System.vdi. System.vdi should have 3 partitions: boot, /, and swap. You want the second one, which is the main system root partition (/). If you need help identifying the correct device and partition to mount, paste your fdisk -l output along with any error you receive when mounting. Also, make sure you run the command with super user privileges (either as root or sudo).
Thanks Jim, I already figured it out before you replied. Another thing by the way; you forgot to run the root.sh script which is located in the database directory (/u01/app/oracle/product/11.1.0/db_1/root.sh). You have to run this script as root. It will set several permissions from what I can see in the file and creates a startup service for the database. Then you can "vim /etc/oratab" and change the following line "orcl:/u01/app/oracle/product/11.1.0/db_1:N" to "orcl:/u01/app/oracle/product/11.1.0/db_1:Y".
@Michael, you are right, I didn't run root.sh. I've just been starting the SID manually using the PeopleSoft delivered startSID.sh script.
Hi Jim. First time posting. Am attempting your instructions but am also STUCK on step 19...
"Create a temporary directory under /media for mounting the original OVM OS disk and then mount it.".
The error is mount: special device /dev/sdd2 does not exist.
I then follow your instructions to fdisk -l. results are that I only have 2 devices listed...
/dev/sda1 *
/dev/sda2
Also confusing is that I don't have a System.vdi for the original OVM OS disk... only a .iso archive.
Any help would be appreciated
-KevinC
@Kevin, it sounds like you have an OS disk mounted only. Is the ISO just the OS install ISO? Steps 3 through 6 explain how to retrieve the OVM templates and convert the *.img files into *.vdi files. I only have experience with PeopleSoft 8.52 OVM's and they have 2 System.img disks, TOOLS.img, *DB.img, and Oracle11gR2.img. It doesn't sound like you have any of those. What files do you have?
Yeah Jim, The .iso for the Linux OS doesn't contain any System file to convert to System.vdi. But I did resolve by adding the DB System.vdi from the Peoplesoft DB template to the SATA HD in the Base Linux install. I was then able to see the System.vdi when I mount /dev/sxxx /media/tmp. All went well after that(I think! Was it okay to use the System.vdi from OVM_EL5U2_X86_64_FSCMDB_9_1_2_PVM?)
Anyway, Thanks for your work... most excellent!
@Kevin, you did it right. The ISO does not contain the System.vdi/System.img file. It isn't supposed to. System.img is supposed to come from OVM_EL5U2_X86_64_FSCMDB_9_1_2_PVM. I must not have made that clear. I'm glad the rest of the steps went well for you.
Did you continue on with the PeopleTools/Middle tier OVM conversion? How did that go for you?
Jim, I had to move off the project temporarily, but am now coming back to it.
Continuing with the FSCM912_DB VM now.
Jim, I was able to get the DB VM up and running over the weekend. Ther were points of considerable angst, but that could just be my lack of experience.
I thnk my troubles began with Step 10... First pass through, it's not clear that db-reconfig.sh was actually a called script from the later run
./oraclevm-template.sh. So I ran the db-config.sh script first. The parts about the ASM device, and oracle asm is really confusing, for a non-db guy.
Anyway, I basically wrestled through any errors I got while running the ./oraclevm-template.sh script. There was a point, that I just couldn;t resolve
the remaining errors, and went ahead with naming the SID, through to the end of the script. This turned out to be the right move, and I basically had
success in the end.
I also wondered what you did about a couple other items..
Early on, I couldn't get the GuestAdditions to be successful, even after followng your steps. Research had me comment out the linux uek kernel, since there were 2,
and this enabled me to continue. I wonder if this was the source of some of my issues down stream, continuing with the wrong kernel.(had issues with ORACLE_HOME,
ORACLE_BASE, etc). I don't know. Did you run into this?
Another thing that was hosing me was SELinux(permissive), when running various scripts. Finally disabling it led me to successes.
Anyway, these were some of the sticking points for me. But as I said, in the end successful.
Again Jim, thanks for your work. I'm on to the PTools image.
@Kevin, I honestly don't understand the ASM requirement either. I'm not using any special storage device so I don't think it is necessary. I'm actually a bit frustrated by it because it adds a few minutes to my startup script. It is in the OVM template script. I just installed it to satisfy the prerequisite.
Now that I look back at steps 10-12... it looks like I tell you to install ASM, and then I tell you to comment the prerequisite out of the script... hmmm...
Steps 10 through 12 are just setup prior to actually running the template scripts. As you figured out, I didn't want anyone to run the script at that point.
I installed the uek kernel and also chose SELinux permissive. In step 9 I recommended permissive mode.
Step 13 shows the only problem I had while installing guest additions. Like the output shows, I used the uek kernel, so that might be the difference?
Jim, success is sweet. Here's what I did to get hings running.
1.Found that I needed to change my DB username to VP1/VP1, instead of QEDMO.
2. configged kernel params per this article.. http://peoplesoft.ittoolbox.com/groups/technical-functional/peopletools-l/troubles-starting-app-server-1580126
3. manually start as psadm2
4. manually start startPIA as root.
Thanks so much for pioneering this!
Jim:
I seem to be having trouble with ASM. When the script runs, it can't find VOL1 or VOL2, which appears to mess things up all over the place. Should these be created before the script runs? Your instructions were to just install it, not to configure it.
Thanks
JB
@JB, that is true. The db script will run the ASM configuration. However, if you are having problems, see step 11. It has a link to the ASM config tutorial with appropriate values. I actually used this to configure ASM before I discovered the script did the same thing.
Jim:
Well I had shut the machine down to do some work on my Mac OS X OVM and then when I switched back after reading your comment, I noticed that it had started the ASMLib. When I tried to manually configure oracleasm, it asked me all the questions, then failed when it couldn't find ASMLib. So after some looking at the tutorial you linked to, i executed the oracleasm disable, oracleasm enable, then then config. But, I stopped and am restarting again at the CLONE step, and plan to issue the oracleasm enable after installing asm. Hopefully that will fix things.
@JB, it always sounds so simple, but never seems to work out that way...
By the way, the new HCM OVM template is out and I hear it doesn't require ASM. I plan to install it sometime within the next week.
Jim:
You are correct. I rebooted after installing oracleasm to bring it online, but then guest additions wasn't working.
I did check oracleasmlib and it showed VOL1 & VOL2. But when I ran the script, I got this:
INFO: Starting CSS.
Waiting for CSS available.
ASM instance started
Total System Global Area 283930624 bytes
Fixed Size 2158992 bytes
Variable Size 256605808 bytes
ASM Cache 25165824 bytes
ORA-15032: not all alterations performed
ORA-15063: ASM discovered an insufficient number of disks for diskgroup "DATA"
I have the entire output log captured from the screen but didn't want to paste it all in here. Not sure how to send that to you.
Thanks for any help you can give me.
JB
@JB, I wish I could give you more help, but I don't know much about ASM. When you installed OEL, did you go with the standard partition layout using LVM?
Jim:
I chose the GUI install option and I don't recall "changing" anything from a default based on your comments. I also disabled the firewall and chose the permissive setting. I might just have to punt and start again.
Thanks
JB
The amount of trouble and frustration people are having just merely trying to use the OVM templates should be an indicator to Oracle as to the usability and utility of these templates.
I wish with the release of the new templates they would have heeded the calls for VirtualBox VM images for Peoplesoft environments , but it seems Oracle(TM) is still sticking with a virtualization solution that userbase@large is simply unable to use without jumping through a million hoops.
@Amr, I am digging through the latest HCM oraclevm-template scripts that are on edelivery. I see a lot of references to $VBOX_SETUP. I can't imagine what vbox would be if not virtual box. Perhaps virtual box is not far off?
Hello Jim,
This is a fantastic article, well done!
If I understood you correctly using the steps you describe you can install the Oracle Virtual templates using Virtualbox so you dont have to wipe out your OS of your laptop/desktop.
What is the spec required for the laptop, is it i7 processor + 8 GB RAM? Also to access PeopleSoft do you do it from the host browser? Sorry I am not an expert in Linux, just a functional consultant
@Naishad, yes, your understanding is correct. VirtualBox is a client virtualization that runs inside a host operating system (Windows, Linux, etc) in a manner similar to VMWare. You do not replace your operating system.
If you follow the steps outlined in this guide, then you will need a total of 4 GB of RAM for the image as well as a couple more for your operating system. I have combined the two VM's and run them just fine with 3 GB of RAM dedicated to the guest. I have heard of people running them with as little as 2 GB of RAM on the guest. For comparison, my laptop is a i5 Intel with 8 GB of RAM.
Once completed, I recommend adding the host-only network IP address to your host's (Windows) host file and then browsing from your host. You will also want to setup App Designer, Data Mover, etc on your Windows host.
Jim, sorry for ask the simple question, because i am newbie in the linux.
Why i can't find the menu network in System | Administration in my OEL?
I already login as root in my OEL.
@Wira, you might want to post that question on the Oracle Linux Forum.
I stuck on step in step change to /opt/oracle/psft/vm and run ./oraclevm-template.sh. I cannot find oraclevm-template.sh and i cannot find the directories vm.
i run HR PSFT, not Finance PSFT.
Could you help me?
@Wira, Did you mount the original VM disks and copy over the oraclevm-template.sh files? That was in step 19.
thanks Jim for the help me out. But when i try to install the oracle-validated, there's message "No package oracle-validated available." what should i do?
at first, i think i have already installed the oracle-validated, but when i go through to the step run the oraclevm-template.sh, i got three error:
1. /usr/lib/oraclevm-template/functions: line 24: --: command not found
2. ERROR: oracle-validated not installed.
3. ERROR: Failed to install Oracle Database.
what should i do to resolve these error? Thanks a lot before Jim
@Wira, try step 11 above again:
yum install oracle-validated
It won't hurt to run it multiple times. If you get an error, resolve the errors.
Are you using an OEL 5.x version or 6.x? I don't believe the PeopleSoft VM templates work with OEL 6.x yet.
Great work, Jim! (I love your Tips and Techniques book, too [which I purchased in book and kindle form].)
I am doing this for PS HCM 912, which seems to be set up slightly differently. For example, the /u01 layout:
/u01:
total 24
drwxrwxr-x. 4 54321 54322 4096 Jun 11 23:49 app
drwx------. 2 root root 16384 Jun 11 23:35 lost+found
drwxr-xr-x. 3 root root 4096 Nov 14 22:26 scripts
/u01/scripts:
total 32
drwxr-xr-x. 2 root root 4096 Jun 11 23:48 config
-rwxr-xr-x. 1 root root 1174 Jun 11 21:45 db-cleanup.sh
-rwxr-xr-x. 1 root root 743 Jun 11 21:45 db-config
-rwxr-xr-x. 1 root root 7877 Nov 14 22:26 db-reconfig.sh
-rwxr-xr-x. 1 root root 6164 Jun 11 21:45 dbstart
Everything goes well for me up until the Database step 14 (oraclevm-template.sh). There were no error messages at its start, and it happily relinked binaries. But after asking for instance name (and I stress that I ran this script as root) it started spewing out permissions errors. I noticed that the files/directories that are the subject of those messages, are owned by UID and GID 54321, which I didn't see referenced in your guide. The errors are:
Enter the name of the database SID [TESTDB]:PSHCM_912
mv: cannot move `/opt/oracle/psft/ptdb/oradata/HR91C323' to `/opt/oracle/psft/ptdb/oradata/PSHCM_912': Permission denied
cp: cannot create regular file `/home/oracle/scripts/createCTL.sql.mod': Permission denied
sed: can't read /home/oracle/scripts/createCTL.sql.mod: No such file or directory
sed: can't read /home/oracle/scripts/createCTL.sql.mod: No such file or directory
SP2-0310: unable to open file "/home/oracle/scripts/createCTL.sql.mod"
cp: cannot create regular file `/home/oracle/scripts/updatedb.sql.mod': Permission denied
sed: can't read /home/oracle/scripts/updatedb.sql.mod: No such file or directory
SP2-0310: unable to open file "/home/oracle/scripts/updatedb.sql.mod"
DB
Current
Current
I noticed that the files/directories that are the source of the complaints, are all owned by UID 54321, GID 54321.
Any clue what might be wrong? (I've stopped right there.)
Sorry, Jim. I posted last night about issues with difference in UID. It occurred to me overnight - and I had to get up and test right away - that all I had to do, was to mount the old system volume and do some quick checks against /media/tmp/etc/passwd. Sure enough, 54321 was user oracle. So I did
find / -uid 54321 -exec chown oracle {} \; to fix that. I also had some issues with group uids, which I changed by manipulating /etc/group.
You may post this and the question or not. It may help someone, but I didn't want you scratching your head over it unnecessarily.
@Dennis, per your recommendation, I posted your question and your answer. Yes, I didn't document the oracle, oinstall, and dba user and groups. I thought those were part of the oracle-validated package. Just in case anyone else needs them, when creating user Oracle, use uid of 54321. When creating group oinstall, use gid 54321. When creating group dba, use gid 54322.
Jim,
I am stuck on Step 19. I tried to follow what is on the comments. My fdisk -l command only shows /dev/sda1 *
/dev/sda2
I extracted the files for tools and as specified on the commands.
I tried mount /dev/sda2 /media/tmp and I got "you must specify the file system type". I do not see the system.vdi. Do I need to mount them? how?...sorry..My first trying virtualbox
@JPonce, I think I see the problem in the instructions. Steps 21 and 22 tell you how to add the converted VDI files (system.vdi) to the VirtualBox guest. Unfortunately, you can't mount /dev/sdd2 until you have it in the media list. My friends at Logica (CGI) expanded greatly upon my original post (pictures and everything!). You might want to go through their steps as well: Running Oracle VM Templates on Oracle Linux guide.
Hello Jim - Thank you so much for all the help on this topic, it is so exciting
I started the process for HCM 9.1 but I got stuck at the step 51.
I have Windows 7 system - Dell Inspirin with i7/8GB Ram.
I am not able to mount (it is lookking for the file system type)
[root@localhost dev]# fdisk -l
Disk /dev/sda: 32.8 GB, 32841400320 bytes
255 heads, 63 sectors/track, 3992 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 3992 31961317+ 8e Linux LVM
Disk /dev/dm-0: 28.5 GB, 28521267200 bytes
255 heads, 63 sectors/track, 3467 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/dm-0 doesn't contain a valid partition table
Disk /dev/dm-1: 4194 MB, 4194304000 bytes
255 heads, 63 sectors/track, 509 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/dm-1 doesn't contain a valid partition table
[root@localhost dev]# mount /dev/sda2 /media/tmp
mount: you must specify the filesystem type
[root@localhost dev]# mount -t auto /dev/sda2 /media/tmp
mount: you must specify the filesystem type
[root@localhost dev]#
I appreciate some help
Regards - AB Krishna
@AB Krishna, your sda's should already be mounted. sda* is the device id given to the system disk created by VirtualBox. You need to mount sdb*, sdc*, etc. If you don't have anything other than sda*, then go back to step 22 above, confirm you added the vdi's as shown in the step, and then restart your VM.
Hi Jim,
First of all thank you so much for sharing this great information.
I am trying to configure same in my laptop but got stuck at Step 19 of initial setup while mounting sdd2.
Mounting command and error-
[root@localhost ~]# mount /dev/sdd2 /media/tmp
mount: special device /dev/sdd2 does not exist
When i checked fdisk -l command, i found that sdd2 is not available for me-
[root@localhost ~]# fdisk -l
Disk /dev/sda: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 2610 20860402+ 8e Linux LVM
Disk /dev/dm-0: 19.2 GB, 19260243968 bytes
255 heads, 63 sectors/track, 2341 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/dm-0 doesn't contain a valid partition table
Disk /dev/dm-1: 2080 MB, 2080374784 bytes
255 heads, 63 sectors/track, 252 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/dm-1 doesn't contain a valid partition table
Please help in mounting sdd2.
Thanks
Pradeep
@Pradeep, I think a portion of step 22 is supposed to be completed before step 19. Step 22 tells you to attach System.vdi to your VirtualBox image. Once that is attached, you will have more sd* drives. Make sure that your disk order matches what is shown in the screenshot on step 22. Otherwise the letters (sdb, sdc, sdd, etc) won't match.
You want System.vdi files copied into your base image that you will clone for the tools image, but you don't want the db disks cloned to your tools image. That will take forever to clone. I think when I originally created these steps, I mounted everything (step 22), then I copied the files (step 19), then I removed the disks from the media manager so they wouldn't be there when cloning. Later when documenting, I wasn't very clear about this.
Hi Jim,
I am bit confused here in attaching System.vdi in the base image as i have this file present in my HCMDB folder as well as in HCMPT folder. Please tell me which System.vdi image i need to attach with base one.
Also if my understanding is correct then after attaching the System.vdi to base image i need to execute below statement-
mkdir -p /media/tmp
mkdir -p /opt/oracle/psft/
mount /dev/sdd2 /media/tmp
cp -R --preserve=all /media/tmp/opt/oracle/psft/vm /opt/oracle/psft/
and then clone the base image to one of DB and PT. Please confirm.
Thanks
Pradeep
@Pradeep, you can use the System.vdi that came with the database image. The portion you are copying for step 19 is the same between the two System.vdi disk images.
Yes you are correct. After adding the disk through the virtual box image's properties, execute the steps you listed. Of course, if you already executed them, then the two directories will already exist and you can skip right to mounting and copying.
Hi Jim,
Thanks for your tutorial. I noticed that some had trouble using OEL 6.x. I successfully installed PS HCM 9.1 on OEL 6.4. For those interested, see my comment to this post:
http://bloggingaboutoracleapplications.org/running-oracle-vm-templates-oracle-enterprise-linux-guide-part-4-6/
@Carlo, thank you for that information. I see your comments to that post dated April 2, 2013 at 7:25 pm. Very valuable information.
Hi Jim.
I have seen you reference some intent to work through the latest HCM deployment on VBox. I've been trying to struggle through it and am now to a point where I think I have to throw up my hands and wait for somebody with more Linux experience to writeup a guide to help me with.
I've reached the part where I'm trying to compile my binaries and have struggled through the user permissions issues by digging through directories and changing owners to oracle. now, SQL Plus is failing because it cannot find libcllntsh.so.11.1.
I'm currently working with the following packages on OEL 5.2 with all yum udpates applied.
OVM_EL5U7_X86_64_HCMDB_9_1_2_PVM
OVM_EL5U7_X86_64_TOOLS8_52_06_PVM
Thanks in advance for any tips.
Tom
@Tom, I did have a plan to work through the OVM templates again, but the PeopleTools team released VirtualBox demo images for 9.2, making an OVM conversion unnecessary. You can find the VirtualBox demo images on Oracle Support.
Thanks Jim. I thought it would be a good learning experience to work through this but now my time available to do this has come to an end so I will take your advice and install the Vbox templates.
Thanks for your blog and all that you do to inform us out here.
Cheers...
Tom
Jim, This is an excellent blog. I was finally able to get HCM91 running. I actually needed 9.1 so your approach was very helpful. I know there is a 9.2 VBox template that Oracle now provides. I am wondering if they will provide this for earlier releases?
For reference, here are the items that I had to do differently to get the HCM DB image running:
1. No need to do any ASM edits as HCM 91 does not use ASM
2. The /u01/scripts folder is different w HCM versus FSCM and the script names are also different (dbstart versus startSID)
3. Need to disable SELINUX to get the dbreconfig script to run without library link issues
4. I also had the UID/GUID issue as others and the following comand helped resolve this "find / -uid 54321 -exec chown oracle {} \;"
5. For some reason, I was not able to get the DB service registered with the listener and could not access the guest from outside. I deleted the listener.ora and bounced services and this seems to have forced the register.
Thanks!
Hi Jim, i am doing the template conversion of peoplesoft referring your blog
i am facing an issue while running the ./oraclevm-template.sh . this errors out with
INFO: Relinking Oracle Binaries...
ERROR: Oracle Relinking Failed. Logs: /home/oracle/relink.log
To build again do :
cd /u01/app/oracle/product/11.1.0/db_1/bin
./relink all
ERROR: relink error.
ERROR: Failed to install Oracle Database.
/u01/db-reconfig.sh: line 24: press_anykey: command not found
Could you please help me in this
Thanks
Naga
@Naga, I have not run into this, so I'm not certain of the cause. Did you look in /home/oracle/relink.log? Did you try running the command shown? Also, the script doesn't seem to be able to find the macro/command press_anykey. I'm not sure if that is the problem, or if that happens while the error is being displayed. You can probably comment it out.
Post a Comment