Migrating Virtual Iron guest to Oracle VM 3.x

Posted by scoter on Oracle Blogs See other posts from Oracle Blogs or by scoter
Published on Sat, 15 Dec 2012 22:22:06 +0000 Indexed on 2012/12/15 23:12 UTC
Read the original article Hit count: 286

Filed under:

As stated on the official site, Oracle in 2009, acquired a provider of server virtualization management software named Virtual Iron; you can find all the acquisition details at this link.

Into the FAQ on the official site you can also view that, for the future, Oracle plans to fully integrate Virtual Iron technology into Oracle VM products, and any enhancements will be delivered as a part of the combined solution; this is what is going on with Oracle VM 3.x.

So, customers started asking us to migrate Virtual Iron guests to Oracle VM.

IMPORTANT: This procedure needs a dedicated OVM-Server with no-guests running on top; be careful while execute this procedure on production environments.

In these little steps you will find how-to migrate, as fast as possible, your guests between VI ( Virtual Iron ) and Oracle VM; keep in mind that OracleVM has a built-in P2V utility ( Official Documentation )  that you can use to migrate guests between VI and Oracle VM.

Concepts: VI repositories. 

On VI we have the same "repository" concept as in Oracle VM; the difference between these two products is that VI use a raw-lun as repository ( instead of using ocfs2 and its capabilities, like ref-links ).

The VI "raw-lun" repository, with a pure operating-system perspective, may be presented as in this picture:

Infact on this "raw-lun" VI create an LVM2 volume-group.

The VI "raw-lun" repository, with an hypervisor perspective, may be presented as in this picture:

So, the relationships are:

  • LVM2-Volume-Group <-> VI Repository
  • LVM2-Logical-Volume <-> VI guest virtual-disk

The first step is to present the VI repository ( raw-lun ) to your dedicated OVM-Server.

Prepare dedicated OVM-Server

On the OVM-Server ( OVS ) you need to discover new lun and, after that, discover volume-group and logical-volumes containted in VI repository; due to default OVS configuration you need to edit lvm2 configuration file:

/etc/lvm/lvm.conf

    # By default for OVS we restrict every block device:
    # filter = [ "r/.*/" ]

and comment the line starting with "filter" as above.

Now you have to discover the raw-lun presented and, next, activate volume-group and logical-volumes:

#!/bin/bash
for HOST in `ls /sys/class/scsi_host`;do echo '- - -' > /sys/class/scsi_host/$HOST/scan; done
CPATH=`pwd`
cd /dev
for DEVICE in `ls sd[a-z] sd?[a-z]`;do echo '1' > /sys/block/$DEVICE/device/rescan; done
cd $CPATH
cd /dev/mapper
for PARTITION in `ls *[a-z] *?[a-z]`;do partprobe /dev/mapper/$PARTITION; done
cd $CPATH
vgchange -a y

After that you will see a new device:

[root@ovs01 ~]# cd /dev/6000F4B00000000000210135bef64994

[root@ovs01 6000F4B00000000000210135bef64994]# ls -l 6000F4B0000000000061013* lrwxrwxrwx 1 root root 77 Oct 29 10:50 6000F4B00000000000610135c3a0b8cb ->

/dev/mapper/6000F4B00000000000210135bef64994-6000F4B00000000000610135c3a0b8cb

By your OVM-Manager create a guest server with the same definition as on VI:

  • same core number as VI source guest
  • same memory as VI source guest
  • same number of disks as VI source guest ( you can create OVS virtual disk with a small size of 1GB because the "clone" will, eventually, extend the size of your new virtual disks )

Summarizing:

source-virtual-disk path ( VI ):

/dev/mapper/6000F4B00000000000210135bef64994-6000F4B00000000000610135c3a0b8cb

dest-virtual-disk path ( OVS ):

/OVS/Repositories/0004fb00000300006cfeb81c12f12f00/VirtualDisks/0004fb000012000055e0fc4c5c8a35ee.img **

** = to identify your virtual disk you have verify its name under the "vm.cfg" file of your new guest.

Clone VI virtual-disk to OVS virtual-disk
dd if=/dev/mapper/6000F4B00000000000210135bef64994-6000F4B00000000000610135c3a0b8cb 
of=/OVS/Repositories/0004fb00000300006cfeb81c12f12f00/VirtualDisks/0004fb000012000055e0fc4c5c8a35ee.img

Clean unsupported parameters and changes on OVS.

1. Restore original /etc/lvm/lvm.conf

    # By default for OVS we restrict every block device:
      filter = [ "r/.*/" ]

    and uncomment the line starting with "filter" as above.

2. Force-stop lvm2-monitor service

 # service lvm2-monitor force-stop 

3. Restore original /etc/lvm directories ( archive, backup and cache )

 # cd /etc/lvm

 # rm -fr archive backup cache; mkdir archive backup cache

4. Reboot OVS

Refresh OVS repository and start your guest.

By OracleVM Manager refresh your repository:

By OracleVM Manager start your "migrated" guest:

 

Comments and corrections are welcome. 

Simon COTER 

© Oracle Blogs or respective owner

Related posts about /Oracle