Monday Jan 13, 2014

Updated Oracle VM Hands-On-Labs

On official Oracle Technology Network site you can find updated Oracle VM Hands-On-Labs.

New items listed are:

New - How to Migrate to Oracle Linux and Oracle VM from RedHat Linux and VMWare

New - How to Deploy a Four-Node Oracle RAC 12c Cluster in Minutes Using Oracle VM Templates

Updated - Deploying and Managing a Private Cloud

You can run those labs at office or home using your own X86 machine by following the detailed updated documents.

Keep this page in your bookmarks if you would like to keep updated on Oracle VM technical articles.

Monday Sep 16, 2013

Oracle OpenWorld 2013 hands on labs: HOL9981, HOL9982 and HOL10003

oow2013

Oracle OpenWorld 2013 will  start in a few days. As every year, among the 2000+ sessions presented there will be many Hands on labs.

These labs are a unique opportunity to better understand several Oracle products (applications, database, middleware, OS, virtualization, ...). The idea of these labs is to enable 40 to 50 customers and partners to meet in a room and install/configure/use Oracle products on laptops during 1 or 2 hours, following detailed documentation and being helped by several Oracle experts.

Once again, thanks to Doan Nguyen (Principal product marketing director for Oracle VM), Olivier Canonge, Christophe Pauliat and I will run labs about Oracle VM for X86 virtualization.

This year, we were able to propose 3 labs. See details below.

HOL10003: Deploy and Manage a Private Cloud with Oracle VM and Oracle Enterprise Manager 12c

Date: Monday September 23, 3:15pm - 4:15pm
Location: Mariott Marquis Hotel, Room Nob Hill CD
Detailed documentation (PDF)

HOL9981: Best Practices for Migrating to Oracle VM and Oracle Linux from VMware and Red Hat

Date: Monday September 23, 1:45pm - 2:45pm
Location: Mariott Marquis Hotel, Room Nob Hill CD
Detailed documentation (PDF)

HOL9982: Oracle Real Application Clusters 12c: Deploying Four Nodes in Minutes with Oracle VM Templates

Date: Tuesday September 24, 5:15pm - 6:15pm
Location: Mariott Marquis Hotel, Room Nob Hill CD
Detailed documentation (PDF)

If you attend Oracle OpenWorld and are interested by Infrastructure Cloud or Virtualization, add those labs to your calendar using the Schedule Builder tool.

If you cannot be present, you can still run those labs at office or home using your own X86 machine by following the detailed documents.

Wednesday Sep 11, 2013

Script: Know which dom(0) hold a dom(u)

More than one time we would like to know on which physical server our guest resides without open a new connection to our Oracle VM Manager.

So I created a little script that interact with Oracle VM Manager 3 CLI and supply us this information automatically.

Requirements:

- expect installed

- Oracle VM Manager network reachable

Executing the script:

########################################################
 While executing on Oracle VM Guest:
 Use whohost.sh <Oracle VM Manager password> <Oracle VM Manager host>
 Example:
           whohost.sh Welcome1 ovm-mgr.oracle.local
########################################################
#####################################################################################
 If executed from a client and want to specify <guest id> or <guest name>:
 Use whohost.sh <Oracle VM Manager password> <Oracle VM Manager host> <guest vmid(uuid)>
 Example <guest id>:
           whohost.sh Welcome1 ovm-mgr.oracle.local id=0004fb00000600006e13bfb3507a2f29
 Use whohost.sh <Oracle VM Manager password> <Oracle VM Manager host> <guest name>

 Example <guest name>:            whohost.sh Welcome1 ovm-mgr.oracle.local name=vmdb01 #####################################################################################

This little bash script could be executed on a client ( laptop ) or directly on a guest; when executed on a linux guest

we can evaluate to leave out the guest vmid or guest name ( the script automatically picks up the uuid of the guest ).

Execution examples:

From a laptop ( simple client ):

[scoter@area51: ~]# ./whohost.sh Welcome1 srvovmm.oracle.local name=srvtestdb01.oracle.local
 Name = srvtestdb01.oracle.local
 Id = 0004fb0000060000d84a68991ef40c69
 Operating System = Microsoft Windows Server 2008
 Server = 00:14:5e:bc:a7:e8:00:14:5e:bc:a7:e8:00:0e:0c:b1  [srvovm04.oracle.local]

From an Oracle VM guest ( linux ):

 [root@srvlnx01 ~]# ./whohost.sh Welcome1 srvovmm.oracle.local
  Name = srvlnx01.oracle.local
  Id = 0004fb0000060000a8e1af6d58064b4f
  Operating System = Oracle Linux 5
  Server = 00:14:5e:bc:a7:e8:00:14:5e:bc:a7:e8:00:0e:0c:b1  [srvovm02.oracle.local]

Here you can find the little script.

I would like to thank you my colleague Jerome Anten for the collaboration on building up this little but handy script.

Corrections, comments and enhancements are welcome.

Simon Coter

Tuesday Sep 10, 2013

Configure Oracle VM Manager Guest Serial Console

Starting from Oracle VM release 3.2.1 a new button apparead on the guest dashboard.

This button, named "Launch Serial Console":


allows us to open the serial-console of our guest.

First time that I tried to use it I saw that I was not able to take advantage of it and I always received the following error:


 "The java telnet viewer is not installed on the manager server. Please contact your administrator to install the java telnet viewer on the manager".

Into the Oracle VM Manager log ( AdminServer.log ) we can see an error like this one:

####<Sep 10, 2013 4:42:44 PM CEST> <Info> <com.oracle.ovm.ras.servlet.DefaultTtyViewerJnlpServlet> <co701ovc.intranet.fw> <AdminServer> <[ACTIVE] ExecuteThread: '5' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <ebeb2dca554134bb:7f4e4f09:13f9f81e2e8:-8000-00000000004d100e> <1378824164483> <BEA-000000> <File /usr/lib/jta/classes/jta26.jar not found on the system or cannot be read >

 In this four steps you'll see how to correctly configure java-telnet-viewer on your Oracle VM Manager server:

1) download jta rpm ( java telnet ) from:

2) Enable serial-console on your linux guest.

NB: In this example will be reported changes done on an Oracle Linux 6 PVM guest machine. 

Further details on how-to enable guest serial console are available on MOS official document:

This document is related to Oracle VM 2.x version; regarding Oracle VM 3.x you have to modify 3 files on the guest:

# /boot/grub/grub.conf

# /etc/securetty

# /etc/inittab 

On Oracle VM 3.x manually modify "vm.cfg" file is not supported.

a. Edit grub.conf and append "console=hvc0" on the kernel line that will boot.

example:

kernel /vmlinuz-2.6.32-358.el6.x86_64 ro root=/dev/mapper/vg_vmdb01-lv_root rd_NO_LUKS rd_LVM_LV=vg_vmdb01/lv_root rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto rd_LVM_LV=vg_vmdb01/lv_swap  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM LANG=en_US.UTF-8 console=hvc0

b. Edit "/etc/inittab" file and add following line:

co:2345:respawn:/sbin/agetty hvc0 9600 vt100-nav

c. Edit "/etc/securetty" file and add an entry for hvc0 device:

console

...

.....

.......

hvc0

3) Reboot your guest by Oracle VM Manager.

4) Connect to Oracle VM Manager console and use the OracleVM Manager guest serial console:

Official documentation Oracle VM Server Serial Console for x86 is avaiable at following link:

http://docs.oracle.com/cd/E35328_01/E35330/html/vmiug-manager-install.html#idp1400448

Thanks to Avi and Honglin for their valuable support.

Comments and corrections are welcome.

Simon Coter 

Tuesday Jan 29, 2013

Oracle VM ocfs2 repositories: hot-extend in four easy steps!

Pay Attention: Starting from release 3.1.1 you can extend your repository by refreshing it in Oracle VM Manager.

 With release 3.1.1 or above, execute these two simple steps:

1.  refresh LUN containing the repository by "Storage" tab.

2.  refresh your repository

Official documentation: What's new in Oracle VM 3.1.1

Usually when our Oracle VM pool needs more disk space we create new repositories and then we proceed to create our new guests or we extend our virtual-disks.

Sometimes customers ask us to extend one repository instead of create a new one.

I would like to clarify that add one repository is always safer than extend an existing one; this blog post is purely demonstrative that "extend" is possible and it works; remember to take a full repository backup before to extend it.

This guide can be used on release 3.0.x. ( starting from release 3.1.1 extend repository by Oracle VM Manager is faster, safer and supported ).

In this example we will extend a repository of 250 GB to 300 GB. Here you'll find the four easy steps:

1. Extend the lun on the storage ( .... )

Identify the physical device to extend:

[root@ovm01 ~]# df -k /dev/mapper/3600143801259961a0000800001170000
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/mapper/3600143801259961a0000800001170000
                     262144000 235312128  26831872  90% /OVS/Repositories/0004fb0000030000480c7108c43bcaaa 

[root@ovm01 scripts]# multipath -ll /dev/mapper/3600143801259961a0000800001170000
3600143801259961a0000800001170000 dm-47 HP,HSV360
size=250G features='0' hwhandler='0' wp=rw
|-+- policy='round-robin 0' prio=1 status=active
| `- 2:0:0:29 sdhr 134:16  active ready running
|-+- policy='round-robin 0' prio=1 status=enabled
| `- 2:0:1:29 sdhs 134:32  active ready running
|-+- policy='round-robin 0' prio=1 status=enabled
| `- 2:0:2:29 sdht 134:48  active ready running
|-+- policy='round-robin 0' prio=1 status=enabled
| `- 2:0:3:29 sdhu 134:64  active ready running
|-+- policy='round-robin 0' prio=1 status=enabled
| `- 3:0:1:29 sdhw 134:96  active ready running
|-+- policy='round-robin 0' prio=1 status=enabled
| `- 3:0:0:29 sdhv 134:80  active ready running
|-+- policy='round-robin 0' prio=1 status=enabled
| `- 3:0:2:29 sdhx 134:112 active ready running
`-+- policy='round-robin 0' prio=1 status=enabled
  `- 3:0:3:29 sdhy 134:128 active ready running

By your storage admin tool ( also by Oracle VM plugin for your storage ) extend your physical device that hosts the repository.

2. Refresh physical size of your storage device 

A little code string that can help to prepare the job is:

# for i in `multipath -ll /dev/mapper/3600143801259961a0000800001170000| grep sd |sed -e 's:^..............::g' |awk '{print $1}'`; do echo "blockdev --rereadpt /dev/$i" ; done

You will get an output similar to that show below:

# blockdev --rereadpt /dev/sdhr
# blockdev --rereadpt /dev/sdhs 
# blockdev --rereadpt /dev/sdht 
# blockdev --rereadpt /dev/sdhu 
# blockdev --rereadpt /dev/sdhw 
# blockdev --rereadpt /dev/sdhv 
# blockdev --rereadpt /dev/sdhx 
# blockdev --rereadpt /dev/sdhy

Verify your output and check that the device paths are what you expect; after that execute it on your Oracle VM Server. 

Remember to execute this step on all your OracleVM Servers (OVS) that are part of your pool!!!

3. Refresh physical size of your multipath device

After refresh of all physical paths ( sd* in this case ) you have to refresh and verify the new size of the multipath-device; to accomplish this step execute the command above:

[root@ovm01 scripts]# multipathd -k"resize map 3600143801259961a0000800001170000"
ok


[root@ovmgv02 scripts]# multipath -ll /dev/mapper/3600143801259961a0000800001170000
3600143801259961a0000800001170000 dm-47 HP,HSV360
size=300G features='0' hwhandler='0' wp=rw
|-+- policy='round-robin 0' prio=1 status=active
| `- 2:0:0:29 sdhr 134:16  active ready running
|-+- policy='round-robin 0' prio=1 status=enabled
| `- 2:0:1:29 sdhs 134:32  active ready running
|-+- policy='round-robin 0' prio=1 status=enabled
| `- 2:0:2:29 sdht 134:48  active ready running
|-+- policy='round-robin 0' prio=1 status=enabled
| `- 2:0:3:29 sdhu 134:64  active ready running
|-+- policy='round-robin 0' prio=1 status=enabled
| `- 3:0:1:29 sdhw 134:96  active ready running
|-+- policy='round-robin 0' prio=1 status=enabled
| `- 3:0:0:29 sdhv 134:80  active ready running
|-+- policy='round-robin 0' prio=1 status=enabled
| `- 3:0:2:29 sdhx 134:112 active ready running
`-+- policy='round-robin 0' prio=1 status=enabled
  `- 3:0:3:29 sdhy 134:128 active ready running

Remember to execute this step on all your OracleVM Servers (OVS) that are part of your pool!!!

4. Verify actual repository size and extend the ocfs2 filesystem 

View actual repository size:
[root@ovm01 ~]# df -k /dev/mapper/3600143801259961a0000800001170000
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/mapper/3600143801259961a0000800001170000
262144000 235312128  26831872  90% /OVS/Repositories/0004fb0000030000480c7108c43bcaaa

Extend ocfs2 filesystem:
comment on "man" of tunefs.ocfs2:
option -S, --volume-size
Grow the size of the OCFS2 file system. If blocks-count is not specified, tunefs.ocfs2 extends the volume to the current size of the device.

So:
[root@ovm01 ~]# tunefs.ocfs2 -S /dev/mapper/3600143801259961a0000800001170000
NB: just run the command "tunefs.ocfs2" once, on one node part of the ocfs2 cluster.
View new repository size: 
[root@ovm01 ~]# df -k /dev/mapper/3600143801259961a0000800001170000
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/mapper/3600143801259961a0000800001170000
314572800 235315200  79257600  75% /OVS/Repositories/0004fb0000030000480c7108c43bcaaa
Refresh repository by OVM-Manager
By Oracle VM Manager refresh your repository to acknowledge the new repository size; here an example on Oracle VM Manager 3.2.1:

 

This article is dedicated to the person who keeps me up at night, little Joseph, my son, born January 9, 2013.

Comments and corrections are welcome.

Simon COTER 

Friday Dec 28, 2012

Workaround for bug 15878716 - Oracle VM Manager HTTPS connections fail with Microsoft Internet Explorer 7, 8, and 9

Please note that this bug is fixed with Oracle VM Manager 3.1.1.544 officialy released on December 10, 2012.

If your Oracle VM architecture is based on 3.1.1 release ignore this workaround and proceed patching your environment; you can download the patch here

The problem could be presented with this simple screenshot:

As you can see while connecting to Oracle VM Console with two different browsers achieves different results; Internet Explorer problem is due to a Microsoft fix that update the minimum certificate length ( so the problem is only on https ) to 1024 bits.

You can find all the details on this official Microsoft techsite.

Here you will find a step-by-step guide on how to modify the certificate of your Oracle VM Manager (Oracle Weblogic) creating a new > 1024 bits self-signed certificate; this workaound could be useful if you have an Oracle VM Manager 3.0.x installation while for OVM 3.1.1 you can install the patch reported above.

1. Generating certificate
[root@ovmm ~]# su - oracle
[oracle@ovmm ~]$ cd /u01/app/oracle/ovm-manager-3/
[oracle@ovmm ovm-manager-3]$ mkdir certificates
[oracle@ovmm ovm-manager-3]$ cd certificates/
[oracle@ovmm certificates]$ export JAVA_HOME=/u01/app/oracle/java
[oracle@ovmm certificates]$ export PATH=$JAVA_HOME/bin:$PATH
[oracle@ovmm certificates]$ keytool -genkey -alias selfsignedcert -keyalg RSA -keypass privatepassword -keystore identity.jks -storepass password -keysize 2048 -validity 3650
What is your first and last name?
  [Unknown]:  ovmm
What is the name of your organizational unit?
  [Unknown]:  Consulting
What is the name of your organization?
  [Unknown]:  Oracle
What is the name of your City or Locality?
  [Unknown]:  Milan  
What is the name of your State or Province?
  [Unknown]:  Milan
What is the two-letter country code for this unit?
  [Unknown]:  IT
Is CN=ovmm, OU=Consulting, O=Oracle, L=Milan, ST=Milan, C=IT correct?
  [no]:  yes

2. Export the certificate from the identity keystore into a file
[oracle@ovmm certificates]$ ls -ltr
total 8
-rw-r--r-- 1 oracle dba 1351 Dec 27 16:01 identity.jks
[oracle@ovmm certificates]$ keytool -export -alias selfsignedcert -file root.cer -keystore identity.jks
Enter keystore password:  
Certificate stored in file <root.cer>

3. Import the certificate you exported into trustovm.jks
[oracle@ovmm certificates]$ keytool -import -alias selfsignedcert -trustcacerts -file root.cer -keystore trustovm.jks
Enter keystore password:  
Re-enter new password: 
Owner: CN=ovmm, OU=Consulting, O=Oracle, L=Milan, ST=Milan, C=IT
Issuer: CN=ovmm, OU=Consulting, O=Oracle, L=Milan, ST=Milan, C=IT
Serial number: 50dce167
Valid from: Thu Dec 27 16:01:43 PST 2012 until: Sun Dec 25 16:01:43 PST 2022
Certificate fingerprints:
MD5:  04:46:F3:10:B7:4C:BF:A1:E3:BD:46:03:16:29:12:DE
SHA1: 3A:57:7C:D5:6D:F7:F0:4A:CC:59:E0:6C:91:2B:7E:66:F7:18:BC:1A
Signature algorithm name: SHA1withRSA
Version: 3
Trust this certificate? [no]:  yes
Certificate was added to keystore
[oracle@ovmm certificates]$ ls -l
total 24
-rw-r--r-- 1 oracle dba 1351 Dec 27 16:01 identity.jks
-rw-r--r-- 1 oracle dba  575 Dec 27 16:03 root.cer
-rw-r--r-- 1 oracle dba  646 Dec 27 16:07 trustovm.jks

4. Take a full cold Oracle VM Manager backup.
# service ovmm stop 

# stop your Oracle and/or MySql database 

# tar cvfz <your_backup_path>/ovmm_backup_full.tgz /u01 
5. (if needed) Temporarily enable Oracle VM Manager / Weblogic Console http access ( port 7001 ) and restart Oracle VM Manager.

Open Weblogic Server console at this URL:
https://<your_weblogic_ip_address>:7002/console
Go to Environment => Servers => AdminServer
Flag "Listen Port Enabled" for http connection on port 7001, then "Save" and "Activate Changes".

after that, restart your ovm-manager service:

# service ovmm stop
# service ovmm start

6. Add the new certificate by weblogic console.

Connect to your Oracle VM Manager Weblogic console:

http://<your_ip_address>:7001/console 

and login with user "weblogic" and its password. 

Go to Environment => Servers => Admin Server

Click on the left-size "Lock & Edit" button, Keystores tab => Change => select "Custom Identity and Custom Trust" and then "Save".

Fill in the fields with the following information:

Custom Identity Keystore: /u01/app/oracle/ovm-manager-3/certificates
Custom Identity Keystore Type: jks
Custom Identity Keystore Passphrase: password
Confirm Custom Identity Keystore Passphrase: password
Custom Trust Keystore: /u01/app/oracle/ovm-manager-3/certificates/trustovm.jks
Custom Trust Keystore Type: jks
Custom Trust Keystore Passphrase: password
Confirm Custom Trust Keystore Passphrase: password
Save configuration and click on activate changes ( on the left side )

On the SSL Tab, fill in the files with the following information:

Private Key Alias: selfsignedcert
Private Key Passphrase: privatepassword
Confirm Private Key Passphrase: privatepassword

Then Click "Save" and "Activate Changes"

7. Restart your Oracle VM Manager and (if needed) close http connection ( port 7001 )

Restart Oracle VM Manager and check that connection to port 7002 is available:

# service ovmm stop
# service ovmm start

Open Weblogic Server console at this URL:
https://<your_weblogic_ip_address>:7002/console
Go to Environment => Servers => AdminServer
Unflag "Listen Port Enabled" for http connection on port 7001, then "Save" and "Activate Changes" ( here we will close http connection )

Restart Oracle VM Manager and check that connection to port 7001 is not available while port 7002 (https) is correctly opened:

# service ovmm stop
# service ovmm start

[root@ovmm ~]# netstat -anp |grep 7001

[root@ovmm ~]# netstat -anp |grep 7002
tcp        0      0 128.0.0.100:7002            0.0.0.0:*                   LISTEN      6258/java           
tcp        0      0 127.0.0.1:7002              0.0.0.0:*                   LISTEN      6258/java           
tcp        0      0 192.168.56.100:7002         0.0.0.0:*                   LISTEN      6258/java           

Now you will be able (by accepting the self-signed certificate) to connect to your Oracle VM Manager on https port, both with Internet Explorer and other browsers:

Please Note that this bug is fixed with latest Oracle VM Manager 3.1.1 release ( 544 ) and will be also fixed with the new 3.2.1 release of the product. 

Comments and corrections are welcome. 

Simon COTER 

Monday Nov 05, 2012

Oracle Certification and virtualization Solutions.

As stated in official MOS ( My Oracle Support ) document 249212.1 support for Oracle products on non-Oracle VM platforms follow exactly the same stance as support for VMware and, so, the only x86 virtualization software solution certified for any Oracle product is "Oracle VM".

Based on the fact that:

  1. Oracle VM is totally free ( you have the option to buy Oracle-Support )
  2. Certified is pretty different from supported ( OracleVM is certified, others could be supported )
  3. With Oracle VM you may not require to reproduce your issue(s) on physical server
  4. Oracle VM is the only x86 software solution that allows hard-partitioning ***

*** see details to these Oracle public links:

http://www.oracle.com/technetwork/server-storage/vm/ovm-hardpart-168217.pdf

http://www.oracle.com/us/corporate/pricing/partitioning-070609.pdf

people started asking to migrate from third party virtualization software (ex. RH KVM, VMWare) to Oracle VM.

Migrating RH KVM guest to Oracle VM.

OracleVM has a built-in P2V utility ( Official Documentation ) but in some cases we can't use it, due to :

  • network inaccessibility between hypervisors ( KVM and OVM )
  • network slowness between hypervisors (KVM and OVM)
  • size of the guest virtual-disks

Here you'll find a step-by-step guide to "manually" migrate a guest machine from KVM to OVM.

1. Verify source guest characteristics.

Using KVM web console you can verify characteristics of the guest you need to migrate, such as:

  • CPU Cores details
  • Defined Memory ( RAM )
  • Name of your guest
  • Guest operating system


  • Disks details ( number and size )
  • Network details ( number of NICs and network configuration )


2. Export your guest in OVF / OVA format. 

The export from Redhat KVM ( kernel virtual machine ) will create a structured export of your guest:

[root@ovmserver1 mnt]# ll
total 12
drwxrwx--- 5 36 36 4096 Oct 19 2012 b8296fca-13c4-4841-a50f-773b5139fcee

b8296fca-13c4-4841-a50f-773b5139fcee is the ID of the guest exported from RH-KVM

[root@ovmserver1 mnt]# cd b8296fca-13c4-4841-a50f-773b5139fcee/
[root@ovmserver1 b8296fca-13c4-4841-a50f-773b5139fcee]# ls -ltr
total 12
drwxr-x--- 4 36 36 4096 Oct 19  2012 master
drwxrwx--- 2 36 36 4096 Oct 29  2012 dom_md
drwxrwx--- 4 36 36 4096 Oct 31  2012 images

images contains your virtual-disks exported

[root@ovmserver1 b8296fca-13c4-4841-a50f-773b5139fcee]# cd images/
[root@ovmserver1 images]# ls -ltra
total 16
drwxrwx--- 5 36 36 4096 Oct 19  2012 ..
drwxrwx--- 2 36 36 4096 Oct 31  2012 d4ef928d-6dc6-4743-b20d-568b424728a5
drwxrwx--- 2 36 36 4096 Oct 31  2012 4b241ea0-43aa-4f3b-ab7d-2fc633b491a1
drwxrwx--- 4 36 36 4096 Oct 31  2012 .
[root@ovmserver1 images]# cd d4ef928d-6dc6-4743-b20d-568b424728a5/
[root@ovmserver1 d4ef928d-6dc6-4743-b20d-568b424728a5]# ls -l
total 5169092
-rwxr----- 1 36 36 187904819200 Oct 31  2012 4c03b1cf-67cc-4af0-ad1e-529fd665dac1
-rw-rw---- 1 36 36          341 Oct 31  2012 4c03b1cf-67cc-4af0-ad1e-529fd665dac1.meta
[root@ovmserver1 d4ef928d-6dc6-4743-b20d-568b424728a5]# file 4c03b1cf-67cc-4af0-ad1e-529fd665dac1
4c03b1cf-67cc-4af0-ad1e-529fd665dac1: LVM2 (Linux Logical Volume Manager) , UUID: sZL1Ttpy0vNqykaPahEo3hK3lGhwspv

4c03b1cf-67cc-4af0-ad1e-529fd665dac1 is the first exported disk ( physical volume )

[root@ovmserver1 d4ef928d-6dc6-4743-b20d-568b424728a5]# cd ../4b241ea0-43aa-4f3b-ab7d-2fc633b491a1/
[root@ovmserver1 4b241ea0-43aa-4f3b-ab7d-2fc633b491a1]# ls -l
total 5568076
-rwxr----- 1 36 36 107374182400 Oct 31  2012 9020f2e1-7b8a-4641-8f80-749768cc237a
-rw-rw---- 1 36 36          341 Oct 31  2012 9020f2e1-7b8a-4641-8f80-749768cc237a.meta
[root@ovmserver1 4b241ea0-43aa-4f3b-ab7d-2fc633b491a1]# file 9020f2e1-7b8a-4641-8f80-749768cc237a
9020f2e1-7b8a-4641-8f80-749768cc237a: x86 boot sector; partition 1: ID=0x83, active, starthead 1, 
startsector 63, 401562 sectors; partition 2: ID=0x82, starthead 0, startsector 401625, 65529135 sectors; 
startsector 63, 401562 sectors; partition 2: ID=0x82, starthead 0, startsector 401625, 65529135 sectors; 
partition 3: ID=0x83, starthead 254, startsector 65930760, 8385930 sectors; partition 4: ID=0x5, 
starthead 254, startsector 74316690, 135395820 sectors, code offset 0x48

9020f2e1-7b8a-4641-8f80-749768cc237a is the second exported disk, with partition 1 bootable

3. Prepare the new guest on Oracle VM.

By Ovm-Manager we can prepare the guest where we will move the exported virtual-disks; under the Tab "Servers and VMs":

click on  and create your guest with parameters collected before (point 1):

- add NICs on different networks:

- add virtual-disks; in this case we add two disks of 1.0 GB each one; we will extend the virtual disk copying the source KVM virtual-disk ( see next steps )

- verify virtual-disks created ( under Repositories tab )

4. Verify OVM virtual-disks names.

[root@ovmserver1 VirtualMachines]# grep -r hyptest_rdbms *
0004fb0000060000a906b423f44da98e/vm.cfg:OVM_simple_name = 'hyptest_rdbms'
[root@ovmserver1 VirtualMachines]# cd 0004fb0000060000a906b423f44da98e
[root@ovmserver1 0004fb0000060000a906b423f44da98e]# more vm.cfg

vif = ['mac=00:21:f6:0f:3f:85,bridge=0004fb001089128', 'mac=00:21:f6:0f:3f:8e,bridge=0004fb00101971d'] OVM_simple_name = 'hyptest_rdbms' vnclisten = '127.0.0.1' disk = ['file:/OVS/Repositories/0004fb00000300004f17b7368139eb41/ VirtualDisks/0004fb000012000097c1bfea9834b17d.img,xvda,w', 'file:/OVS/Repositories/0004fb00000300004f17b7368139eb41/VirtualDisks/ 0004fb0000120000cde6a11c3cb1d0be.img,xvdb,w'] vncunused = '1' uuid = '0004fb00-0006-0000-a906-b423f44da98e' on_reboot = 'restart' cpu_weight = 27500 memory = 32768 cpu_cap = 0 maxvcpus = 8 OVM_high_availability = True maxmem = 32768 vnc = '1' OVM_description = '' on_poweroff = 'destroy' on_crash = 'restart' name = '0004fb0000060000a906b423f44da98e' guest_os_type = 'linux' builder = 'hvm' vcpus = 8 keymap = 'en-us' OVM_os_type = 'Oracle Linux 5' OVM_cpu_compat_group = '' OVM_domain_type = 'xen_hvm'

disk2 ovm ==> /OVS/Repositories/0004fb00000300004f17b7368139eb41/VirtualDisks/
0004fb0000120000cde6a11c3cb1d0be.img

disk1 ovm ==> /OVS/Repositories/0004fb00000300004f17b7368139eb41/VirtualDisks/
0004fb000012000097c1bfea9834b17d.img
 
        

Summarizing

disk1 --source ==> /mnt/b8296fca-13c4-4841-a50f-773b5139fcee/images/4b241ea0-43aa-4f3b-ab7d-2fc633b491a1/9020f2e1-7b8a-4641-8f80-749768cc237a

disk1 --dest ==> /OVS/Repositories/0004fb00000300004f17b7368139eb41/VirtualDisks/

0004fb000012000097c1bfea9834b17d.img

disk2 --source ==> /mnt/b8296fca-13c4-4841-a50f-773b5139fcee/images/d4ef928d-6dc6-4743-b20d-568b424728a5/4c03b1cf-67cc-4af0-ad1e-529fd665dac1

disk2 --dest ==> /OVS/Repositories/0004fb00000300004f17b7368139eb41/VirtualDisks/

0004fb0000120000cde6a11c3cb1d0be.img

5. Copy KVM exported virtual-disks to OVM virtual-disks.

Keeping your Oracle VM guest stopped you can copy KVM exported virtual-disks to OVM virtual-disks; what I did is only to locally mount the filesystem containing the exported virtual-disk ( by an usb device ) on my OVS; the copy automatically resize OVM virtual-disks ( previously created with a size of 1GB ) .

nohup cp /mnt/b8296fca-13c4-4841-a50f-773b5139fcee/images/4b241ea0-43aa-4f3b-ab7d-2fc633b491a1/9020f2e1-7b8a-4641-8f80-749768cc237a
/OVS/Repositories/0004fb00000300004f17b7368139eb41/VirtualDisks/
0004fb000012000097c1bfea9834b17d.img &

nohup cp /mnt/b8296fca-13c4-4841-a50f-773b5139fcee/images/d4ef928d-6dc6-4743-b20d-568b424728a5/4c03b1cf-67cc-4af0-ad1e-529fd665dac1
/OVS/Repositories/0004fb00000300004f17b7368139eb41/VirtualDisks/
0004fb0000120000cde6a11c3cb1d0be.img &

7. When copy completed refresh repository to aknowledge the new-disks size.


7. After "refresh repository" is completed, start guest machine by Oracle VM manager.

After the first start of your guest:

- verify that you can see all disks and partitions

- verify that your guest is network reachable ( MAC Address of your NICs changed )

Eventually you can also evaluate to convert your guest to PVM ( Paravirtualized virtual Machine ) following official Oracle documentation.


Simon COTER

ps: next-time I'd like to post an article reporting how to manually migrate Virtual-Iron guests to OracleVM. 

Comments and corrections are welcome. 

About

Simon Coter is a Technical Expert Core Technology consultant for Oracle. He works on projects covering more Oracle products such as Oracle Database, eBusiness Suite, Oracle VM, Oracle Linux, Oracle ExaData and much more.

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today