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

I have only one computer and it's nicely set up. I need to install Arch for a while to test something, so I was wondering if it is possible to install it on a Virtual disk via VirtualBox, and if need should arise, to transfer it like it was installed on a physical partition (like you normally would)?

What are the possible problems that can arise? What should I be careful of?
(I don't need advice regarding arch, just the VM part)

I'm using Sun's VirtualBox, on an XP machine.

share|improve this question
up vote 2 down vote accepted

This is easy if you left a large enough amount of space in the guest empty. You could simply back it up with the dd utility and then copy it to an external hard drive, and use dd again to restore it.

an example:

dd if=/dev/hda | gzip > /path/to/image.gz

then to restore it to another hard drive or partition:

gzip -dc /path/to/image.gz | dd of=/dev/hda
share|improve this answer

If both can be powered on at the same time, you can image across the network. The only requirement is that the destination is larger than the source. Boot both machine up from live CDs (almost any will do), and get them on the network. Assuming the disk is /dev/sda, and the destination address is run the following.

Destination : nc -l -p 1025 | gzip -d | dd of=/dev/sda

Source : dd if=/dev/sda | gzip | nc 1025

Netcat (nc) is a simple program to transfer data across the network. The Destination command tells netcat to listen on port 1025, decompresses the output with gzip, and then passes it to dd, which then writes it to /dev/sda. The source command reads /dev/sda, gzips it, and then sends it to the destination address on port 1025. The destination command should be run first.

Make the VM with a small disk (say, 20GB), and it shouldn't take too long over a fast connection. You can then expand the partition on the other side using gparted.

share|improve this answer

You must log in to answer this question.

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