Moving from a real Ubuntu to a virtual one (VMWare)
Translation of the original in Catalan. Read it in: CatalàCastellano
This week I have cloned a system set up on Ubuntu, from a real machine to a virtual machine running inside a VMWare Server. The truth is I thought I would have more problems, but in the end the thing has been simpler than I thought. I will try to explain the steps I have followed, I hope I do not leave out any important detail since I will do it from memory.
-
New server
-
We create a virtual machine with the VMWare Server Console.
-
We install an Ubuntu 6.06 LTS (the same version that is on the machine we want to clone)
-
Unlike the original we mount this one with LVM, that was a whim of mine, not a necessity
-
Once the standard installation is finished and the updates are done, we install the ssh server
-
Original server
-
We create a text file with this contents, I will call it exclude.txt:
/proc
/sys
/dev
/mnt
/cdrom
/tmp
/etc/fstab
/etc/mtab
/boot
/etc/iftab
-
Now comes the moment of truth and using rsync I start cloning the machine:
rsync -cavz --exclude-from=exclude.txt /* root@IP_NOVA_MAQUINA:/
-
We shut down or unplug the network cable
-
New server
-
We reboot the machine, I did it the blunt way, that is... pressing the reset button of the virtual machine. Call me radical but I thought it was the best in this case.
3 comments
Comments from the old blog, as they were written. Comments are closed.
Alfredo Beaumont
M'agrada veure que no va a ser pas complicat :-)
—
[1]
A mi m'agrada veure els teus comentaris en català a meu blog, tot un luxe.
Javier Mart
Oriol,
Una manera muy sencilla de hacerlo, es creando una imagen con el comando dd:
dd if=/dev/disco of=/discousb/imagen.dd
Despues utilizas el software de Qemu: qemu-image
Y la convierte a formato nativo de VMWare.