1

OK, this might be a stupid question but I'm new to this. Dealing with Hyper-V server 2008. So let's say I got a dyamic VHD which has a 70gb max when i inspect it in Hyper-V, and then the C: drive of that VHD hits its limit. Does space automatically get added to C or what does it mean when it dyamnically expands? Asking because a VHD file got bigger, even though the limit on its C drive wasn't even hit. Why was that?

2 Answers2

1

A dynamic VHD disk will not preallocate all the space on creation. It will expand its size as you use it, until it reaches the maximum size defined, or the available space on the host disk.

If you create a 70GB disk, for instance, it will allocate a few GB and keep increasing the size until it reaches 70GB. It will stop growing on 70GB or when it exhausts all available space.

ThoriumBR
  • 5,272
  • 2
  • 23
  • 34
  • you said: "It will expand its size as you use it, until it reaches the maximum size defined, or the available space on the host disk.". what happened in my case was that the VHD started to turn off one by one. Was that caused by the space limitation? – user3038614 Jul 21 '15 at 20:22
  • so also another question: this means that i can allocate 1TB for a VHD but if there is no more space on the hard drive where it sits on and grows in size towards 1TB, it will stop when there is no more space available even though it shows 1TB under disk management in the VHD? – user3038614 Jul 21 '15 at 21:04
  • Yes, as soon as the free space on the HD is exhausted, the VHD will stop growing too. – ThoriumBR Jul 26 '15 at 14:43
1

There are two ways to 'view' a virtual hard drive. You can see it on the host system as a vhd file and you can see it as you described from inside the virtual machine as an attached drive.

From disk management inside the virtual machine you will see no difference between a fixed size disk and a dynamic disk. If you created a 70GB disk either fixed or dynamic and attached it to a virtual machine it will report as being 70GB.

The difference you will see is if you inspect that vhd file from the host. When you create a fixed disk the file is expanded at the point it is created to the size you stated. So in this case 70GB. If you create a dynamic 70GB drive at the moment it is created it will be about 4mb until you start adding data to it. If you add 100mb of data it will grow by 100mb (simplified example). However as I said above it will show inside the virtual machine as having 70GB available.

Drifter104
  • 3,693
  • 2
  • 22
  • 39