Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

XenServer Converting HVM to Parravirtualised

Posted on 2011-02-21
4
Medium Priority
?
1,541 Views
Last Modified: 2012-05-11
Hi everyone,

Recently I have been tasked with the daunting process of converting a setup of HVM enabled VMs (running on Citrix XenServer 5.6.0) into PV (paravirtualised) containers.

The constraints of the project was that:

1) The operating system must be functionally identical after the migration. 2) minimal modification to the operating system (with exception of kernel / drive mapping)

I also was allowed to change the bootloader(ie, grub) in what ever way I see fit.

However, I have attempted this, I will firstly like to show you my steps I took.

This at the moment is CentOS5.5 specific:

---Steps:

1) yum install kernel-xen

This installed: 2.6.18-194.32.1.el5xen

2) edited: /boot/grub/menu.lst changed my specs to match:

title CentOS (2.6.18-194.32.1.el5xen)

root (hd0,0)

kernel /vmlinuz-2.6.18-194.32.1.el5xen ro root=/dev/VolGroup00/LogVol00 console=xvc0

initrd /initrd-2.6.18-194.32.1.el5xen.img

Then I changed my xenserver parameters to match:

xe vm-param-set uuid=[vm uuid] PV-bootloader-args="--kernel /vmlinuz-2.6.18-194.32.1.el5xen --ramdisk /initrd-2.6.18-194.32.1.el5xen.img"

xe vm-param-set uuid=[vm uuid] HVM-boot-policy=""

xe vm-param-set uuid=[vm uuid] PV-bootloader=pygrub

xe vbd-param-set uuid==[Virtual Block Device/VBD uuid] bootable=true

Some things to note, I am running a VolGroup LVM ;)

Anyways, after all these steps (which aren't much!) I boot the VM and it boots initial kernel just fine, however I am presented with this error:

-----------------BOOT SCREEN-------------------
device-mapper: dm-raid45: initialized v0.2594l

Waiting for driver initialization.

Scanning and configuring dmraid supported devices

Scanning logical volumes

Reading all physical volumes. This may take a while...

Activating logical volumes

Volume group "VolGroup00" not found

Creating root device.

Mounting root filesystem.

mount: could not find filesystem '/dev/root'

Setting up other filesystems.

Setting up new root fs

setuproot: moving /dev failed: No such file or directory

no fstab.sys, mounting internal defaults

setuproot: error mounting /proc: No such file or directory

setuproot: error mounting /sys: No such file or directory

Switching to new root and running init.

unmounting old /dev

unmounting old /proc

unmounting old /sys

switchroot: mount failed: No such file or directory

-----------/ENDBOOT-----------------

Now my hints are that it cannot detect / because of the fact that when you change from HVM mode to PV it does something (not that obvious)

When you make a SR (storage) on a HVM, you get it mounted to the guest os as /dev/hda.

However in PV mode, this presents itself as /dev/xvda...

Could this be the answer? and if so, how the heck to I implement it??

I am truly stumped at this point :)

--Karl.
0
Comment
Question by:crucial_paradigm
  • 4
4 Comments
 
LVL 1

Author Comment

by:crucial_paradigm
ID: 34949898
Update: so I have gotten a bit further in my quest, as it now detects the LVM's...

To do this, I required to recompile the xen-kernel initrd image.

Command: mkinitrd -v --builtin=xen_vbd --preload=xenblk initrd-2.6.18-194.32.1.el5xen.img 2.6.18-194.32.1.el5xen

Now when I boot I get this:

-------------------------BOOT-------------------

Loading dm-raid45.ko module

device-mapper: dm-raid45: initialized v0.2594l

Scanning and configuring dmraid supported devices

Scanning logical volumes

Reading all physical volumes. This may take a while...

Found volume group "VolGroup00" using metadata type lvm2

Activating logical volumes

3 logical volume(s) in volume group "VolGroup00" now active

Creating root device.

Mounting root filesystem.

mount: error mounting /dev/root on /sysroot as ext3: Device or resource busy

Setting up other filesystems.

Setting up new root fs

setuproot: moving /dev failed: No such file or directory

no fstab.sys, mounting internal defaults

setuproot: error mounting /proc: No such file or directory

setuproot: error mounting /sys: No such file or directory

Switching to new root and running init.

unmounting old /dev

unmounting old /proc

unmounting old /sys

switchroot: mount failed: No such file or directory

Kernel panic - not syncing: Attempted to kill init!

Anyone have any thoughts on this?? nudge nudge??

--Karl.
0
 
LVL 1

Author Comment

by:crucial_paradigm
ID: 34957003
Gathering no one wants to answer this?
0
 
LVL 1

Accepted Solution

by:
crucial_paradigm earned 0 total points
ID: 35090050
Shame no one answered this. closing this as I have now worked it out.
0
 
LVL 1

Author Closing Comment

by:crucial_paradigm
ID: 35090051
No one answered.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Veeam Backup & Replication has added a new integration – Veeam Backup for Microsoft Office 365.  In this blog, we will discuss how you can benefit from Office 365 email backup with the Veeam’s new product and try to shed some light on the needs and …
If you need to complete a Physical to Virtual (P2V), Virtual to Virtual (V2V) conversion to a VMware product (VMware Workstation, Player or VMware vSphere (ESXi) ) for FREE, then there is some good news...
How to install and configure Citrix XenApp 6.5 - Part 1. In this video tutorial we have explained step by step installation of Citrix XenApp 6.5 Server on Windows Server 2008 R2 is explained in this video. We have explained the difference between…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question