AWS Semi-automatic migration of Linux workloads with Non Default disk configration is not able to boot, conversion stuck at Configuring Operating System.

  • 7018743
  • 27-Mar-2017
  • 27-Mar-2017

Environment

NetIQ PlateSpin Migrate 12.2

Situation

AWS Semi-automatic migration of Linux workloads with Non Default disk configration is not able to boot, conversion stuck at Configuring Operating System.

Resolution

To resolve this issue you will need to rebuild the initrd(RAM Disk) by including xen-vbd drivers and it's dependent xen-platform-pci driver.
For Rebuilding initrd(RAM Disk) with Xen PV Drivers on the Migrated Target.

Source with following disk layout :

Disk 1 : /boot on Partition 1 , Swap on Partition 2
Disk 2 : / on Partitiotn 1


Prepare the Environment

1. Launch the PlateSpin Replication Environment 12.2 AMI
2. Detach the the Disks of the Migrated Target
3. Attach the Disk 1 as "sdf" on PlateSpin AMI
4. Attach the Disk 2 as "sdg" on PlateSpin AMI


Mount the Drives

Login to PlateSpin AMI and mount the attached disks, if required make the directories /mnt/rfs & /mnt/bts

#Switch to root user
mount /dev/xvdf1 /mnt/bts (Attach as sdf)
mount /dev/xvdg1 /mnt/rfs (Attach as sdg)


Unpack the initrd & Copy Drivers

#Change to the /boot partition.
cd /mnt/bts
mkdir NewRamDisk

# Find & Backup the generated initrd for e.g In RHEL 5.10 version
cp initrd-2.6.18-371.el5.img initrd-2.6.18-371.el5.img.bakup
cp initrd-2.6.18-371.el5.img NewRamDisk/initrd-2.6.18-371.el5.img

#Unzip

cd NewRamDisk
mv initrd-2.6.18-371.el5.img initrd-2.6.18-371.el5.gz
gunzip initrd-2.6.18-371.el5.gz
mkdir extracted

cd extracted/
cpio -idmv < /mnt/bts/NewRamDisk/initrd-2.6.18-371.el5

#Copy Drivers

cp /mnt/rfs/lib/modules/2.6.18-371.el5/kernel/drivers/xenpv_hvm/platform-pci/xen-platform-pci.ko lib/
cp /mnt/rfs/lib/modules/2.6.18-371.el5/kernel/drivers/xenpv_hvm/blkfront/xen-vbd.ko lib/
cp /mnt/rfs/lib/modules/2.6.18-371.el5/kernel/drivers/xenpv_hvm/balloon/xen-balloon.ko lib/
cp /mnt/rfs/lib/modules/2.6.18-371.el5/kernel/drivers/xenpv_hvm/netfront/xen-vnif.ko lib/

#Activate Drivers

#Open the init script
nano init

#Insert Following lines before the line " echo "Loading scsi_mod.ko module" "
echo "Loading xen-platform-pci.ko module"
insmod /lib/xen-platform-pci.ko
echo "Loading xen-vbd.ko module"
insmod /lib/xen-vbd.ko

#Insert Following lines before the line " echo Waiting for driver initialization."
echo "Loading xen-balloon.ko module"
insmod /lib/xen-ballon.ko
echo "Loading xen-vnif.ko module"
insmod /lib/xen-vnif.ko

# Save the file and exit nano.

Build the initrd with Drivers

cd /mnt/bts/NewRamDisk/extracted/
find . | cpio -H newc -o | gzip -9 > ../initrd-2.6.18-371.el5.gz

#Replace the initrd with the new one.
cp /mnt/bts/NewRamDisk/initrd-2.6.18-371.el5.gz /mnt/bts/initrd-2.6.18-371.el5.img


Exit and Start the Target Instance



cd $HOME
umount /mnt/bts
umount /mnt/rfs

#Detach the the Disks and attach it to the Migrated Target.
Disk 1 : Attach it as /dev/sda1
Disk 2 : Attach it as /dev/sdc

Cause

The storage driver(xen-vbd) is not part of the initrd(RAM Disk).