Oracle VM Single Box Install (Server & Manager/NoVM)
A brother of mine asked me if I could create a database machine and an application server machine during this Easter bank holidays regarding a Demo/Proof Of Concept setup. Easter is always a lazy period, so why not…
The end result would be something like the following:
- Disks setup RAID-1 configuration (2×146 GB)
- OS: RedHat EL 5.4 x86_64
- Application Server: JBoss 4.0.3 GA
- Database Server: Oracle Database Server 10g R2 Standard Edition One
So I started doing some thinking. I had two HP ProLiant DL380 GL6 Server machines to work with, but both were “bare” minimum regarding their hardware. Every HP DL380 had 2×146 swappable SAS harddisks and only 2×2 GB RAM. Hmmm… Oracle License wise I would be in the safe zone because it would only be used as a demo / proof of concept environment and I also knew that the resource consumption would be the heaviest on the application server part. CPU probably wouldn’t be an issue due to the fact that even this starter model contained a Quad core Xeon Intel per machine.
I missed a lot of info, that in the end still could be crucial. For example database NLS/Unicode or JVM settings, software versions, SDK/JDK, etc, etc. Also it had to be easy maintainable and very decently configured due one of the facts that, my brother, or others probably could not maintain a Linux environment or even start one or start an Oracle database. And be honest, those boxes (although nice servers) were really bare minimum regarding harddisk volume sizes or RAM specs.
I came up with the following, probably not officially supported, but working idea…why not use Oracle VM…?
A typical Oracle VM implementation would normally involve a two tier install like the following picture, one node containing the Oracle VM Server and one node containing the Oracle VM Manager…
I had two HP boxes so I could have implemented it that way, but it would have left me in the same situation as the standard application / database server setup; A bare minimum environment regarding memory, probably (lacking some info here), for the application server and to much resources for the database environment. The Oracle database was/would be,Â mentioned on Friday evening,Â only “10 GB” in size. I know this doesn’t say that much, but I assumed it would be a small OLTP database environment. Due to the fact I had to assume to much on these kind of things had driven me in the “Oracle VM” solution direction in the first place.
To make a long story shorter, I did the following. I stripped the memory banks from one machine and put it in the other. I did the same for the CPU and SAS disks. So as a result I had, for now, one unusable machine (stripped from its CPU/memory and harddisks) and the second machine now contained the following:
- 2 x Quad Core Intel Xeon CPU’s
- 4 x 146 GB SAS Disks
- 4 x 2 GB RAM (2 x 2 GB per CPU)
Now we are getting somewhere… One box with probably a bit of overkill regarding CPU, still lacking memory banks (even my new laptop will have the same regarding total memory) and just enough, for starters, regarding disk volume to create Oracle VM virtual environments.
Regarding the Oracle VM Manager setup, if I read the manuals correctly, could be setup on a, for example, virtual machine on a different location (my laptop?) or as a virtual machine withing the Oracle VM Server environment, based on a Oracle VM Manager Template. Due to the fact that I don’t have a SAN solution and two nodes that take part in the Oracle VM architecture setup, this would mean that the Oracle Manager part would not automatically start. Of course, being on a Linux environment, I could have scripted that part based on the init.d/rc startup Linux method (hoping that the virtual Oracle VM Manager server would always be dedicated to the same XEN domain btw…). Anyway…
After playing with the idea, I ended up with the following. Why not install the Oracle VM Server AND the Oracle VM Manager on the same environment.
Be very aware: The following single box setup is probably, by Oracle, an unsupported hardware/software setup (but it works like clockwork)
Oracle VM Single Box Install
I created via the HP array configuration tool one big RAID 10 piece, so one volume, using all 4 x 146 GB SAS disks. This gave me approximately a 275 GB disk volume to play with. I installed the Oracle VM Server part as mentioned in the manuals, but with one exception: instead of leaving the default root partition 2 GB in size I changed it to 10 GB in size. Oracle VM Manager needs, among others, a minimum of 2 GB of free / (root) volume.
After setting the appropriate hostname (FSEUDEMO01 in this case) and binding it hard to a TCP/IP address, 192.168.40.10, I continued with installing the Oracle VM Manager software on the same machine. So be aware, within the base Domain-1 Oracle VM environment (dom0 as shown in the picture, so not a domU). This has the cool side effect that rebooting the physical machine will not only automatically start the Oracle VM Server environment but also the Oracle VM Manager environment.
The install logging of the Oracle VM Manager software will show something like the following:
[root@FSEUDEMO01 mnt]# sh ./runInstaller.sh Welcome to Oracle VM Manager 2.2 Please enter the choice: [1|2|3] 1. Install Oracle VM Manager 2. Uninstall Oracle VM Manager 3. Upgrade Oracle VM Manager 1 Starting Oracle VM Manager 2.2 installation ... Do you want to install a new database or use an existing one? [1|2] 1. Install a new Oracle XE database on localhost 2. Use an existing Oracle database in my network 1 Prepare to install the Oracle XE database ... Checking the supported platforms ... Done Checking the prerequisite packages are installed ... Done Checking the available disk space ... Done Installing the oracle-xe-univ package (rpm) now ... Done Oracle Database 10g Express Edition Configuration ------------------------------------------------- This will configure on-boot properties of Oracle Database 10g Express Edition.Â 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 <Enter> to accept the defaults. Ctrl-C will abort. Specify the HTTP port that will be used for Oracle Application Express : Specify a port that will be used for the database listener : 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 10g Express Edition to be started on boot (y/n) [y]: Starting Oracle Net Listener...Done Configuring Database...Done Starting Oracle Database 10g Express Edition Instance...Done Installation Completed Successfully. To access the Database Home Page go to "http://127.0.0.1:8080/apex" Checking the availability of the database ... Set default database schema to 'OVS'. Please enter the password for account 'OVS': Confirm the password: Creating the Oracle VM Manager database schema ...Done Installing the ovs-manager package (rpm) ... Done Installing the oc4j package (rpm) ... Done Please enter the password for account 'oc4jadmin': Confirm the password: Starting OC4J ... Done. To access the OC4J Home Page and change the password go to http://127.0.0.1:8888/em Deploying Oracle VM Manager application to OC4J container. Creating connection pool ... Done Creating data source ... Done Deploying application help ... Done Deploying application ... Done Please enter the keystore password for the Web Service: Confirm the password: Setting keystore password for Web Service ... Done Do you want to use HTTPS access for Oracle VM Manager (Y|n)? Configuring OC4J to use HTTPS ... Done Stopping OC4J ... Done Starting OC4J ... Done Please enter the password for the default account 'admin': Confirm the password: Configuring SMTP server ... Please enter the outgoing SMTP mail server(e.g. - mail.abc.com, mail.abc.com:25): fseudemo01:25 Mail server checking, may need some time, please wait ... Mail server 'fseudemo01:25' check failed, enter Y to change the name and retry or N to keep hostname and continue(Y|n)?n Setting the SMTP server to fseudemo01:25 ... Done Please enter an e-mail address for account 'admin': root@fseudemo01 Confirm the e-mail address : root@fseudemo01 Unable to send an email to 'root@fseudemo01', would you like to change the email address(Y|n)?n Updating e-mail address for account 'admin' to 'root@fseudemo01' ... Done The console feature is not enabled by default. For detailed setup, refer to Oracle VM Manager User's Guide Installation of Oracle VM Manager completed successfully. To access the Oracle VM Manager 2.2 home page go to: https://192.168.40.10:4443/OVS To access the Oracle VM Manager web services WSDL page go to: https://192.168.40.10:4443/OVSWS/LifecycleService.wsdl https://192.168.40.10:4443/OVSWS/ResourceService.wsdl https://192.168.40.10:4443/OVSWS/PluginService.wsdl https://192.168.40.10:4443/OVSWS/ServerPoolService.wsdl https://192.168.40.10:4443/OVSWS/VirtualMachineService.wsdl https://192.168.40.10:4443/OVSWS/AdminService.wsdl To access the Oracle VM Manager help page go to: https://192.168.40.10:4443/help/help
This would give me the advantage to control the Oracle VM Server environment remotely instead trying to do this via the bare minimum install of the “dom0″ XEN/Oracle VM domain environment. So the database and listener will bind to “localhost” (and therefore not directly accessible) , but the OVS, Oracle VM Manager part, will bind to the given 192.168.40.10 TCP/IP address as set in the /etc/hosts file (and therefore remotely accessible!).
[root@FSEUDEMO01 /]# cat /etc/hosts # Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1 localhost.localdomain localhost 192.168.40.10 FSEUDEMO01
It took me a while figuring out why I could NOT access the https://192.168.40.10:4443/OVS URL. I thought a while that this was maybe due to my alternative installation method or maybe a client machine on this private network that still had been given the 192.168.40.10 address due to me working within the DHCP range. In the end I figured that there would probably a local firewall in place on the bare minimum dom0 domain XEN environment. So I checked first, very roughly, by disabling the firewall via:
service iptables stop
This solved my remote access issue regarding the https://192.168.40.10:4443/OVS URL. So I followed up by disabling the firewall by shutting the down the services via:
chkconfig --list iptables chkconfig --level 345 iptables off chkconfig --list iptables [root@FSEUDEMO01 /]# chkconfig --list iptables iptables 0:off 1:off 2:on 3:on 4:on 5:on 6:off [root@FSEUDEMO01 running_pool]# chkconfig --level 345 iptables off [root@FSEUDEMO01 running_pool]# chkconfig --list iptables ip6tables 0:off 1:off 2:off 3:off 4:off 5:off 6:off
But in the end, I didn’t like that solution as well, so I turned the iptables service on again for rc levels 3,4 and 5, but altered the iptables config file adding an exception for port 4443.
-- vi /etc/sysconfig/iptables [root@FSEUDEMO01 sysconfig]# cat iptables # Firewall configuration written by system-config-securitylevel # Manual customization of this file is not recommended. *filter :INPUT ACCEPT [0:0] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [0:0] :RH-Firewall-1-INPUT - [0:0] -A INPUT -p tcp -m state --state NEW -m tcp --dport 21 -j DROP -A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j DROP -A INPUT -j RH-Firewall-1-INPUT -A RH-Firewall-1-INPUT -i lo -j ACCEPT -A RH-Firewall-1-INPUT -p icmp --icmp-type any -j ACCEPT -A RH-Firewall-1-INPUT -p 50 -j ACCEPT -A RH-Firewall-1-INPUT -p 51 -j ACCEPT -A RH-Firewall-1-INPUT -p udp --dport 5353 -d 18.104.22.168 -j ACCEPT -A RH-Firewall-1-INPUT -p udp -m udp --dport 631 -j ACCEPT -A RH-Firewall-1-INPUT -p tcp -m tcp --dport 631 -j ACCEPT -A RH-Firewall-1-INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 21 -j ACCEPT -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT -A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 53 -j ACCEPT -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 53 -j ACCEPT -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 2049 -j ACCEPT -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 4443 -j ACCEPT -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 5900:5950 -j ACCEPT -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 8002 -j ACCEPT -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 8003 -j ACCEPT -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 8899 -j ACCEPT -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 7777 -j ACCEPT -A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited COMMIT
Due to the fact that all this software installation stuff is with default settings, you will notice for example via “top” (and/or I installed “nmon”) or the official “xm” statement, that the Domain-0 environment will only have approximately 570 Mb RAM to work with.
[root@FSEUDEMO01 REDHAT_5U4_I86_64]# xm list Name ID Mem VCPUs State Time(s) Domain-0 0 574 8 r----- 1641.9
This is not enough if you remember that besides the Oracle VM server processes going on, there is now also a OC4J environment AND a Oracle XE database running. The XE database will only consume approx. 150MB but the OC4J environment has set the following for the JVM realm…
[root@FSEUDEMO01 /]# ps -ef|grep jar root 4783 4781 2 19:06 ? 00:03:26 /opt/oc4j/java/jdk1.5.0_11/bin/java -XX:PermSize=256m -XX:MaxPermSize=512m -jar /opt/oc4j/j2ee/home/oc4j.jar -config /opt/oc4j/j2ee/home/config/server.xml -userThreads
So if needed, will consume between 256 MB and 512 MB. And if it will need to, will cause the environment start paging memory or (and I had two of those issues…) will cause the environment to become unstable.
So I wanted to give the main Domain-0 (dom0) more initial memory. In this case, always start with 1024 MB instead of those 574 MB initially set during the Oracle VM Server installation. I became aware that the following probably will help changing memory dynamically (searching Google for help) as mentioned in this post/thread, so doing the following on the prompt via root:
[root@FSEUDEMO01 REDHAT_5U4_I86_64]# xm list Name ID Mem VCPUs State Time(s) Domain-0 0 574 8 r----- 1647.7 [root@FSEUDEMO01 REDHAT_5U4_I86_64]# xm mem-set Domain-0 1024 [root@FSEUDEMO01 REDHAT_5U4_I86_64]# xm list Name ID Mem VCPUs State Time(s) Domain-0 0 1024 8 r----- 1649.0
But after a reboot of the machine this will be reset to the default 574 MB. The “proper” way, or at least how I solved it, is that I noticed that it is a parameter in the menu.lst of the grub bootloader. So I altered the menu.lst, changing all the “574″ in “1024″ (1GB), so as shown in the following values, and hardbooted the physical machine.
[root@FSEUDEMO01 grub]# pwd /boot/grub [root@FSEUDEMO01 grub]# cat menu.lst # grub.conf generated by anaconda # # Note that you do not have to rerun grub after making changes to this file # NOTICE: You have a /boot partition. This means that # all kernel and initrd paths are relative to /boot/, eg. # root (hd0,0) # kernel /vmlinuz-version ro root=/dev/cciss/c0d0p2 # initrd /initrd-version.img #boot=/dev/cciss/c0d0 # Detect64 claims this is 64 bit box default=2 timeout=5 splashimage=(hd0,0)/grub/splash.xpm.gz hiddenmenu title Oracle VM Server-ovs (xen-3.4.0 2.6.18-22.214.171.124.9.el5ovs) root (hd0,0) kernel /xen-32bit.gz dom0_mem=574M module /vmlinuz-2.6.18-126.96.36.199.9.el5xen ro root=UUID=fc4f00d4-c0ce-474d-8d92-f4b986bac645 module /initrd-2.6.18-188.8.131.52.9.el5xen.img title Oracle VM Server-ovs serial console (xen-3.4.0 2.6.18-184.108.40.206.9.el5ovs) root (hd0,0) kernel /xen-32bit.gz console=com1,vga com1=57600,8n1 dom0_mem=574M module /vmlinuz-2.6.18-220.127.116.11.9.el5xen ro root=UUID=fc4f00d4-c0ce-474d-8d92-f4b986bac645 console=tty0 console=ttyS0,57600n8 module /initrd-2.6.18-18.104.22.168.9.el5xen.img title Oracle VM Server-ovs (xen-64-3.4.0 2.6.18-22.214.171.124.9.el5ovs) root (hd0,0) kernel /xen-64bit.gz dom0_mem=574M module /vmlinuz-2.6.18-126.96.36.199.9.el5xen ro root=UUID=fc4f00d4-c0ce-474d-8d92-f4b986bac645 module /initrd-2.6.18-188.8.131.52.9.el5xen.img title Oracle VM Server-ovs serial console (xen-64-3.4.0 2.6.18-184.108.40.206.9.el5ovs) root (hd0,0) kernel /xen-64bit.gz console=com1,vga com1=57600,8n1 dom0_mem=574M module /vmlinuz-2.6.18-220.127.116.11.9.el5xen ro root=UUID=fc4f00d4-c0ce-474d-8d92-f4b986bac645 console=tty0 console=ttyS0,57600n8 module /initrd-2.6.18-18.104.22.168.9.el5xen.img title Oracle VM Server-base (2.6.18-22.214.171.124.9.el5) root (hd0,0) kernel /vmlinuz-2.6.18-126.96.36.199.9.el5 ro root=UUID=fc4f00d4-c0ce-474d-8d92-f4b986bac645 initrd /initrd-2.6.18-188.8.131.52.9.el5.img
You now got a (hopefully) stable environment (after this moment I at least didn’t have any strange issues anymore) as well…
Fiddling around during the weekend
Before I did this last part (setting the 1 GB RAM memory), I fiddled around a bit. I downloaded some completely prepped Oracle Virtual Machines Templates via http://edelivery.oracle.com. So, in my case they wanted a database server and a application server. I was to lazy to do the “JBoss 4.0.3 GA” bit, if not only it was my weekend after all and this version is old…very old…. It would probably have been easier to download a WebLogic Oracle VM Template and install that one (and more stable…?) than install all those jar’s and old Java JDK’s from scratch. I hoped that the with the machines delivered RedHat 5.4 EL software would have had JBoss install option, but alas… Despite this an Oracle VM setup or other virtualization environment will bring me the flexibility to switch / act very quickly on changes in demand regarding server specs.
Anyway, I downloaded a…
- Oracle Enterprise Linux 5.4 64 bit Oracle VM Template (4 GB root volume
- Oracle Enterprise Linux 5.2 64 bit, including a Oracle 10.2.0.4.0 EE database, Oracle VM Template
- Oracle Enterprise Linux 5.2 64 bit Oracle VM Template (10 GB root volume)
- Oracle Enterprise Linux 5.2 64 bit Oracle VM Template Builder (4 GB root volume)
…to play around with. After downloading those Oracle VM Templates, you will have to place them in the following “seed_pool” directory, after you have unzipped them and created the new directory under the “seed_pool” directory via, for example: “tar xzf OVM_EL5U2_X86_64_ORACLE10G_PVM.tgz”:
[root@FSEUDEMO01 OVS]# ls -l total 0 drwxrwxrwx 3 root root 3896 Apr 5 14:02 iso_pool drwxr-xr-x 2 root root 3896 Dec 13 02:52 lost+found drwxrwxrwx 2 root root 3896 Dec 13 03:00 publish_pool drwxrwxrwx 7 root root 3896 Apr 5 21:59 running_pool drwxrwxrwx 7 root root 3896 Apr 5 17:15 seed_pool drwxrwxrwx 2 root root 3896 Dec 13 03:00 sharedDisk [root@FSEUDEMO01 OVS]# cd seed_pool [root@FSEUDEMO01 seed_pool]# ls -l total 0 drwxr-xr-x 2 root root 3896 Apr 4 18:53 OVM_EL5U2_X86_64_ORACLE10G_PVM drwxr-xr-x 2 root root 3896 Apr 5 01:23 OVM_EL5U2_X86_64_PVM_10GB drwxr-xr-x 2 root root 3896 Apr 4 22:36 OVM_EL5U2_X86_64_TMPLBUILDER_PVM drwxr-xr-x 2 root root 3896 Apr 4 18:53 OVM_EL5U4_X86_64_PVM_4GB drwxrwxrwx 2 root root 3896 Apr 5 17:21 REDHAT_5U4_I86_64
After you have created those templates via unzipping and untaring them, they can be discovered in the resources page and after they have been discovered and approved. The “approved” part has to be done by an privileged user, because there is a security/functional distinction between “users” and “managers” and “administrator” (the role the default “admin” user has).
See the Oracle VM Manuals via:
- https://192.168.40.10/OVS/help/help (in my case / btw this is an unprotected URL by default…)
or the “help” function in your Oracle VM Manager GUI webpages…
Be aware that if you create Virtual Machines from those templates, that some of them will ask during their virtual startup routine for interactive input about for example: DHCP setting yes|no, hostname, oracle default database passwords, etc. Click on the “CONSOLE” menu while pre-selecting the correct just started new virtual machine OR download VNCVIEWER via this link here. In my case I set the database machine on a fixed IP (192.168.40.100) and the application server environment as well (192.168.40.110). I left those two fast setup RedHat machines based on DHCP so it will be easy for the guys who start working with this environment to have at least a Linux desktop. I still have to check what I can do with that Oracle VM Template Builder (but maybe that’s for the next weekend – “what do you mean with I am nuts” – ). The next picture shows an overview of the current setup.
By the way you can see which machines are in the air and with what properties via the “xm” command on the root shell.
[root@FSEUDEMO01 seed_pool]# xm list Name ID Mem VCPUs State Time(s) 70_FSDEMO_DBS_01 2 1024 2 -b---- 59.2 90_FSDEMO_APS_01 1 2048 4 -b---- 33.2 Domain-0 0 1024 8 r----- 1528.9 [root@FSEUDEMO01 seed_pool]# xm top xentop - 23:27:09 Xen 3.4.0 3 domains: 1 running, 2 blocked, 0 paused, 0 crashed, 0 dying, 0 shutdown Mem: 8378168k total, 4296048k used, 4082120k free CPUs: 8 @ 2000MHz NAME STATE CPU(sec) CPU(%) MEM(k) MEM(%) MAXMEM(k) MAXMEM(%) VCPUS NETS NETTX(k) NETRX(k) VBDS VBD_OO VBD_RD VBD_WR SSID 70_FSDEMO_ --b--- 59 0.0 1048576 12.5 1048576 12.5 2 1 2535 2150 2 0 24946 43500 0 90_FSDEMO_ --b--- 33 0.0 2097152 25.0 2097152 25.0 4 1 8 1128 1 0 14010 4514 0 Domain-0 -----r 1534 0.0 1048576 12.5 no limit n/a 8 0 0 0 0 0 0 0 0
The Real Hacking…
While the 1025 MB wasn’t set yet for the “Domain-0″ or “dom0″ environment, it happened twice that the server rebooted without (for now) visible cause. Probably due to taking to much memory by the OC4J Java realm (remember initially I had only approx. 500 MB to work with in this part of the virtual environment). These reboots happened during the creation of virtual machines. Those virtual machines are normally created in the /OVS/running_pool directory.
[root@FSEUDEMO01 OVS]# cd running_pool [root@FSEUDEMO01 running_pool]# ls -l total 0 drwxrwxrwx 2 root root 3896 Apr 5 17:20 130_FSUTILVM drwxrwxrwx 2 root root 3896 Apr 5 21:58 256_FS-REDHAT-APPS01 drwxrwxrwx 2 root root 3896 Apr 5 23:19 258_FS-REDHAT-DB01 drwxrwxrwx 2 root root 3896 Apr 5 19:20 70_FSDEMO_DBS_01 drwxrwxrwx 2 root root 3896 Apr 5 19:20 90_FSDEMO_APS_01 [root@FSEUDEMO01 running_pool]# pwd /OVS/running_pool [root@FSEUDEMO01 running_pool]# ls * 130_FSUTILVM: data.img README System.img vm.cfg vm.cfg.orig 256_FS-REDHAT-APPS01: System.img vm.cfg vm.cfg.orig 258_FS-REDHAT-DB01: System.img vm.cfg vm.cfg.orig 70_FSDEMO_DBS_01: oracle10g_x86_64_asm.img README System.img vm.cfg vm.cfg.orig 90_FSDEMO_APS_01: README System.img vm.cfg vm.cfg.orig
In you Oracle VM Manager overview page you will see a virtual machine create status on “Creating” or such and it can’t be deleted if you try. You are only allowed to delete such a create failure if it is, for example, in a steady state like “Powered Down”. The first time I managed to drop such a machine, and afterwards tried again, by copying the missing files from a different directory in that /OVS/running_pool into the directory that had the “corrupted” content. Most of the time the last bits, the “vm.cfg” and”vm.cfg.orig” are missing. The file contain the startup and other needed settings for that specific virtual machine.
[root@FSEUDEMO01 90_FSDEMO_APS_01]# pwd /OVS/running_pool/90_FSDEMO_APS_01 [root@FSEUDEMO01 90_FSDEMO_APS_01]# cat vm.cfg bootloader = '/usr/bin/pygrub' disk = ['file:/var/ovs/mount/0082E50C753D4AA2BB38DC274837DE01/running_pool/90_FSDEMO_APS_01/System.img,xvda,w'] maxmem = 2048 memory = 2048 name = '90_FSDEMO_APS_01' on_crash = 'restart' on_reboot = 'restart' uuid = '3cd09034-68cb-4111-92a4-a04f776d8a21' vcpus = 4 vfb = ['type=vnc,vncunused=1,vnclisten=0.0.0.0,vncpasswd=admin4fs'] vif = ['bridge=xenbr0,mac=00:16:3E:10:88:2E,type=netfront'] vif_other_config =  [root@FSEUDEMO01 90_FSDEMO_APS_01]# cat vm.cfg.orig bootloader = '/usr/bin/pygrub' disk = ['file:/var/ovs/mount/0082E50C753D4AA2BB38DC274837DE01/running_pool/90_FSDEMO_APS_01/System.img,xvda,w'] maxmem = 2048 memory = 2048 name = '90_FSDEMO_APS_01' on_crash = 'restart' on_reboot = 'restart' uuid = '3cd09034-68cb-4111-92a4-a04f776d8a21' vcpus = 4 vfb = ['type=vnc,vncunused=1,vnclisten=0.0.0.0,vncpasswd=admin4fs'] vif = ['bridge=xenbr0,mac=00:16:3E:10:88:2E,type=netfront'] vif_other_config = 
Replacing the “90_FSDEMO_APS_01″ with the name of the corrupted virtual machine attempt, was good enough to get the Oracle VM Manager to believe that the machine was in “Powered Off” instead of “Creating” state, giving me the opportunity to drop the corrupted create attempt via the Web UI of the Oracle VM Manager. But once it wasn’t…
The more aggressive hack was the following.
I logged in via the oracle linux user via “su – oracle” on the “Domain-0″ Oracle VM Server linux shell. I correctly set my database environment for Oracle XE as follows:
[root@FSEUDEMO01 /]# su - oracle -bash-3.2$ cat set_oracle_home.sh export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server; export ORACLE_SID=XE; export PATH=$ORACLE_HOME/bin:$PATH; -bash-3.2$ . ./set_oracle_home.sh -bash-3.2$ sqlplus /nolog SQL*Plus: Release 10.2.0.1.0 - Production on Mon Apr 5 23:49:07 2010 Copyright (c) 1982, 2005, Oracle. All rights reserved. SQL> connect OVS Enter password: Connected. SQL> col img_name for a50 SQL> col status for a15 SQL> select img_name, status, img_id from OVS_VM_IMG IMG_NAME STATUS IMG_ID -------------------------------------------------- --------------- ---------- OVM_EL5U4_X86_64_PVM_4GB Active 10 OVM_EL5U2_X86_64_ORACLE10G_PVM Active 30 FSDEMO_APS_02 Creating 190 FSDEMO_DBS_01 Powered Off 70 OVM_EL5U2_X86_64_TMPLBUILDER_PVM Active 110 FSUTILVM Powered Off 130 OVM_EL5U2_X86_64_PVM_10GB Active 150 FSDEMO_APS_01 Powered Off 90 8 rows selected. SQL> update OVS_VM_IMG 2 set STATUS='Powered Off' 3 where IMG_ID=190 4 ; 1 row updated. SQL> commit; Commit complete.
So updating the Oracle XE environment, including “faking” the correct directory content in /OVS/running_pool/190_FSDEMO_APS_02, made my Oracle VM Manager believe that the status was now in “Powered Off” status and allowed me to correctly drop (and probably correctly update the OVS Oracle XE tables) the directory from disk…
It was very easy to setup this environment on a single box and I am impressed with the proper/decent configuration that Oracle put into it regarding all the dummy proof scripting to set such an environment up and deploy it. Hereby an enhancement request to also make the “console” plugin automatically downloadable or installable instead of downloading it via the http://oss.oracle.com site. A workaround or a decent solution for Windows Explorer would also be appreciated, although VNCViewer works in most cases (but you get really lazy if everything works this easy – or is it just me).
In a setup like this one, you should probably shutdown the Oracle VM Manager environment if you don’t need it anymore. For instance I created small executable scripts like:
[root@FSEUDEMO01 ~]# cat start_oracle_manager.sh # service iptables stop service oc4j stop service oracle-xe stop service oracle-xe start service oc4j start [root@FSEUDEMO01 ~]# cat stop_oracle_manager.sh # service iptables start service oc4j stop service oracle-xe stop
Another good practice in my setup would be creating a RMAN script (after putting the Oracle XE environment in archivelog mode), executed via the “cron” deamon (“crontab”), that would backup, on a regular basis, the database to a safe location.
In all this exercise was very easy and now I don’t wonder anymore why the manuals contain not that much info. In principle there isn’t that much to tell or explain…
- Oracle 10gR2 – New Feature: the Rules Manager
- Oracle BPEL Process Manager 10.1.2 Beta 3 available for download
- Discussion on The Server Side: Comparing Microsoft Yukon (SQL Server 2005, Beta release) with Oracle 10g
- Oracle Enterprise Manager
- AMIS Query – Oracle BPEL Process Manager Dissected (Thursday 27th January)