Solved

How to tell if a .VHD is dynamic or fixed

Posted on 2013-06-18
22
5,436 Views
Last Modified: 2013-06-26
Hi,
Hopefully this simple.
Is there an easy way to determine if a .vhd is dynamic or fixed?
0
Comment
Question by:smantz
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 12
  • 5
  • 3
  • +1
22 Comments
 
LVL 121
ID: 39257469
are these detached from Hyper-V?
0
 

Author Comment

by:smantz
ID: 39257578
No, these are running VM's

Withing the guest os, the drive shows 65 gig.  If I go to Hyper-V manager->Edit Virtual HD-> expand, it shows a current size of 67 gig. If I look at the actual VHD it is only 23 gig.  So that is my dilemma.
0
 
LVL 121
ID: 39257729
space on the disk in the OS?
0
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 

Author Comment

by:smantz
ID: 39257799
Within the guest os,  total disk is 67gig.
The actual vhd size on the host is 23 gig.
0
 
LVL 121
ID: 39257822
how much space is used in the Guest OS?

Total disk size is 67Gig....used space?
0
 
LVL 82

Assisted Solution

by:David Johnson, CD, MVP
David Johnson, CD, MVP earned 200 total points
ID: 39258057
Since the OS reported size is greater than the size on disk then it is dynamic.

powershell

Get-VHD .\test.vhdx will show you the properties of the vhd/vhdx

Convert Dynamic to Fixed
 Convert-VHD .\test.vhdx -VHDType Fixed -DestinationPath .\testFixed.vhdx

Convert Fixed to Dynamic (why I don't know)
 Convert-VHD .\test.vhdx -VHDType Dynamic -DestinationPath .\testFixed.vhdx
0
 

Author Comment

by:smantz
ID: 39258239
If this is true, can I accomplish the same thing from within Hyper-V manager?
0
 
LVL 5

Accepted Solution

by:
AbhishekJha earned 300 total points
ID: 39258819
Yes,  You can do so. Go to the Hyper-v manager & click on inspect disk & then select the disk. It will show you the disk properties.
0
 

Author Comment

by:smantz
ID: 39260251
Ok Found it... Yes they are dynamic (up to167GB) but are 24 GB.  When I convert, which does it use, the actual current size or the max dynamic value?
0
 
LVL 82

Expert Comment

by:David Johnson, CD, MVP
ID: 39260299
The maximum dynamic value is what it will use.
0
 

Author Comment

by:smantz
ID: 39260313
Any way to shrink that value some, say down to 40Gig?
0
 
LVL 82

Expert Comment

by:David Johnson, CD, MVP
ID: 39260368
With the virtual machine running NO, if stopped then you can edit the maximum value.
0
 

Author Comment

by:smantz
ID: 39260462
Ok VM is stopped, what next?
0
 

Author Comment

by:smantz
ID: 39260591
Why does the VM OS c: drive show 37 GB, the actual VHD is only 26GB? (haven't converted yet)
0
 
LVL 82

Expert Comment

by:David Johnson, CD, MVP
ID: 39260924
you can use the convert but it's better to create a new vhd, attach that vhd, then use some imaging software to do the copy from one to another.. i.e. boot the vm into pmagic using the pmagic iso/disk  http://partedmagic.com/doku.php?id=downloads#.UcIgZJz4KSo

I tried the built in convert but it created a disk that was the size of the maximum dynamic setting.
0
 
LVL 5

Expert Comment

by:AbhishekJha
ID: 39262049
You can compact the disk, but it may take a while to complete.

Refer below link for mor information & the process to do the same.

http://technet.microsoft.com/en-us/library/cc708394(v=ws.10).aspx
0
 

Author Comment

by:smantz
ID: 39263633
Let me give an update with what I have:

The vhd is dynamically expanding up to 160+ GB

The current vhd size is about 30gig (size I want)

Disk manager on guest vm shows system (C) drive at about 30 GB (sounds correct)

Disk Manager on guest vm shows an unpartitioned space of about 115GB (not needed)

Do I partition the unused space and run the Compact feature in Hyper-V and hope it does something with the space?

Hope the sheds a little more light on the subject.
0
 

Author Comment

by:smantz
ID: 39263748
Since this is turning out to be more involved than I thought, I am raising the points to the max.  Thanks again for all help.
0
 

Author Comment

by:smantz
ID: 39263751
OOps!
0
 
LVL 82

Expert Comment

by:David Johnson, CD, MVP
ID: 39264678
Note: I tried the convert and it made a vhd the dynamic set maximum size of the disk. It doesn't matter how much is actually allocated unfortunately. It uses the DRIVE size not the partition size(s).  Ergo you have to use the procedure I mentioned in http:#a39260924
0
 

Author Comment

by:smantz
ID: 39264851
I used Vhd Resizer (Google it) and it did what I needed.
0
 

Author Closing Comment

by:smantz
ID: 39278329
Sorry this is so late, forgot it was open
0

Featured Post

Threat Trends for MSPs to Watch

See the findings.
Despite its humble beginnings, phishing has come a long way since those first crudely constructed emails. Today, phishing sites can appear and disappear in the length of a coffee break, and it takes more than a little know-how to keep your clients secure.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
This article provides a convenient collection of links to Microsoft provided Security Patches for operating systems that have reached their End of Life support cycle. Included operating systems covered by this article are Windows XP,  Windows Server…
This tutorial will walk an individual through locating and launching the BEUtility application and how to execute it on the appropriate database. Log onto the server running the Backup Exec database. In a larger environment, this would generally be …
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…
Suggested Courses

631 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question