Posts Tagged ‘Virtual Machine’


Oracle Virtual Machine and Windows 2000

July 23rd, 2009 by Robert McMillen • No Comments »

I had mentioned in a previous post that I would be setting up a Windows 2000 server using OVM and here is a quick update.

First of all you are probably wondering “Why Windows 2000?  Isn’t it obsolete?”.  Good point, but we have some clients who use an older version of Oracle’s Communication Billing and Revenue Management software and it requires Windows 2000 for some of its functionality.

My biggest challenge was getting the ISO for Windows 2000 to work.  This was not an OVM problem but related to the fact that I was using a Windows 2000 installation disk for Microsoft Partners.  There was a tweak that was needed in one of the configuration files before W2K would boot correctly.  After Googling around I found that answer and was able to proceed.

When I have a boot CD/DVD that I want OVM to reference when creating a new server I have several choices.  I can mount the DVD/CD on the OVM server (mount /dev/cdrom /mnt/cdrom) and reference it.  Unfortunately that doesn’t always work as I hoped so I prefer to do this instead.

I  used the Linux dd command to copy the image to an ISO file on the OVM server, import it using the OVM Console and reference it there.  That means I don’t have to keep a copy of the CD/DVD in the drive allowing me to spend more time in my chair!

Here’s a quick look at the import process.  It is sort of a misnomer because you are really “registering” the ISO file so that OVM will “accept” it.  The reason is that OVM assumes anyone could create an ISO file and submit it for use.  OVM requires the “administrator” to approve and accept that ISO before it can be used to boot a new Virtual Machine.

This screen shot shows the screen where you specify that you want to import the ISO file so it can be used by the OVM Server.  You can see in this screen the ISO’s that have already been imported.

VmCreate7

And this one shows the screen where you can specify the specific ISO file to select.  If you have saved the ISO file in the directory named /OVS/iso_pool the application will automatically locate it and show it as a selection under the ISO LABEL drop-down.  In my case I created a subdirectory of /OVS/iso_pool/unix and /OVS/iso_pool/windows and placed the ISO’s for each type of operating system in them.  The GROUP dropdown will reference UNIX or WINDOWS when locating any new ISO’s.

VmCreate6

When creating a new Virtual Machine you have a choice to select an ISO image that will be used to boot the new VM.  The screen for that selection shows the available (and approved) ISO images that have been imported.

VMCreate8

No Comments »

 

Creating Your Oracle Virtual Machine

June 5th, 2009 by Robert McMillen • 1 Comment »

I’ve discussed the Oracle VM Manager in the previous post.  Using it you can do a variety of tasks including:

  • Create virtual machines from installation media or from a virtual machine template
  • Delete virtual machines
  • Power off virtual machines
  • Import virtual machines
  • Deploy and clone virtual machines
  • Perform live migration of virtual machines
  • Import and manage ISOs
  • Create and manage virtual machine templates
  • Create and manage shared virtual disks

I want to cover the Virtual Machine creation process in this post.

If you are using the Oracle VM Manager you must have a gues operating system (O/S) to install when you choose to create a new Virtual Machine.  Currently Oracle VM supports RedHat and Oracle Enterprise Linux (32/64bit), Windows XP, Vista, 2000 and 2003.  The Windows software can be run in 32 or 64 bit but does not run as natively as the Linux guest O/S’s. As you go through the process of defining a new VM have several options.

The first is to to use an existing Template which can either be one you have created or one that you have downloaded from Oracle.  In my case there were two Linux X64 templates that Oracle had created and which I used initially. One Oracle template is just a plan Oracle Enterprise Linux 5.3 Template which has OEL pre-configured.  The other is OEL5.3 with the 10gR2 database (10.2.04) already setup with an ORCL instance.  Using the templates is very simple and gives you a quick-running environment.

Another option is to create your own template or image from an existing environment that you have customized.

The other option for building your VM is to create it from an ISO image.  If you are installing Windows 2003 that you could create an ISO image or mount the CDROM and build it from there.

The last option is to create everything manually using a Xen command-line tool, virt-install.  The documentation is good on this option but it can be much more time-consuming so I’m not going to cover that here.

Here are several screens showing the create process using the OEL 5.3 template.

Once the Confirm button is pressed the Manager creates the appropriate Virtual Machine subdirectory in the /OVS/running subdirectory, creates a customized vm.cfg file and then copies the template files to the new directory.  At the same time, the XE database is updated with the appropriate information about the new VM.  (As a side note, if you create a VM manually, you can “import” it into Oracle VM Manager so that the XE database is updated as well).

Once the VM Manager is completed with copying the files into the new directory, the new VM will show up in the list of Virtual Machines.  You can then choose to “start” it up and by selecting the “CONSOLE” option you can watch the boot process as Linux or Windows boots.

So far I’ve setup several Linux hosts.  I’m going to be setting up a Windows 2K host in the next week to support an older version of Oracle’s CBRM software.  I’ll provide an update on how that goes.

1 Comment »

 

Encounters of the Virtual Server Kind

May 26th, 2009 by Robert McMillen • No Comments »

As I noted in my previous entry I was finally configured to start creating Virtual Machines (VM).  But first I wanted to do some background checking on what I had actually installed.

On the Dell I found a lean version of Linux.  A uname -a command returned this:

Linux hostname 2.6.18-8.1.15.1.16.el5xen #1 SMP Fri Aug 1 18:27:30 EDT 2008 i686 i686 i386 GNU/Linux

My file systems consisted of the following:

Filesystem            Size  Used Avail Use% Mounted on
/dev/sda2             3.0G  807M  2.0G  29% /
/dev/sda3             1.4T  176G  1.2T  13% /OVS
/dev/sda1              99M   36M   59M  38% /boot
tmpfs                 293M     0  293M   0% /dev/shm

The /OVS filesystem was where the VM configurations and files would be stored.  Over in the /OVS filesystem I had the following directories created.

  • local
  • iso_pool
  • running_pool – contains subdirectories for each VM
  • seed_pool – contains VM templates that have been imported via the Oracle Virtual Machine Manager gui
  • publish_pool
  • remote
  • templates
  • sharedDisk
  • tmp

Using OVM Manager creates or copies files to directories as needed.  I haven’t reached the point where every directory has a file in it yet since I haven’t exercised all of the features of OVM Manager yet.  I do have files in seed_pool, running_pool, sharedDisk, and templates.

running_pool, which sounds like a good american indian name, is the directory where each VM is defined as a sub-directory.  The subdirectories are names 999_hostname where 999 is a sequence id along with the hostname you selected during the create VM process.  Inside that sub-directory you will find the following files.

  • README – Just a text file with a brief message.
  • System.img – an image file containing the filesystems for root, boot, etc.  (about 3GB in size)
  • vm.cfg – a text file with the configuration information about the Virtual Machine
  • vm.cfg.orig – an original  copy of vm.cfg

Here’s what is typically in the vm.cfg file with a barebones VM create.  It mentions the System Image file, CDRom, maximum memory, startup memory and the two physical ethernet adapters along with their virtual interfaces.  It also shows that this VM will use 2 virtual cpu cores when running (vcpus).  I’ve replaced my actual hostname with hostname below.

acpi = 1
apic = 1
builder = ‘hvm’
device_model = ‘/usr/lib/xen/bin/qemu-dm’
disk = ['file:/OVS/running_pool/hostname/System.img,hda,w',
',hdc:cdrom,r',
]
disk_other_config = []
kernel = ‘/usr/lib/xen/boot/hvmloader’
keymap = ‘en-us’
maxmem = ‘8192′
memory = ‘4096′

name = ‘hostname
on_crash = ‘restart’
on_reboot = ‘restart’
pae = 1
serial = ‘pty’
timer_mode = ‘2′
uuid = ‘c20ee3f5-08cc-b38b-c50d-368f04709d86′
vcpus = 2
vif = ['bridge=xenbr0,mac=00:16:3E:03:87:08,type=netfront',
'bridge=xenbr1,mac=00:16:3E:1E:06:5A,type=netfront',

Using the OVM Manager I can added/delete new Virtual Disks, modify memory settings, and make changes to the Virtual Ethernet adapters.  As I've added new disks to existing Virtual Machines I get an additional img file in the directory and an additional reference to it in the vm.cfg file.

Here's a sample screen shot of OVM Manager showing the four VM's I've defined.

ovmm1

View of Virtual Servers

At the top you can see the major menu entries for managing VM’s, Resources, Servers, Server Pools and Administration.

Administration is where you setup the users who can manage this console.

Server Pools must be defined and is a grouping of physical servers.

Servers are all physical servers defined.  In my case there is one, the Dell 2950.

Resources is where you can manage VM Images, Templates (which you can download from Oracle), ISO files and Shared Disks.

On the Virtual Machines screen shown you can startup, shutdown, configure and view the console of a specific virtual machine.  There are other options including deleting a VM under the “More Actions” drop down.

One of the first problems I had was that this VM Manager became out-of-sync with reality.  It showed a V M as “Initiating” when it was actually shutdown.  To fix that problem I had to go into the XE database and reset the status of the VM using  standard SQL update and commit commands.  That seemed awkward!

UPDATE! After I figured the solution out on my own I then found a note about it down in the troubleshooting section of the documentation for the VM Manager.

SQL> update ovs.ovs_vm_img t set t.status=’Powered Off’ where t.img_name like ‘vm_name‘;
SQL> commit;
SQL> quit

Creating new VM’s is simple.  The real question is do you want to create it from a Template, ISO file or existing VM image?

More on that in my next post.

No Comments »

 

Why I became Virtually Frustrated

May 26th, 2009 by Robert McMillen • 2 Comments »

I had the opportunity to see “Terminator Salvation” this past weekend.  I’m feeling some solidarity with John Connor and his frustrations with “the machines”.  Of course his machines are real and spend all of their time trying to kill him while mine just frustrate me and are “virtual”.

I’ve been spending some time learning how to setup and manage Oracle Virtual Servers (OVS).  OVS provides the ability to setup up multiple logical or Virtual Machines (VM) on a single hardware platform.  These VM’s can be configured with different operating systems and have access to the physical hardware components including disk arrays, ethernet cards, memory, CPU cores and CD drives.  You can stop and start each VM as needed, particularly if you are limited by memory or processors.

This makes VM’s a popular choice for test environments where you want to set something up, test it and then shut it down for later use.  OVS is designed to provide the software to define and execute multiple VM’s and some client software to manage them remotely.

Underneath the covers OVS is built on the open-source Xen package which Oracle has taken and modified.  Though there are various GUI tools for using with Xen, Oracle provides a GUI tool, the Oracle Virtual Machine Manager (OVM), to configure and manage multiple VM’s.  OVM stores configuration information in a local XE Oracle database and runs in your IE or Firefox browser.

My goal was to take an Dell 2950 and install several Virtual Machines (VM) configured with Oracle Enterprise Linux 5.3.  I also wanted to setup a VM with the latest version of the 10gR2  database (10.2.0.4).

One of my challenges was that I didn’t have a second Linux “server” to act as the OVM so I had to use my laptop to “manage” the Virtual Machines and that required installing Linux or in my case, OEL5.3, in a VMWare environment on the laptop.  The high-level process involved the following steps:

1. Downloaded Oracle VM Server and created an installation CD

2. Booted the Dell using the VM Server CD and installed that on the Dell.

3. Downloaded VMWare to my laptop and setup a Virtual Machine for OEL5.3

4. Downloaded Oracle Enterprise Linux 5.3 and wrote it to five CD’s.  You can also download a DVD version which is what I also did.

5. Installed OEL5.3 in the VMWare VM on my laptop (which was already running Windows XP)

6. Booted OEL5.3 on my laptop and installed the Oracle Virtual Machine Manager (which includes the XE database)

At this point I had an Oracle VM server on the Dell and a way to manage it from my laptop using the Linux-based Virtual Machine Manager.

I was now ready to enter the “virtual frustration” zone…

2 Comments »