Change VHD Size as Reported to Windows

Home Forums Virtualization Virtual Server & Virtual PC Change VHD Size as Reported to Windows

This topic contains 7 replies, has 3 voices, and was last updated by tehcamel tehcamel 9 years, 6 months ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • Avatar
    TokyoBrit
    Member
    #148439

    I have a VM that uses a fixed size VHD of 60GB, but that only ever used about 20GB of it.

    Using Partition Manager I resized the C: drive to be 30GB, leaving 30GB of unallocated space.

    Now I want to resize the VHD (or change its settings or however it’s done), so that the virtual HD only reports its size as 30GB if I use Disk Management in Windows.

    Can I do that through the VHD Wizard or the vmTools VHDresizer? Or am I going to have to go old school and add a 2nd VHD of 30GB in size and use Partition Manager to move C: over to the “new” drive?

    Avatar
    sorinso
    Member
    #266987

    Re: Change VHD Size as Reported to Windows

    If you’re using VirtualPC (you did not say anything about it, I need to guess), then VHD Wizard will not allow you to shrink the VHD file. It only allows you to change it from fixed to dynamically expanding or vice-versa.
    I would opt for VHDResizer, a great tool.

    Avatar
    TokyoBrit
    Member
    #348278

    Re: Change VHD Size as Reported to Windows

    You guessed right. My apologies for not making that clear at the outset.

    I’ve used VHDResizer a lot when working with VHD’s, but then it’s usually me creating them and I prefer to start small and expand. With this one, one of our developers created it and picked the default settings for the VHD, so it created a 60GB file on his 80GB HDD.

    And that’s what I’m cleaning up.

    But something is still off as, even though VHDResizer now shows the minimum size possible is 30GB (after I changed the C: drive partition), the resize button is greyed out.

    Unfortunately it doesnt tell me why and I can’t find much info on their site since their forum has been disabled.

    Maybe it’s because I’m using 64-bit Vista rather than 32-bit XP? It’s the only machine with enough disk-space to compact the VHD.

    Avatar
    sorinso
    Member
    #266988

    Re: Change VHD Size as Reported to Windows

    TokyoBrit;200857 wrote:
    Maybe it’s because I’m using 64-bit Vista rather than 32-bit XP? It’s the only machine with enough disk-space to compact the VHD.

    I find it hard to believe that this is the reason…
    Might it be you don’t have enough free space on that destination disk?
    Are you sure you set the destination location properly? I had the same situation here until I set the destination disk…
    I will try to set an environment like yours and see what’s going on.

    tehcamel
    tehcamel
    Moderator
    #355522

    Re: Change VHD Size as Reported to Windows

    vhdresizer probably needs to create a new VHD, and copy the relevant data from the source to the new one, requiring at least as much space as the original VHd.. so make sure you have 60GB, and try again

    Avatar
    TokyoBrit
    Member
    #348279

    Re: Change VHD Size as Reported to Windows

    I certainly have enough disk space, since I’m using a 320GB SATA drive connected via eSATA.

    But it was a simple matter of how VHDresizer calculates sizes.

    Even though it says the minimum is 30GB, the resize button doesn’t become enabled until I set the new size to 32GB.

    It’s processing the VHD now, and I’ll let you know if I was successful in turning a 60GB dynamic disk into a 32GB fixed disk.

    Avatar
    sorinso
    Member
    #266989

    Re: Change VHD Size as Reported to Windows

    :beer: Cool, I’m glad you found the workaround… And thank you for posting it back.
    :idea: I think there might be an issue of how muck space a 30GB partition actually takes… After all, you defined the 30GB partition from within the VM, the actual disk space the specific VHD takes should be more. It might be an NTFS-related issue more than a VHDResizer one. Have you noticed that if you create a 10240MB partition on your 320GB disk, it will never show you really 10GB, but less?
    In the end, it doesn’t matter, but if one needs to understand the puzzle …

    Avatar
    TokyoBrit
    Member
    #348280

    Re: Change VHD Size as Reported to Windows

    I will see about creating a different sized VHD as a test, but at this point I’m happy with the result from VHDresizer.

    The Windows guest reports a 31.9GB HDD installed with 11.9GB free, and the VHD is 23.7GB in size. The Virtual Disk Wizard shows it as 32768MB, which is what VHDresizer reports it as.

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.