Large VHD file

Hi,

Running HyperV and just realised that on the host VM, it says that the VHD file is 540GB yet the HDD within the VM states that it's only using 150GB of the C:

It's a dynamic disk.

Any advice would be great thanks.
Talds_AloudsAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Talds_AloudsAuthor Commented:
Oh and there's no snapshots waiting to be merged.
0
Haresh NikumbhSr. Tech leadCommented:
What is guest OS ?
0
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
Merge the Snapshots, Shutdown, and it will ask to Merge.

see Hyper-V Snapshots FAQ
0
Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

Talds_AloudsAuthor Commented:
Guest OS is server 2008R2.

No snapshots.
0
Talds_AloudsAuthor Commented:
Oops...I mean SBS2011
0
Haresh NikumbhSr. Tech leadCommented:
So What is limit size set for the dynamic disk ? and if i am not wrong 150GB is showing used space for the vm isnt ?
0
Talds_AloudsAuthor Commented:
When I made it, I put it as 600GB, but usable space on the HDD is really only about 550GB of usable space. So the VHD is 540GB but once the VM has booted, within Computer, it states 454GB free of 599GB.
0
ButlerTechnologyCommented:
VHD drives don't shrink unless you use the disk tools.  I had the log files from SQUID ballooned up to arounf 300 G.  I removed the log file and the guest machine showed that I was only using about 40G, but the host machine showed about 350G was being used.

You can shutdown the guest machine and run the disk tools located in Hyper-V.  This should allow you to free up space on the host machine.

Tom
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Haresh NikumbhSr. Tech leadCommented:
Okay so you need to read this to understand why size is large

About dynamically expanding disks

A dynamically expanding virtual hard disk is one in which the size of the .vhd file grows as data is written to the virtual hard disk. This is the default type of virtual hard disk created by Virtual Server.

When you create a dynamically expanding virtual hard disk, you specify a maximum file size. This size restricts how large the disk can become. However, the initial size of the .vhd file is only about 3 MB. For example, if you create a 1-GB, dynamically expanding virtual hard disk, the initial size of the .vhd file will be about 3 MB. As a virtual machine uses the virtual hard disk, the size of the .vhd file grows to accommodate the new data. The size of any dynamically expanding disk only grows; it does not shrink, even when you delete data. You may be able to reduce the size of a dynamically expanding disk by compacting it. For more information, see Compacting dynamically expanding virtual hard disks.

http://technet.microsoft.com/en-us/library/cc708315%28v=ws.10%29.aspx
0
Talds_AloudsAuthor Commented:
So you're saying that if you have a dynamic disk that you can't decrease space unless you compress it. I note that it says not to use this in a production environment.

I don't understand why anyone would use a dynamic disk then. I thought it grew and shrunk. Is there a way I can convert this to a fixed size?
0
Haresh NikumbhSr. Tech leadCommented:
yes you need to compress it manually to shrink disk.

thats true Microsoft recommend to have basic disk in production env. as per link posted above

how to convert dynamic disk to basic please refer below link

http://blogs.msdn.com/b/virtual_pc_guy/archive/2011/12/28/converting-to-a-fixed-virtual-hard-disk-the-easy-way.aspx
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Server 2008

From novice to tech pro — start learning today.