As the CentOS running at xen has a different kernel version (kernel-xen), the conversion is a bit tricky and involves some modifications along the procedure. During my research I didn’t find the solution for my problem within only a forum (they were several!) and so, I decided to make a post myself explaining my procedure.
1. Start the procedure by converting the CentOS from Xen to your VMWare server using VMWare converter. Due to some problems with the ssh keys when defining the hostname for the source machine, so it is better if you input the server IP and not the hostname;
My conversion was from Citrix Xen Server 5.6SP2/6.2 to VMWare ESXi 5.5, and, since it is a free version, it only allows me to edit the VM if it is converted to version 9 or bellow – otherwise I would need to use the VMWare web client (not available on free version, afaik).
So, at the conversion process, select version 9 as the destination VMWare VM version. Select the same VLAN for your interfaces as the VLAN you’re in at the VMWARE converter, to avoid network communication problems. Later, you’ll set up the right vlans.
2. With the conversion process done, log into your VMWare server with vSphere client.
If you are NOT running kernel-xen, jump to step 11.
3. Edit your VM Setting and load a live cd/dvd into your VM – the live CD/DVD must be reacheable (e.g: you can put it in your datastore). Be sure you checked “connect at power on”.
3.1 – The live CD/DVD didn’t work for me. Only the install DVD gave me the option that I needed (I’ve used the CentOS-6.4-x86_64-binDVD1.iso).
4. Boot your VM and press F2 to access the BIOS. I had to reset a few of times to get into the menu.. Here you must select the CD as first boot device. Save and reboot
5. Access the linux DVD through the “Rescue my system” / linux rescue menu. Next next next – at the network menu select dhcp or static for network config (what best suits you) and disable ipv6, you will need network connection at the next steps. This option will mount the system partition at /mnt/sysimage .
6. Within the rescue mode, chroot to the system partition, thought chroot /mnt/sysimage
7. Install the normal kernel version (yum install -y kernel kernel-devel)
8. Update the system packages (yum -y update)
8. Reboot and boot again on rescue mode. Execute rpm -qa \*xen\* and uninstall the remaining packages.
9. If necessary, execute “yum erase kernel-xen” or with yum remove kernel-xen. Beware, do not uninstall the current kernel.
10. Open /etc/sysconfig/kernel and check if you have this line: DEFAULTKERNEL=kernel instead of DEFAULTKERNEL=kernel-xen.
Outdated step, just in case: Go to /boot folder and update the initrd/initramfs with: mkinitrd -f -v –with=scsi_mod –with=sd_mod –with=mptbase –with=mptspi –with=mptsas –with=mptscsih /boot/initrd-YOUR-KERNEL-VERSION-FULL-NAME YOUR-KERNEL-VERSION-FULL-NAME
11.0 (FOR NON XEN KERNEL) When booting, press e at grub and edit the second line. Change console= xvc0 or console=hvc0 to console=tty0. Press b to boot
11.1 Edit /boot/grub.conf and change console= xvc0 or console=hvc0 to console=tty0
12. Execute rpm -qa \*xen\* and uninstall the remaining packages – such as xen tools, etc.
13. Do exit and reboot.
14. Try to boot from your local disk, and, supposedly, everything will be fine.. 😀
15. You can finally add a new interface (VMXnet) and install VMWare tools.
PS: I’m not sure about the kernel instalation – you may want to reboot after the kernel uninstall and boot again to the rescue mode to perform a clean kernel installation. If you have problems with that procedure, you can try booting in rescue mode and perform a yum reinstall kernel .