Problem: migrate (or consolidate) a phisical Linux machine to a VMware virtual machine without passing through a CD/DVD.
- Install VMWare Server on the desired machine.
- Create an empty virtual machine with enough disk space, selecting the OS you’re going to migrate.
- Download a Linux live-CD ISO (for example Grml or Knoppix).
- Burn one copy on a CD and then copy the ISO to the VMWare server (the host).
- Reboot the original Linux box with the CD you’ve just burnt, and connect the ISO to the newly created Virtual Machine.
- Check both live CDs have net connection correctly configured and that they can see each other.
- In the virtual machine, type this:
nc -l -p 10000|dd of=/dev/hda
- On the machine you’re migrating, type:
dd conv=noerror if=/dev/hda|nc $IP_OF_THE_VM 10000
- Wait until dd finishes its job, do a clean reboot of the virtual machine and enjoy the consolidation! You may want to install VMWare tools to get everything 100% working in the new system.
A couple of notes:
ddis used to do a physical copy of the disk
conv=noerroris used to bypass error on the original disk. Use this option at your own risk.
ncis used to copy the stream other the net. man lc for further info
kill -USR1 $PID_OF_DDcould be used to see dd stats