Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have an image file (linux based image) and want to convert it to VHD so that it can be used to create hyper-V VMs.

I used "qemu-img convert" to convert raw to vpc format, but vpc doesnt work for hyper-V and vhd is not supported by "qemu-img convert".

What would be the right way to do this?

The image only has one partition:

Partition Table: msdos

Number  Start   End     Size    Type     File system  Flags
 1      32.8kB  4295MB  4295MB  primary  ext3         boot
share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

VhdTool should be able to do the conversion.

vhdtool.exe /convert myimage.raw
share|improve this answer
Thanks that worked. However the command doesnt create a new vhd, but appends a footer at the end of the existing image file. I just have to rename the file to .vhd so that it is recognized by the hyper-v vm creation wizard. –  user1060517 Jul 24 '12 at 20:52
Also, vhdtool.exe has a prerequisite of windows server OS/NTFS. I was wondering if there is any similar tool (raw to vhd) that can be used on a linux machine? –  user1060517 Jul 24 '12 at 20:54
I'm not aware of one. But since the destination hypervisor is Hyper-V, this shouldn't be much of a problem. :) –  Michael Hampton Jul 24 '12 at 20:57
yes certainly. Thanks again. –  user1060517 Jul 24 '12 at 21:04
Welcome to Super User. Remember to accept the answer that resolved your question by clicking the outline of the check mark next to it. :) –  Michael Hampton Jul 24 '12 at 21:06
add comment

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.