Sunday 12 September 2010

Oracle VM Manager Troubleshooting

Installing Oracle VM 2.1.2 Manager & Server on EL5U2 (OTN Installfest)

-----------------------------------------------------

                             Oracle OpenWorld 2008

*** This guide is for test purposes only - not production ***

*** Shows howto use two 2GB RAM boxes to build a ***

*** stand alone Oracle VM Manager & Server test environment ***

*** use an ethernet cable to connect Nodes 1 & 2 ***


 

On Node1 : Install Oracle VM 2.1.2 Manager & Enterprise Linux 5 Update 2

------------------------------------------------------------------------

Boot from el5u2 dvd on the

press enter for graphical install


 

+ Automatically or Manually partition your hard drive with Disk Druid

    note: default partitioning will overwrite data on your drive.


 

+ Accept defaults for GRUB boot loader, configure networking, set hostname

    hint: for testing disable ipv6 and DHCP

    IP : 192.168.100.10    netmask : 255.255.255.0

    manually set the hostname : ovm212mgr

    gateway : 192.168.100.1

    Primary DNS : 127.0.0.1


 

+ Set time and root password


 

+ Mark the 'Software Development' checkbox, and

    select the 'customize now' radio button.


 

+ Make sure the packages essential for installing Oracle are selected.

    Desktop Environment : Gnome or KDE

    Applications :

        Editors - at least one editor - vi etc.

        Graphical Internet - a web browser eg.firefox

    Development :

        - Development Tools - Legacy Software Development

        - Gnome or KDE Software Development

    Base System :

        - Java - legacy software support - Xwindow System


 

+ Uncheck the non-essential packages.

        Servers : Printing support


 

+ Hit 'Next' at the kickstart page, then there is 20min of copying files etc.


 


 

On Node 2 : Install the Oracle VM Server 2.1.2

----------------------------------------------

** Note: The Server expects to be on a dedicated box, and has it's own OS **

Boot from Oracle VM 2.1.2 Server bootable CD

press enter for graphical install

    ** Need at least 2 GB RAM **


 

+ Accept the default partitioning, or Create a custom partition layout eg.


 

Device    Start    End    Size    Type        Mount Point

/dev/sda

sda1         1     13     101M ext3        /boot

sda2         14     405     3074M ext3        /

sda3         406    19326    148420M ocfs2        /OVS

sda4        19327    19457     1027M Extended    

sda5    19327    19457     1027M swap


 

+ Accept the defaults for the GRUB boot loader

/dev/sda     Master Boot Record (MBR)


 

+ Select the network interface to use for management of this machine.

    these should be detected automatically

    eg. eth0: 00:1C:23:19:BE:67


 

+ Configure networking, set hostname

    hint: for testing disable ipv6 and DHCP

    IP : 192.168.100.11

    netmask : 255.255.255.0

    gateway : 192.168.100.1

    Primary DNS : 127.0.0.1

    manually set hostname : ovm212svr


 

+ Set time, ovs-agent & root passwords

    click ok - it will then begin to install OracleVM Server


 

+ mount USB stick on the OVM Server (Node 2) and extract the 64bit template in the seed pool

    # mkdir /mnt/stick

    # mkdir /OVS/seed_pool

    # mount -t vfat /dev/sdb1 /mnt/stick

    # cd /mnt/stick

    # ls

oracle11g_x86_64.tar.bz2.1 oracle11g_x86_64.tar.bz2.2

OVM_EL5U1_X86_64_PVM_10GB.tgz

    # cp ./OVM_EL5U1_X86_64_PVM_10GB.tgz /OVS/seed_pool/

    # cd /OVS/seed_pool

    # tar -xzvf OVM_EL5U1_X86_64_PVM_10GB.tgz    (this may take over 6min)

./OVM_EL5U1_X86_64_PVM_10GB/

./OVM_EL5U1_X86_64_PVM_10GB/system.img

./OVM_EL5U1_X86_64_PVM_10GB/vm.cfg

./OVM_EL5U1_X86_64_PVM_10GB/README

[root@ovm212svr seed_pool]#


 

On Node 1 : Finish installing el5u2 and begin installing Oracle VM Manager 2.1.2

--------------------------------------------------------------------------------

+ Reboot Node 1


 

+ Most Linux distros and EL5U2 ship with default security preferences locked down.

For testing purposes I typically turn off the firewall and disable SE Linux.


 

+ Enabling kdump will provide useful information for support


 

+ Set a local user eg. todd/welcome

    don't create the oracle user at this point you will do that later.


 

### For post-install configuration login as root on Node 1


 

+ Copy the Oracle VM Manager DVD to root's home directory on Node 1 (about 6min)


 

+ SSH into the Oracle VM Server machine (Node 2) and build the Oracle11g template img.

    # ssh -4 192.168.100.11

The authenticity of host '192.168.100.11 (192.168.100.11)' can't be established.

RSA key fingerprint is 74:c0:a3:63:d0:9d:63:86:5c:e7:b3:60:71:04:a2:90.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added '192.168.100.11' (RSA) to the list of known hosts.

root@192.168.100.11's password:

Last login: Wed Sep 17 15:32:24 2008

[root@ovm212svr ~]# cd /OVS/seed_pool/OVM_EL5U1_X86_64_PVM_10GB

[root@ovm212svr]# cp /mnt/stick/oracle11* .

[root@ovm212svr]# ls

oracle11g_x86_64.tar.bz2.1 oracle11g_x86_64.tar.bz2.2 README system.img vm.cfg

[root@ovm212svr]# cat oracle11g_x86_64.tar.bz2.1 oracle11g_x86_64.tar.bz2.2 | tar xvj

./oracle11g_x86_64.img

README.oracle        (This step may take over 10min)


 

+ Open a New terminal window on (Node 1) and launch the Oracle VM Manager installer

    # rpm -qa |grep libaio    (make sure libaio is installed)

libaio-0.3.106-3.2 (Oracle XE needs this)

    # cd /root/OracleVM-Manager-2.1.2

[root@ovm212mgr OracleVM-Manager-2.1.2 2008082]# ls

EULA LICENSE readme.txt runInstaller.sh scripts source TRANS.TBL

[root@ovm212mgr OracleVM-Manager-2.1.2 2008082]# sh ./runInstaller.sh

Welcome to Oracle VM Manager 2.1.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.1.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 [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 10g Express Edition to be started on boot (y/n) [y]: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"


 

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 ... Done

Deploying application help ... Done


 

Configuring Oracle VM Manager DataCollector ... Done


 

Please enter the password for the default account 'admin':

Confirm the password:


 

Configuring SMTP server ...

Please enter the outgoing mail server (SMTP) hostname: mail.oracle.com

Mail server checking, may need some time, please wait ...

Mail server 'mail.oracle.com' check failed, want to re-enter it(Y|n)?n

Setting the SMTP hostname server to mail.oracle.com ...

Done


 

Please enter an e-mail address for account 'admin': todd.trichler@oracle.com

Confirm the e-mail address:todd.trichler@oracle.com

Failed to send mail to 'todd.trichler@oracle.com', want to re-enter the email address(Y|n)?n

Updating e-mail address for account 'admin' to 'todd.trichler@oracle.com' ...

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 home page go to:

http://ovm212mgr:8888/OVS


 

To access the Oracle VM Manager help page go to:

http://ovm212mgr:8888/help/help


 

[root@ovm212mgr OracleVM-Manager-2.1.2 2008082]#


 

+ SSH to (Node 2) mount OVS with sync, add the 11g image, set template memory

[root@ovm212mgr OracleVM-Manager-2.1.2 2008082]# ssh -4 192.168.100.11

[root@ovm212svr ~]# cd /OVS/seed_pool/OVM_EL5U1_X86_64_PVM_10GB

[root@ovm212svr OVM_EL5U1_X86_64_PVM_10GB]# ls

oracle11g_x86_64.img oracle11g_x86_64.tar.bz2.2 README.oracle vm.cfg

oracle11g_x86_64.tar.bz2.1 README system.img

[root@ovm212svr OVM_EL5U1_X86_64_PVM_10GB]# mv *bz2* /OVS/seed_pool

[root@ovm212svr ~]# vi /etc/fstab

mount OVS with the sync option eg.

/dev/sda3 /OVS ocfs2 defaults 1 0

would change to

/dev/sda3 /OVS ocfs2 sync 1 0

Reboot the Oracle VM Server, or do the following..

[root@ovm212svr ~]# mount -o remount,sync /OVS

[root@ovm212svr ~]# cp vm.cfg vm-old.cfg

[root@ovm212svr ~]# vi vm.cfg


 

+ On the server (Node 2) modify the vm.cfg file to chnage the memory, add a second disk,

and set the MAC Address for example,


 

replace the line

disk = [ 'file:/OVS/seed_pool/OVM_EL5U1_X86_64_PVM_10GB/system.img,hda,w', ]

with

disk = [ 'file:/OVS/seed_pool/OVM_EL5U1_X86_64_PVM_10GB/system.img,hda,w',

'file:/OVS/seed_pool/OVM_EL5U1_X86_64_PVM_10GB/oracle11g_x86_64.img,hdb,w',]


 

on a 2GB RAM machine you will want to replace the line

    memory = "2048"

with

    memory = "1024"


 

Note: when importing a template, you need to make up a unique MAC address,

    anything other than what you are getting on the network.

    

+ 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.


 

Node 1 : Using the Oracle VM Manager console

--------------------------------------------

+ login to http://ovm212mgr:8888/OVS as user admin with the password you created during install


 

+ use the wizard to create a server pool

server information --

    Server Host/IP: 192.168.100.11

    Server Name:     ovm212svr

    Agent Password: eg. oracle

    Server Username: eg. root

    Server Password: eg. oracle

server pool information --

    Server Pool Name: OTNserverPool , click 'Next'

confirmation --

    click on 'Confirm' to create the server pool


 

+ Click on the Resources tab and import a new VM Template

Click on the Import button --

    Source: Select from Server Pool (Discover and register)

General Information --

    Server Pool Name: OTNserverPool

    Virtual Machine Template Name: OVM_EL5U1_X86_64_PVM_10GB

    Enable High Availability:

    Operating System: Oracle Enterprise Linux 5 64-bit

    Virtual Machine System Username: eg. root

    Virtual Machine System Password: eg. oracle

        click on 'Confirm' to import the template

        select the template and click 'Approve'


 

+ Click on the Virtual Machines tab to create a new Virtual Machine

Click on the 'Create Virtual Machine' button --

    Creation Method: Create virtual machine based on virtual machine template

    Server Pool Name: select OTNserverPool

    Source : Select the VM template to use as source eg. OVM_EL5U1_X86_64_PVM_10GB

Virtual Machine Information --

    Virtual Machine Name: otnVM1

    Console Password: eg. oracle

    Confirm console password: eg. oracle

    Enable High Availability:


 

    Accept the discovered settings for the network interface

    eg. VIF0        00:16:3E:45:27:3D    xenbr0


 

    preview and confirm the settings to create the virtual machine.

wait for the status to change from 'creating' to 'Powered Off'

this may take 5-10min depending on the size of your machine.


 

+ Do the following to enable the console button in Oracle VM Manager

    Copy the ovs-console across from oss.oracle.com/oraclevm/manager/RPMS

    and install it on the manager machine -- Node 1.

[root@ovm212mgr ~]# ls *.rpm

ovm-console-1.0.0-2.i386.rpm -- installs a ovm-console plugin for x86 machines

ovm-console-1.0.0-2.x86_64.rpm -- installs a ovm-console plugin for x86_64 machines

tightvnc-java-1.3.9-3.noarch.rpm -- (if you are using a browser on windows)

[root@ovm212mgr ~]# rpm -ivh ovm-console-1.0.0-2.i386.rpm

Preparing... ########################################### [100%]

1:ovm-console ########################################### [100%]

[root@ovm212mgr ~]#


 

+ Select the virtual machine 'otnVM1' and power it on

Wait for it to change from 'Initializing' to 'Running' then click on the console tab

this will then open up an OVS console for you to work through,

the actual virtual machine will be running on the Oracle VM Server.

Enterprise Linux 5.1 will start running in the console window,

you can logon as root/ovsroot and begin working with it.


 

press Ctrl-Alt exit the OVS-console and return cursor control.


 

note: the difference between running # xm list in the console window and when you

run # xm list after ssh into the ovm212svr machine.


 

+ In the Console work out the MAC address and then add it to the config file

    # ifconfig eth0

        eg. HWaddr 00:16:3E:45:27:3D

    # vi /etc/sysconfig/network-scripts/icfg-eth0    and add

        HWADDR=00:16:3E:45:27:3D

            

+ Useful commands

    # ssh -4 192.168.100.11        (To ssh into the Oracle VM Server)

    # ssh -4 192.168.100.10        (To ssh into the Oracle VM Manager)


 

Many thanks to Greg Marsden for his help with this install guide.


 

No comments: