• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 440
  • Last Modified:

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.
0
Talds_Alouds
Asked:
Talds_Alouds
2 Solutions
 
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
Network Scalability - Handle Complex Environments

Monitor your entire network from a single platform. Free 30 Day Trial Now!

 
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
 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now