Server Fault is a question and answer site for system and network administrators. 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

Is is possible to take a snapshot of a non virtual server (Ubuntu) and restore it in a virtual machine? I'm asking because I'd like to have an exact copy of my production server to use as a dev server. Note that I don't have physical access to the production server.

share|improve this question
Which virtualization solution are you using? VMWare has a physical-to-virtual converter: (and I hear that you can later convert VMWare images to other VM formats). – Piskvor Jan 9 '11 at 15:05
The relevant terms are P2V and V2V (p=physical, v=virtual). The VMWare tools work great for doing this for VMWare. – Scott Pack Jan 9 '11 at 15:52
up vote 10 down vote accepted

You can use something like dd if=/dev/hda of=/tmp/path/server.img then use QEmu's qemu-img convert -f raw -O vmdk server.img server.vmdk (replace vmdk with vpc and the file extension with vhd for Xen or Hyper-V)

Otherwise most virtualization environments have tools to do what you want, this is just one way.

share|improve this answer
Take care that the destination is not mounted on the source drive though - in this example, /tmp/path should be somewhere else than /dev/hda . – Piskvor Jan 9 '11 at 15:20
There is some warning here to consider about the drivers! If you have a physical server working fine and you image it and turn it virtual, beware things like drive controllers, NICs, etc. that are now the virtual hardware and may in some cases kill a server. Ubuntu shouldn't be quite so bad, but with Windows on special hardware it can easily cause blue screens. – Bart Silverstrim Jan 9 '11 at 18:06

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.