By alison.holloway on April 11, 2008 3:58 PM
This is the first of my Oracle VM blogs. I figured I'd start at the beginning. How to install it.
There's an Oracle VM Quick Start Guide that gives you a bit more information than I've given you here, but not quite as much as the install guides (links given later).
You'll need a machine that supports virtualization. Most newer machines support virtualization, but if you're using an older machine, you might need to use this as an excuse to go shopping. You'll also need at least 2GB RAM if you want to run more than one virtual machine at once. Oracle VM Server has it's own operating system, so it will wipe any existing data on your hard drive. Make sure you install this on a machine that you're happy to have wiped and dedicated to running your virtual machines.
So onto the install part. It's pretty easy. Very easy in fact.
Download the Oracle VM 2.1.1 ISO file.
You'll need both the Oracle VM Server and Oracle VM Manager ISO files:
Oracle VM Server 2.1.1 Part number V12540-01 315M
Oracle VM Manager 2.1.1 Part number V12499-01 534M
Use your favourite CD burner software and burn the Oracle VM Server ISO to a bootable CD.
Then burn the Oracle VM Manager ISO to a CD. This one doesn't need to be bootable.
You don't need to waste DVDs as both installs fit nicely onto a CD.
Boot your machine from the Oracle VM Server CD. Follow the prompts during login, and you're away. When the install has finished, log in as "root" with the password you set during the install. Oracle VM Server is installed and ready to go now.
Now, to install Oracle VM Manager. You'll need an Enterprise Linux (either Oracle's or RedHat's) installation. Yes, this needs to be on another machine, though it doesn't wipe out the data, and you can use a lower spec'd machine, any old machine that will handle Enterprise Linux.
Start up the operating system, and mount the CD. Run the installation script as "root":
# sh runInstaller.sh
Follow the prompts during the install and you're done. You can accept the defaults by hitting Enter. A lot of people seem to miss this so I thought it was worthy of pointing out.
If you want more detailed install info, you can get it in these books:
Oracle VM Server Installation Guide
Oracle VM Manager Installation Guide
Now you've got both the Oracle VM Server and Oracle VM Manager installed, you need to let Oracle VM Manager know about the Oracle VM Server.
Open the Oracle VM Manager interface in a web browser:
http://hostname:8888/OVS
Log in as "admin" with the password you set during the installation.
Create a Server Pool.
Add the Oracle VM Server to the Server Pool. You can set whether the Oracle VM Server acts as a
Server Pool Master, a
Utility Server, and a
Virtual Machine Server. If you need to enter a login while doing this, use the "root" password for the Oracle VM Server.
The next blog entry will show you how to create a virtual machine with your newly installed setup.
By alison.holloway on April 24, 2008 12:59 PM
Now you've got Oracle VM Server and Oracle VM Manager installed, you'll obviously want to create a virtual machine. The easiest way is to use one of the preconfigured templates supplied by Oracle. In this example, I'm going to use an Oracle Enterprise Linux Release 5 Update 1 template that is hardware virtualized (fully virtualized) for an x86_64 bit platform.
You can use Oracle VM Manager to create guest virtual machines, but in this example I am going to use the Oracle VM Server command line tools. I'll write an example of creating a virtual machine using Oracle VM Manager in an upcoming blog.
At the end of this install, I will have a hardware virtualized guest (virtual machine) running Oracle Enterprise Linux Release 5 Update 1.
To start off, download the following template from OTN:
OVM_EL5U1_X86_64_HVM_4GB.tgz
There's a readme for these templates which gives more information that I give you here if you get stuck or want to know more.
You can put the template onto an FTP or HTTP server, and import it into Oracle VM Server from there, or, the easiest way for me at least, is to copy it onto a USB drive and mount the drive on the Oracle VM Server box. When you've plugged in the USB drive to your Oracle VM Server, find the mount point by entering:
# dmesg |tail
Look for an entry like:
sdb: sdb1
In this case, the mount point is "sdb1". Once you've worked out where the mount point is, make a directory to mount the USB drive:
# mkdir /mnt/exthdd
Now, use this entry to mount the USB drive with the command:
# mount /dev/sdb1 /mnt/exthdd
Copy the template to the /OVS/templates directory:
# cp /mnt/exthdd/OVM_EL5U1_X86_64_HVM_4BG.tgz /OVS/templates/
Uncompress the template:
# tar -xzf OVM_EL5U1_X86_64_HVM_4GB.tgz
Copy the directory and files that are created into /OVS/seed_pool:
# mkdir /OVS/seed_pool/OVM_EL5U1_X86_64_HVM_4GB
# cp /OVS/templates/OVM_EL5U1_X86_64_HVM_4GB/* /OVS/seed_pool/OVM_EL5U1_X86_64_HVM_4GB/
Edit the /OVS/seed_pool/OVM_EL5U1_X86_64_HVM_4GB/vm.cfg file to make sure it is correct for your setup. Mostly this is just confirming the path to the vm.cfg file.
Create and start the virtual machine using the command:
# xm create /OVS/seed_pool/OVM_EL5U1_X86_64_HVM_4GB/vm.cfg
The virtual machine is created and started. You can see that the virtual machine is running with the xm list command. You should see dom0 and OVM_EL5U1_X86_64_HVM_4GB in the output.
# xm list
You can start and stop virtual machines using the xm command. If you want to shut down a domain, use the xm list command to get the domain ID, then use that to shut it down, for example
# xm shutdown 1
Coming next ... Connecting to the virtual machine.
By alison.holloway on May 29, 2008 1:17 PM
So now you have a guest virtual machine running on Oracle VM Server. You want to connect to it of course. As I've not yet introduced Oracle VM Manager to this scenario, I'll not talk about connecting to it from there just yet, though this is probably the easiest way. So my next blog will be devoted to Oracle VM Manager.
There are many ways to connect to the guest virtual machine. Here I'll show you how to do it using VNC. Before you connect to it, you'll need to find the VNC port used by the domain. On the Oracle VM Server, run:
# xm list -l |more
In the output, look for the device vfb and the location entry in that section. It will be something similar to:
location 0.0.0.0.:5900
The last part of that string is the VNC port you can use to connect to the guest. From another host, use VNC to connect to the guest:
# vnc -Shared 192.168.2.21:5900
The -Shared flag allows others to connect to the port as well as yourself. The IP address is the IP address of the Oracle VM Server. If all goes well, you'll see a command shell login. Log in using the default template login root/ovsroot.
If you used an Oracle Database template when you created the guest, here's how to log in to the database with SQL*Plus (the Oracle Database command-line tool):
Once you're logged in to the guest as root, su as the oracle user (oracle/oracle):
su oracle
Start SQL*Plus:
$ORACLE_HOME/bin/sqlplus /nolog
The $ORACLE_HOME environment variable is already set in the template to /u01/app/oracle/product/db10g, which is the location of the Oracle Database installation (the Oracle Home).
At the SQL*Plus prompt, log in as the SYSDBA user using operating system authentication:
SQL> connect / as sysdba
You are logged into SQL*Plus and connected to the Oracle Database with full database administration privileges.
Huzzah!