VMware Cloud Community
MaxBern
Contributor
Contributor

XenServer 5.6 - CentOS/RHEL (xen-kernel) VMS to ESXi 5.5

Well. My first question here, has anybody done a migration from XenServer 5.6 to ESXi?

I can run the converter fine, and I'll get a VM on the other side I know this won't boot as the VM is using the xen-kernel. The target machine I've been testing with I've installed the default kernel and then run the converter process. I'm trying to boot other side with the distro's .iso ( in this case centos 5.3 ) and repairing the grub configuration, however this is where I'm stuck.

I'll get a number of errors, however I think this is due to the way the disks operate. In Xen, these are IDE devices and the migration process configures these using a SAS Logic controller and some "magic stuff" happens converting my /dev/xvda to a /sda device.

My last attempts have got this at a kernel panic - "stuck.setuproot moving /dev failed" and then init dies.

As most people have figured out. There's tons of doco moving off ESXi to Xen, but not the other way around!

0 Kudos
2 Replies
patanassov
VMware Employee
VMware Employee

Hello

If you boot the regular, non paravirtual kernel, you should be able to do a normal conversion w/o manual reconfig afterwards.

Converter always creates SCSI disks on the destination machine, this will happen also if the source is a physical machine or a VMware VM with IDE disks, but this has not caused any problems AFAIK. The /dev/xvda is a Xen virtual device and it is expected to be changed to /dev/sda.

I'd rather guess the issue is with the specific SCSI controller - probably the source has no driver for LSI Logic SAS, but perhaps is has for LSI Logic or BusLogic? Try changing the controller in the wizard and retry the conversion; better - verify which modules the source has beforehand.

HTH

Plamen

0 Kudos
MaxBern
Contributor
Contributor

Hey,

Gave me a few ideas for this and I've got a VM from Xen running in my ESXi environment now! It's a juggling act for now, but it's once of so I'll deal with it for now.

For anyone out there, perhaps some of my quick notes might help others too.

My target machine was one of our Radius / DNS load balancer machines. It's running CentOS 5.3 and using the xen kernel. The steps I've taken to get a bootable machine running in ESXi as follows;

  • XEN Snapshot the existing machine so all our changes in the VM can be absolutely screwed around with and still have a safety net essentially.
  • Modify /etc/modprobe.conf to remove reference to ethX device from "xennet" and the "scsiadapter_xenblk" and added the following lines in;
    • alias eth0 e1000
    • alias scsi_hostadapter mptbase
    • alias scsi_hostadapter1 mptspi
    • alias scsi_hostadapter2 ata_piix
  • Install the new default kernel --
  • Edit the grub configuration and remove all references to the Xen Kernels.

Here I've kicked off my conversion with the standalone converter ( took 3 minutes! ) a few options to change was to ensure that the Ethernet device was set to E1000. Just about everything was configured as normal in this.

Now I've got a machine that wont boot in ESXi. As expected. Booting a CentOS image and chrooting to the system image I've made the following changes to get a bootable system.

  • Grub.conf > remove any garbage for xvc0 and I've added the 'noapic' flag in.
    • this fixes an issue where init dies booting
  • Checkout grub things > "grub-install /dev/sda1/ --recheck" as this will pick up the BIOS changes and boot devices to my understanding. From my question above. The conversion process has changed /dev/xvda to /sda a scsi device and so grub needs to be fixed.
  • install grub to the new location > "grub-install /dev/sda1"
  • Move the old initrd.img > mv /boot/initrd-xxxx.img initrd--xxxx.img.old
  • Build a new initrd image > "mkinitrd /boot/initrd-xxx.img 2.6.18-xxx-el5"
    • lots of forums and such with help on rebuilding this. Easy to search for!
  • Modify /etc/inittab -- There's a line similar to this "co:2345:respawn:/sbin/agetty xvc0 9600 vt100-nav" that needs to be modified to counter the ld "co" respawn and hangs on boot. Change the it to something such as;
    • co:2345:respawn:/sbin/agetty tty1 115200 vt100-nav

Following this, you should now have a booting and working system ( with CentOS 5.3 at least ). Install VMWare Tools and you'll be off!

Ensure you watch the new vm closely for a while and keep an eye on your logs too. My load balancer is working great at the moment, only for about 3 hours now and tested failover to its other node still running on Xen.

Pending all of this, I'll write some better doco and processes and gladly share it here. As anyone reading this will love any assistance going from Xen to ESXi who's never done it before and has limited knowledge of xen virtualisation.

MB.

0 Kudos