Page 1 of 1

VHD to VDI

Posted: 18. Sep 2009, 14:09
by glennwelker
Having problems and there may be a better way to get to my desired solution.

Essentially, I have been working in Virtual PC, with a base image and a couple of differential drives. Problem, is that I ran out of space with my so called dynamic base. There isn't a way to resize the drive without imaging software, so I thought I would check out VirtualBox.

So far, VirtualBox seems much more advanced, feature wise and would like to move forward with a transition but I am hesitant to lose my base images. While, VirtualBox will load VHD, I don't think this removes my problem with the original size of the VHD. So, I thought I could use the clonehd function to create VDI files from my VHD files. Every time I have tried this it has worked flawlessly... except that VirtualBox wont add them. I get the error, "Could not get the storage format of the hard disk". I have tried basically every variation of the command. I also have tried to make the original VHD file a fixed length disk instead of a dynamic disk. This also didn't solve my problem.

Does anyone have a solution or a better way to move forward. At this point, it is time consuming enough that I suppose that I should just rebuild my base images, but that is very time consuming as well.

Re: VHD to VDI

Posted: 18. Sep 2009, 14:27
by Sasquatch
The problems you're facing with VPC about hard drives won't be solved with VB or switching to the VDI file format. You will get the same limitations.

Re: VHD to VDI

Posted: 18. Sep 2009, 14:41
by glennwelker
So, is there an easy way to essentially image one drive to another with the built in tools?

Re: VHD to VDI

Posted: 18. Sep 2009, 15:10
by Sasquatch
Not really. You can try to clone the VHD to VDI, but if I remember correctly, that feature is not working properly. The only thing left is to create a VDI, mount that with the VHD in one VM and use CloneZilla or similar to clone the contents of the VHD to the VDI.

Re: VHD to VDI

Posted: 20. Sep 2009, 19:49
by Entegy
If I'm understanding correctly, you just want to increase the size of your virtual hard drive?

Here's what I do for that:

1)Make a new VHD or VDI (I prefer VHD thanks to the VHD mounting feature in Windows 7) with new desired size
2)Connect the old drive and the new one to a virtual machine.
3)Use a Gparted LiveCD or a Clonezilla LiveCD to copy the contents of the old one to the new one.
4)Use Gparted to resize filesystems as needed.

You might also need to run a startup repair on the guest, but this is the easiest method for me.