How to migrate OpenVZ to KVM/VMWare

0

To migrate your OpenVZ digital server to a KVM/VMWARE simply comply with these steps:

  • First factor you do is to install a KVM machine with the identical working system.  Preferably  the identical level revision too!
  • Now logon to your OpenVZ field and run
yum install mingetty
  • This will install a load of dependencies –  they’re all required and supply the core features to allow your machine to boot efficiently!
  • Edit the file /and so forth/inittab and add within the following:
# Run gettys in commonplace runlevels
B:2345:respawn:/sbin/mingetty tty1
P:2345:respawn:/sbin/mingetty tty2
O:2345:respawn:/sbin/mingetty tty3
A:2345:respawn:/sbin/mingetty tty4
H:2345:respawn:/sbin/mingetty tty5
S:2345:respawn:/sbin/mingetty tty6

This will allow the machine to truly get a logon immediate!

  1. Now.. sync the OpenVZ field to the brand new field
rsync –exclude=/and so forth/fstab –exclude=/boot –exclude=/proc –exclude=/lib/modules/ –exclude=/and so forth/udev –exclude=/lib/udev –exclude=/sys -e ssh –delete –numeric-ids -avpogtStlHz / [email protected]:/

This will copy each factor from the previous field to the brand new field, however will exclude the kernel information that you’ll want to boot the machine!  Trust me.. it really works!

  1. Power down your OpenVZ Box
  2. Reboot and begin your KVM field.

This course of has labored for me just about each time when migrating Centos H and Centos S.  I am fairly sure that the identical primary concept will work with different distros.