Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The situation is; I am running a web server (Ubuntu 10.10 server) on virtualbox v.4 inside Ubuntu 10.10 Desktop and now I want to clone entire web server on my brand new PC. Please help me with this, how do I do it?


I found a possible solution here:

share|improve this question

migrated from Apr 20 '11 at 10:22

This question came from our site for professional and enthusiast programmers.

You mean virtual to physical (V2P)? – Matt H Apr 20 '11 at 10:38
Yes, something like that but even easer way like creating bootable DVD of Virtual OS, something like recovery DVD.. – Himalay Apr 20 '11 at 11:41
up vote 1 down vote accepted

Using converttoraw feature of virtual box and DD.


This assumes you have a reasonable knowledge of linux.

share|improve this answer
thanks for the reply. Yes, v2p may work if I copy raw into a attached HDD. But what if I need to clone into a new laptop which has no OS installed? Do you think will it work if I copy raw into a USB pendrive then attach with new laptop and boot from Live-CD then do dd?? – Himalay Apr 20 '11 at 11:36
@Himalay, Not sure about that. – Matt H Apr 20 '11 at 22:17

Quick trick to copy over a network: use linux netcat (nc). Using this method you do not have to convert to a raw image as dd will copy literally everything from the source drive.

Use your choice of linux live discs to boot both the physical machine and virtual machine, make sure both have network access and write down the IP addresses of both. Switch to root (sudo su). Find out what your drive paths are using fdisk -l

On the destination machine:

nc -l 10000 | dd of=/dev/sda bs=64

Command syntax:

nc -l <port#> | dd of=<destination drive> bs=<size in bytes>

Block size (bs) can be whatever you want, I try to keep it fairly small.

On the source virtual machine:

dd if=/dev/sda bs=64 | nc 10000

Command Syntax:

dd if=<source drive> bs=<size in bytes> | nc <destination ip> <destination port#>

Block size (bs) at the source and destination must match. I always set the destination machine up to reduce sending errors. There is no progress bar, just wait for the bash prompt to return and you are good to go. Remove the live discs and reboot.

share|improve this answer
You can actually get the progress of dd by running kill -USR1 $PIDOfDD or watching the transfer over time by running watch -n 10 kill -USR1 $PIDOfDD link – Chris Magnuson Jan 24 '15 at 13:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .