How to migrate from OpenVZ VPS to KVM Cloud Server Print

  • 4

If you are currently on OpenVZ-based VPS and wanted to migrate your server to our KVM Cloud Server, here the basic steps. These steps are not exclusive, there are many other methods you can use to migrate between these virtualization technology.

Steps:

a. Make sure both server are exact same OS and updated to latest release.

b. Login to both of the servers and run "yum install mingetty"

c. Open your favourite text editor and edit /etc/inittab and make entry / modify as per following:

1:2345:respawn:/sbin/mingetty tty1
2:2345:respawn:/sbin/mingetty tty2
3:2345:respawn:/sbin/mingetty tty3
4:2345:respawn:/sbin/mingetty tty4
5:2345:respawn:/sbin/mingetty tty5
6:2345:respawn:/sbin/mingetty tty6

d. Install rsync on both servers by run "yum install rsync"

e. Create an exclude file /tmp/exclude.txt with and customize based on your own needs. Typically following listed in the exclude file:

/boot
/proc
/sys
/tmp
/dev
/var/lock
/etc/fstab
/etc/mtab
/etc/resolv.conf
/etc/conf.d/net
/etc/network/interfaces
/etc/networks
/etc/sysconfig/network*
/etc/sysconfig/hwconf
/etc/sysconfig/ip6tables-config
/etc/sysconfig/kernel
/etc/hostname
/etc/HOSTNAME
/etc/hosts
/etc/modprobe*
/etc/modules
/net
/lib/modules
/etc/rc.conf
/usr/share/nova-agent*
/usr/sbin/nova-agent*
/etc/init.d/nova-agent*
/etc/ips
/etc/ipaddrpool
/etc/ips.dnsmaster
/etc/resolv.conf
/etc/sysconfig/network-scripts/ifcfg-eth0

f. Run following in your OpenVZ-based server:

rsync --exclude-from="/tmp/exclude.txt" --delete --numeric-ids -avpogtStlHz -e "ssh -p <ssh port>" / root@<KVM server ip>:/

g. Once done, reboot the KVM Cloud Server. Check everything work fine and your server content synced.


Was this answer helpful?

« Back