one P2V way

Steps to Clone a VM.
         1. Let's assume we want to clone SOURCE-VM to DESTINATION-VM.
         2. Make sure both VMs runs the same version of the OS, boot them up.
         3. Take both machines into single user mode with networking and ssh service, with the following commands:
            # chkconfig --level 1 sshd on
            # chkconfig --level 1 network on
            # init 1
         4. Issue the following command on the destination VM:
            # rsync -av --numeric-ids --delete --progress --exclude /sys --exclude /boot --exclude /dev --exclude /proc --exclude /etc/mtab --exclude /etc/fstab --exclude /etc/udev/rules.d --exclude /lib/modules ip-or-hostname-of-source-vm:/ /
         5. Reboot both machines.

猜你喜欢

转载自andre-sunjian-gmail-com.iteye.com/blog/1167508
way