Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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've been looking through the options of the QEMU binary, and I can't work this one out: Is it possible to make a new KVM machine with an existing hard drive image with an OS (XP Pro in this case) already installed?

I have seen a guide online to turn my VirtualBox XP Pro hard drive (.vdi) into a qemu image (which I have done) but I can't seem to make a new KVM using this existing hard drive?

share|improve this question
up vote 4 down vote accepted
virt-install ... --disk [path to your existing image] --import ...

Skip the OS installation process, and build a guest around an existing disk image. The device used for booting is the first device specified via "--disk" or "--file".

--disk [path]
path - A path to some storage media to use, existing or not. Existing media can be a file or block device. Specifying a non-existent path implies attempting to create the new storage, and will require specifyng a ’size’ value.

share|improve this answer
Ah, the import option, I didnt find this. Thanks so much :D – jwbensley Dec 12 '11 at 13:09

qemu-img command can convert any img format.

You can convert .vdi image to raw image. All hypervisors support raw image format. Then you can convert raw image to qed/qcow2 format to save image size.

share|improve this answer
qemu-img command support vdi format. – Edward Shen Aug 13 '13 at 10:13
qemu can directly run vdi format disk. – Edward Shen Aug 14 '13 at 1:40

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.