Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've seen plenty of posts outlining the process of converting VMware Linux serves to RHEL Xen (not xenserver) but nothing much has helped me go the other way. I've tried a number of things including using mkinitrd (works great for LVM) but just can't get it right in this situation. Truth be told, I'm a newb at xm commands but I've gained a lot of ground.

Does anyone care to share the process they've followed to successfully complete this conversion? I have access to two environments currently:

  1. the original xm environment that has two Doms in it
  2. a successful vmware build after running vmware converter that I can boot in rescue mode (but not boot otherwise).

I realize also that XM images aren't bootable and need to overcome this (again I've tried but must be missing a detail).

I'd like to experiment with setting up xm for the conversion before running vmware converter since I feel like I've exhausted the process from the standpoint of linux rescue mode after successfully bringing all data over via vmware converter. (but I'll go either way if I can just get a couple of helpful hints...)

share|improve this question
    
Can you update your tag to specify which of VMWare's many products you're discussing please. –  Chopper3 Mar 7 '11 at 20:37
    
@Chopper3 - I thought that the info in the title was good enough but now agree with you. I've updated the tags at your request. –  Patrick R Mar 8 '11 at 12:32
    
Although having ESXi in the title helps us fix your problem we search on tags and the general 'vmware' one really isn't valid sorry, thanks for fixing. –  Chopper3 Mar 8 '11 at 12:44

1 Answer 1

up vote 2 down vote accepted

I have recently had to migrate a few centos 5.x VMs across to an ESXi cluster. A couple of things were needed before the VMs would boot.

  • Firstly you will need to ensure the rescue CD can see the hardisks: if you cant see them when you do a fdisk -l then try updating the SCSI controller type to LSI logic SAS.

  • Once you are able to see the disk in the rescue environment allow it to mount all the system partitions read/write when it asks. You will also need a network connection to download packages, so assign details when it asks.

  • If the automatic mounting fails you will need to manually mount the / partition and edit the /etc/fstab. The entres will be something like:

    /dev/xvda2 / ext4 defaults 1 1 change the xvda2 to sda2 or whatever it is in your case.

  • reboot to check that the disks are mounted by the rescue CD. Chroot into the /mnt/sysimage folder edit /etc/inittab you should delete an entry that looks like:

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

    and ensure there is a correct entry such as:

    1:2345:respawn:/sbin/mingetty tty1 (sometimes this will need to be uncommented)

  • Now you can run a 'yum install kernel' and then create an initrd buy doing a:

    mkinitrd /boot/initrd-2.6.18-194.32.1.el5.img 2.6.18-194.32.1.el5

    replacing the 2.6.18-194.32.1.el5 with name of the kernel that you installed in the last step.

  • Now delete any xen related kernel entries in /etc/grub.conf leaving the newly added non-xen kernel and ensuring it is the default.

  • Exit the rescue environment and boot from hard-disk. With any luck the VM will boot as normal.

Its quite an long process and i might have missed something out, so id be interested in hearing how you get on.

share|improve this answer
    
looking forward to trying this. As I said, I've used mkinitrd but I did not attempt to install a kernel (kind of assumed I already had one - albeit a "broken" one. What VM environment did you migrate from? –  Patrick R Mar 8 '11 at 12:28
    
fanastic! The two steps I had left out where the yum install kernel command and the comment out of co:2345... Thank you, thank you, thank you. Up-voted and accepted as answer. –  Patrick R Mar 8 '11 at 13:43
    
Glad to hear this worked for you. I couldn't find this documented anywhere so it took quite a bit of figuring out! –  Will Mar 8 '11 at 17:55

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.