Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.

Windows 7: Virtual Hard Drive VHD File - Create and Start with at Boot

31 May 2009   #30

Win7 x64 SP1, Virtual Hackintosh
VHD-File Type=Fixed vs. Type=Expandable

Hi, All

I created a VHD-File to install Win7 as described above:

Create vdisk file=c:\windows7.vhd maximum=100000 type=expandable

I thought that diskpart will create a file with a maximum size of 100GB but the file size should grow after installing the OS and other useful SW.
Actually I have installed about 15GB of stuff, so the size shown in Vista / Win 7 should be reported as that size.
But Win7 reports the file is about 100GB in size and a lack of free disk space in the underlying Vista installation.
I looked in Win7 diskpart and it reported the VHD-file as expanable. But the real behaviour is like fixed (the maximum space is allocated at the time of creation, no growth).

Has anyone out here made similar experiences, the behaviour differes from my expectations made based von Virtual PC and VMwares VHDs.
Is there a possibillity to shrink the file into realistic dimensions?
What about Hypernation when using a VHD - Is it possible and does it make sense?

Thanks in Advance and Greetings from Switzerland


My System SpecsSystem Spec
31 May 2009   #31

64-bit Windows 10 Pro

From post above.

When using the type=expandable command, the VHD file will be exandable, but it will require installing Windows Virtual PC to actually see the VHD file as the smaller expandable size instead of the full fixed size. It seems that without that program installed to have associated with VHD files types, Windows 7 will still only show the maximum size instead whether it is fixed or expandable.
My System SpecsSystem Spec
31 May 2009   #32

Windows XP and 7

Quote   Quote: Originally Posted by Oblomow58 View Post
Does anyone here has similar experiences?
It depends on where you are looking for the size. If you have booted the VHD file, then it shows 100 Gb - when you look at the drive or at the VHD file. If you have booted an other operating system for example you real Vista then the VHD file shows the real occupied disk space; e.g. 15 Gb.
Quote   Quote: Originally Posted by Oblomow58 View Post
Is there a method to shrink the VHD?
I only knew one program that can do this: "VhdResizer". It's freeware, but you must register to download it. With "VhdResizer" you can resize a VHD file or change from fixed to expandable vice versa.
Quote   Quote: Originally Posted by Brink View Post
I find that it's usually best to backup anything on the VHD that you did not want to lose, then delete it and create a new VHD file the size that you wanted instead of trying to shrink an existing one.
Just this is what "VhdResizer" do: Creates a new VHD file and copies all content.
My System SpecsSystem Spec
31 May 2009   #33

Win7 x64 SP1, Virtual Hackintosh
From underlying Vista point of view it's expandable!

Thanks for your fast repies,

You are right: When booting Win7 RC from the 100GB expandable VHD it reports the boot partition 100GB with 12GB used. This results in a warning (low free disk space on the Vista Boot drive where the VHD-file resides. The size of the VHD on the Vista drive is reported as 100GB).

But when looking the same thing from inside of Vista the VHD is just some 13GB and not the 100GB as reported.

So I got exactly what I wan't and it is not necessary to be in sorrow on the low disk space problem.

My System SpecsSystem Spec

31 May 2009   #34

Vista Home Premium 32-bit/ Win7 RC/ Debian Lenny

Hey guys,

Is there any difference in performance If I install Win7 in this way? Will it give the same performance as the actual installation will do? Any short comings of running OS in this way?

Actually I was about to do dual-boot with Vista but Then I hit this thread and I feel if there's no change in performance then I'll go for it as every 2 weeks w get a new Win7 build

My System SpecsSystem Spec
31 May 2009   #35

64-bit Windows 10 Pro

Hello Mukul,

Using a expandable VHD file could cause it to run a bit slower than using a fixed VHD file, but I have seen no difference between a fixed VHD file and a normal partition or drive though.
My System SpecsSystem Spec
01 Jun 2009   #36

Win7 x64 SP1, Virtual Hackintosh
Registering VHD Files with Virtual PC Beta

In the meantime I have installed Virtual PC Beta and Virtual XP and tried to register VHD-Files with

It does not make any difference, explorer shows the MAXIMUM (100GB) value of the EXPANDABLE VHD-File (20GB actually used) and warns me that the underlying Vista Partition is critical in low free disk space.

How did you register VHD-Files to displayed correctly?

Best Regards, Oblomow
My System SpecsSystem Spec
01 Jun 2009   #37

64-bit Windows 10 Pro


Just having Windows Virtual PC installed allowed them to display as the expandable size in Windows 7 Windows Explorer instead of the full maximum size for me.

Did you create the VHD at boot using the expandable option?
My System SpecsSystem Spec
01 Jun 2009   #38

Win7 x64 SP1, Virtual Hackintosh
Re: Expandable VHD

Yes I did. It works very well, I write this from inside Win7 installed on the expandable VHD.
Installing Virtual PC Beta and Virtual XP did not change anything on the display of the underlying Vista Partition (just 7% free disk space).

There is no default application for VHD files defined after Virtual PC's installation.
I tried to define (alternatively)
as default application for vhd-file types but this did not change anything on the display of the Vista Partition (nearly full) and the Win7.vhd (Expandable but shown at the Maximum).

I open the disk management msc several times and refreshed to view of the disks.

Do you have any other idea?

Thanks in Advance

My System SpecsSystem Spec
01 Jun 2009   #39

64-bit Windows 10 Pro

I'm not sure why it's not showing only the expandable size for you instead of the maximum size even though it is set as expandable. You might see if creating a new VHD from scratch as a test to see if it remains the same way for you.
My System SpecsSystem Spec

 Virtual Hard Drive VHD File - Create and Start with at Boot

Thread Tools

Similar help and support threads
Thread Forum
Fail to start up - Can't boot hard drive - Windows cannot be installed
Hi everyone, recently I bought a new laptop, MSI GP70 which came with Windows 8... I tried it for few weeks and than I decided to downgrade it to Windows 7. So, I did it, everything went well, I was using Windows 7 for couple of weeks, but now I have a problem... Last night I didn't turn it off,...
Installation & Setup
Virtual Hard Disk - Create and Attach VHD
How to Create and Attach a Virtual Hard Disk in Windows 7 A Virtual Hard Disk is a created VHD file on your hard drive that acts as a separate hard drive disk in Computer. This will show you how to create and attach (mount), or only attach (mount) an existing, a VHD in Windows 7. Special...
Can i boot from a VHD (Virtual Hard Drive)
Hi, i was wondering if it is possible to boot my computer from a vhd and add it to the boot menu. I do not want to dual boot, I am trying to use the vhd like a dual boot. I am running Windows 7 Ultimate x64. Thanks
A Virtual Hard Drive? Two separate hard drives now run Win 7 x64
While looking into another possible problem with a hard drive on my system,I began unplugging the devices (there are four of them) to isolate the problem and in doing so, I I seriously corrupted C drive, and began getting 0x7b BSOD messages. First I tried to do a System Repair with the Repair...
Backup and Restore
WEI fails (cannot write file to hard drive) Boot drive set to B:\
I had a regular install of Windows 7 on a WD 1 TB drive with the usual C:\ as the boot drive. I just got a new SSD, so I set up a parallel or dual boot of Windows 7 on the SSD which is set up as the B: drive. So when I boot into the Windows on the SSD (B:\) and run the WEI, it fails because...
Performance & Maintenance

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 19:07.
Twitter Facebook Google+