Clone a RAC VM environment

Overview

  • VirtualBox Upgrade from 4.2.14 to 4.3.12 ( both host runs Windows 7 )
  • Copy vdi fie to new host
  •  Note copying vbox file didn’t work for me – lot of problem
  • It seems different VBOX version are using a different XML descriptions for Network adapters, …

Cloning disks and change UDEV description

  • Note if you change you Virtualbox version you need to reload Guest Additions package
Cloning disks and change UDEV description

E:\VM_HOME\GRAC11204>  vboxmanage clonehd grac41.vdi E:\VM_HOME\GRAC11204X\grac41X.vdi
E:\VM_HOME\GRAC11204>  vboxmanage clonehd grac42.vdi E:\VM_HOME\GRAC11204X\grac42X.vdi
E:\VM_HOME\GRAC11204>  vboxmanage clonehd grac43.vdi E:\VM_HOME\GRAC11204X\grac43X.vdi

Use --variant Fixed to copy ASM disks ! 
C:\vm_home\GRAC11204>  vboxmanage clonehd ocr_11204_2G_disk1.vdi C:\vm_home\GRAC11204X\ocr_11204_2G_disk1_X.vdi --variant Fixed
C:\vm_home\GRAC11204>  vboxmanage clonehd ocr_11204_2G_disk2.vdi C:\vm_home\GRAC11204X\ocr_11204_2G_disk2_X.vdi --variant Fixed
C:\vm_home\GRAC11204>  vboxmanage clonehd ocr_11204_2G_disk3.vdi C:\vm_home\GRAC11204X\ocr_11204_2G_disk3_X.vdi  --variant Fixed

C:\vm_home\GRAC11204>  vboxmanage clonehd data_11204_10G_disk1.vdi C:\vm_home\GRAC11204X\data_11204_10G_disk1_X.vdi --variant Fixed
C:\vm_home\GRAC11204>  vboxmanage clonehd data_11204_10G_disk2.vdi C:\vm_home\GRAC11204X\data_11204_10G_disk2_X.vdi --variant Fixed 
C:\vm_home\GRAC11204>  vboxmanage clonehd data_11204_10G_disk3.vdi C:\vm_home\GRAC11204X\data_11204_10G_disk3_X.vdi --variant Fixed 
C:\vm_home\GRAC11204>  vboxmanage clonehd data_11204_10G_disk4.vdi C:\vm_home\GRAC11204X\data_11204_10G_disk4_X.vdi --variant Fixed

C:\vm_home\GRAC11204>  vboxmanage clonehd fra_11204_20G_disk1.vdi  C:\vm_home\GRAC11204X\fra_11204_20G_disk1_X.vdi --variant Fixed
C:\vm_home\GRAC11204>  vboxmanage clonehd fra_11204_20G_disk2.vdi  C:\vm_home\GRAC11204X\fra_11204_20G_disk2_X.vdi --variant Fixed

C:\vm_home\GRAC11204>  vboxmanage clonehd test_11204_1G_disk1.vdi C:\vm_home\GRAC11204X\test_11204_1G_disk1_X.vdi --variant Fixed
C:\vm_home\GRAC11204>  vboxmanage clonehd test_11204_1G_disk2.vdi C:\vm_home\GRAC11204X\test_11204_1G_disk2_X.vdi --variant Fixed

Change HD type to sharable
C:\vm_home\GRAC11204X> VBoxManage modifyhd test_11204_1G_disk1_X.vdi --type shareable
C:\vm_home\GRAC11204X> VBoxManage modifyhd test_11204_1G_disk2_X.vdi  --type shareable

C:\vm_home\GRAC11204X> VBoxManage modifyhd ocr_11204_2G_disk1_X.vdi --type shareable
C:\vm_home\GRAC11204X> VBoxManage modifyhd ocr_11204_2G_disk2_X.vdi --type shareable
C:\vm_home\GRAC11204X> VBoxManage modifyhd ocr_11204_2G_disk3_X.vdi --type shareable

C:\vm_home\GRAC11204X> VBoxManage modifyhd data_11204_10G_disk1_X.vdi  --type shareable
C:\vm_home\GRAC11204X> VBoxManage modifyhd data_11204_10G_disk1_X.vdi  --type shareable
C:\vm_home\GRAC11204X> VBoxManage modifyhd data_11204_10G_disk1_X.vdi  --type shareable

C:\vm_home\GRAC11204X> VBoxManage modifyhd fra_11204_20G_disk1_X.vdi  --type shareable
C:\vm_home\GRAC11204X> VBoxManage modifyhd fra_11204_20G_disk2_X.vdi  --type shareable
--> Create new VM and attach the shared disk by using Virtualbox GUI

Retrieve new UUIDs for our newly create VM 
C:\vm_home\GRAC11204X> VBoxManage showvminfo grac41X
Name:            grac41X
Groups:          /
Guest OS:        Other Linux (64-bit)
UUID:            379da761-42a0-4efb-8996-359de0f34d9e
Config file:     E:\VM_HOME\GRAC11204X\grac41X\grac41X.vbox
Snapshot folder: E:\VM_HOME\GRAC11204X\grac41X\Snapshots
Log folder:      E:\VM_HOME\GRAC11204X\grac41X\Logs
Hardware UUID:   379da761-42a0-4efb-8996-359de0f34d9e
..
SATA (0, 0): E:\VM_HOME\GRAC11204X\grac41X.vdi (UUID: 6cba3305-aae1-4a87-a6cf-f7e49bae4122)
SATA (1, 0): C:\vm_home\GRAC11204X\ocr_11204_2G_disk1_X.vdi (UUID: 6e743d07-2603-4b2b-820f-1b2e46954e4d)
SATA (2, 0): C:\vm_home\GRAC11204X\ocr_11204_2G_disk2_X.vdi (UUID: 61d693cc-71a1-4dcd-991f-739f6eed5c66)
SATA (3, 0): C:\vm_home\GRAC11204X\ocr_11204_2G_disk3_X.vdi (UUID: feb27a66-fdd3-4703-9c6e-2d51ff05fc6d)
SATA (4, 0): C:\vm_home\GRAC11204X\test_11204_1G_disk1_X.vdi (UUID: d2fc0bad-e49d-44c8-bb52-c668070aaaf2)
SATA (5, 0): C:\vm_home\GRAC11204X\test_11204_1G_disk2_X.vdi (UUID: 76d7bd6c-339a-45fe-ba40-02102da62598)
SATA (6, 0): C:\vm_home\GRAC11204X\data_11204_10G_disk1_X.vdi (UUID: 3887a91d-37b0-42bf-bbd5-c92df7e248f8)
SATA (7, 0): C:\vm_home\GRAC11204X\data_11204_10G_disk2_X.vdi (UUID: 3f5f2583-629d-4f1b-9984-d6909dc925e3)
SATA (8, 0): C:\vm_home\GRAC11204X\data_11204_10G_disk3_X.vdi (UUID: ec4d36e3-5fae-4c68-af3c-75fdf940edd8)
SATA (9, 0): C:\vm_home\GRAC11204X\data_11204_10G_disk4_X.vdi (UUID: 9cec9e24-29a0-4363-aa6a-ba2e0ce41999)
SATA (10, 0): C:\vm_home\GRAC11204X\fra_11204_20G_disk1_X.vdi (UUID: dfd86188-bd59-474b-a564-be040260ba9b)
SATA (11, 0): C:\vm_home\GRAC11204X\fra_11204_20G_disk2_X.vdi (UUID: 7d06ebe0-c641-40c5-8980-d45076bdef49)

[root@grac41 ~]# ./check_uuid.sh
..
/dev/sdk  WWID:   1ATA_VBOX_HARDDISK_VBdfd86188-9bba6002
/dev/sdk1  WWID:   1ATA_VBOX_HARDDISK_VBdfd86188-9bba6002
/dev/sdl  WWID:   1ATA_VBOX_HARDDISK_VB7d06ebe0-49efbd76
/dev/sdl1  WWID:   1ATA_VBOX_HARDDISK_VB7d06ebe0-49efbd76

-->  Change udev file and and restart UDEV (  1ATA_VBOX_HARDDISK_VBdfd86188-9bba6002)  a

[root@grac41 ~]# ./start_udev.sh 
Starting udev:                                             [  OK  ]
brw-rw----. 1 grid asmadmin 8, 161 Jul 20 11:31 /dev/asmdisk_fra1
brw-rw----. 1 grid asmadmin 8, 177 Jul 20 11:31 /dev/asmdisk_fra2
...
Verify ASMD disk header:
[root@grac41 ~]#  kfed read  /dev/asmdisk_fra1  | egrep 'type|name'
kfbh.type:                            1 ; 0x002: KFBTYP_DISKHEAD
kfdhdb.dskname:               FRA2_0000 ; 0x028: length=9
kfdhdb.grpname:                    FRA2 ; 0x048: length=4
kfdhdb.fgname:                FRA2_0000 ; 0x068: length=9
kfdhdb.capname:                         ; 0x088: length=0
[root@grac41 ~]# kfed read  /dev/asmdisk_fra2  | egrep 'type|name'
kfbh.type:                            1 ; 0x002: KFBTYP_DISKHEAD
kfdhdb.dskname:               FRA2_0001 ; 0x028: length=9
kfdhdb.grpname:                    FRA2 ; 0x048: length=4
kfdhdb.fgname:                FRA2_0001 ; 0x068: length=9
kfdhdb.capname:                         ; 0x088: length=0
--> Redistribute 99-oracle-asmdevices.rules to grac42 and grac43

Setup new System and recreate Network devices

Create new VM with the related VDI file ( like grac41.vdi, grac42.vdi, ... )
Change memory size to around 3.5 GBytes
Add 4 network devices 
 1. NAT
 2. Internal Network
 3. Internal Network
 4. Internal Network
Add shared folder - like e:\Kits
-- > Boot new VM a first time

Enable composite key like :   | @  by using Right AL 
 Note: AltGr key doens't work for German Keybord out of the box   
   System -> Preferences - Keyboard -> Keyboard Layout Options -> Key to choose 3rd level - > Any ALT Key

Re-configure Guest Additions 
[root@grac41 Desktop]# lsmod  | grep vbox
vboxvideo               2107  1 
drm                   274036  2 vboxvideo
vboxsf                 37838  1 
vboxguest             249857  7 vboxsf

[root@grac41 Desktop]# modinfo vboxguest
filename:       /lib/modules/3.8.13-35.1.2.el6uek.x86_64/misc/vboxguest.ko
version:        4.2.14
license:        GPL
description:    Oracle VM VirtualBox Guest Additions for Linux Module
author:         Oracle Corporation
srcversion:     EEECE4FA11B9B50457A8148
alias:          pci:v000080EEd0000CAFEsv00000000sd00000000bc*sc*i*
depends:        
vermagic:       3.8.13-35.1.2.el6uek.x86_64 SMP mod_unload modversions 
--> Guest Addition uses old version !!

Install new Guest Additons
Mount CD :   /media/VBOXADDITIONS_4.3.12_93733 
[root@grac41 Desktop]# cd  /media/VBOXADDITIONS_4.3.12_93733 
[root@grac41 VBOXADDITIONS_4.3.12_93733]# ./VBoxLinuxAdditions.run install
Verifying archive integrity... All good.
Uncompressing VirtualBox 4.3.12 Guest Additions for Linux............
VirtualBox Guest Additions installer
Removing installed version 4.2.14 of VirtualBox Guest Additions...
Copying additional installer modules ...
Installing additional modules ...
Removing existing VirtualBox non-DKMS kernel modules       [  OK  ]
Building the VirtualBox Guest Additions kernel modules
Building the main Guest Additions module                   [  OK  ]
Building the shared folder support module                  [  OK  ]
Building the OpenGL support module                         [  OK  ]
Doing non-kernel setup of the Guest Additions              [  OK  ]
You should restart your guest to make sure the new modules are actually used
Installing the Window System drivers
Installing X.Org Server 1.13 modules                       [  OK  ]
Setting up the Window System to use the Guest Additions    [  OK  ]
You may need to restart the hal service and the Window System (or just restart
the guest system) to enable the Guest Additions.
Installing graphics libraries and desktop services componen[  OK  ]

Enable Drag n Drop and Clipboard support 

Remove files
[root@grac41 rules.d]# rm  /etc/udev/rules.d/70-persistent-net.rules

--> reboot system

Check Virtualbox version after reboot
[root@grac41 Desktop]#  modinfo vboxguest
filename:       /lib/modules/3.8.13-35.1.2.el6uek.x86_64/misc/vboxguest.ko
version:        4.3.12

Configure  network
[root@grac41 Desktop]# ifconfig | grep eth
eth0      Link encap:Ethernet  HWaddr 08:00:27:80:B1:15  
eth1      Link encap:Ethernet  HWaddr 08:00:27:74:37:E7  
eth2      Link encap:Ethernet  HWaddr 08:00:27:3E:75:95  
eth3      Link encap:Ethernet  HWaddr 08:00:27:5B:62:89  

For ifcfg-eth0 , ifcfg-eth1, ifcfg-eth2, ifcfg-eth3 in  /etc/sysconfig/network-scripts
 - delete UUID entry : UUID=e86e9644-775b-41c1-9504-a0a1cc6d5408
 - Change HWADDR the address from ifconfig command :   HWADDR=08:00:27:5B:62:89

Restart network and verify configuration
[root@grac41 Desktop]# service network restart
[root@grac41 Desktop]# ifconfig  | egrep 'eth|inet addr'
eth0      Link encap:Ethernet  HWaddr 08:00:27:80:B1:15  
          inet addr:10.0.2.15  Bcast:10.0.2.255  Mask:255.255.255.0
eth1      Link encap:Ethernet  HWaddr 08:00:27:74:37:E7  
          inet addr:192.168.1.101  Bcast:192.168.1.255  Mask:255.255.255.0
eth2      Link encap:Ethernet  HWaddr 08:00:27:3E:75:95  
          inet addr:192.168.2.101  Bcast:192.168.2.255  Mask:255.255.255.0
eth3      Link encap:Ethernet  HWaddr 08:00:27:5B:62:89  
          inet addr:192.168.3.101  Bcast:192.168.3.255  Mask:255.255.255.0

--> Now you can add shared devices and restart your RAC database ! 

 

Leave a Reply

Your email address will not be published. Required fields are marked *