none
Is there a way to 'lose' the second .vhd file if the disk space is not needed?

    Question

  • I can't seem to find a good search phrase to turn up discussion on this probably common issue. On a windows 2012 gen 1 vm, a second .vhd file was created after the original reached 300 gb. The files on that vm have been thinned out substantially, so it could go back to it's original single 300 gb .vhd. How do I do that?

    Tuesday, March 28, 2017 4:37 PM

Answers

  • How did you create the second VHD to hold information when the first VHD became 'full'?  By default, information would not automatically start being added to the second VHD.  You must have done something to redirect some of the data to the second VHD.  A little information about how you accomplished that might help us.

    In general, any VHD used by a VM is defined in the settings of the VM.  And each VHD is generally represented by a drive letter within the operating system of the VM.  That makes it a simple task to view the contents of any VHD assigned to the VM by simply logging into the VM and looking at what is on which drive.  But if you or your application is doing something different, we would need to know what that is.


    tim

    • Marked as answer by rusticloud Wednesday, March 29, 2017 2:17 PM
    Wednesday, March 29, 2017 1:44 PM

All replies

  • Hi Sir,

    >>a second .vhd file was created after the original reached 300 gb.

    >>The files on that vm have been thinned out substantially

    If there are files stored in second .VHD , you may need to move these files into first .VHD then remove second one (if the second .VHD was attached on SCSI controller you can directly remove it in VM settings , if not you may shutdown the VM them remove it .).

     

    Any further information please feel free to let us know .

    Best Regards,

    Elton


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Wednesday, March 29, 2017 8:09 AM
    Moderator
  • OK , how do I tell if there are any files on the second vhd?
    Wednesday, March 29, 2017 1:32 PM
  • How did you create the second VHD to hold information when the first VHD became 'full'?  By default, information would not automatically start being added to the second VHD.  You must have done something to redirect some of the data to the second VHD.  A little information about how you accomplished that might help us.

    In general, any VHD used by a VM is defined in the settings of the VM.  And each VHD is generally represented by a drive letter within the operating system of the VM.  That makes it a simple task to view the contents of any VHD assigned to the VM by simply logging into the VM and looking at what is on which drive.  But if you or your application is doing something different, we would need to know what that is.


    tim

    • Marked as answer by rusticloud Wednesday, March 29, 2017 2:17 PM
    Wednesday, March 29, 2017 1:44 PM
  • Hi, Did you take a snapshot? Did you create another drive volume?


    Miguel Fra
    Falcon IT Services
    https://www.falconitservices.com

     

    Wednesday, March 29, 2017 1:46 PM
  • Hi Tim

    I see...what I thought was true was that the vm had originally provisioned with a single vhd, and had since auto-provisioned a second vhd as the extra space was needed. That apparently is not what is the case. I had not realized that the normal pattern was a single vhd to a partition inside the vm. It does make sense.

    This is a very simple config, nothing other than the out of the box hyperv tools that come with windows 2012.

    Conclusion would then be that I can't lose the second vhd, as I need both of the partitions in the vm.

    Thanks for clarifying this for me.

    Wednesday, March 29, 2017 2:17 PM
  • Partitions and VHDs are two completely separate things, so I'm not sure what you mean here.  You can have multiple partitions on a single volume (VHD). So you might have multiple partitions and still have a single VHD.

    But, as with adding additional volumes to a VM, it takes specific steps to add multiple partitions to a VHD.  Nothing is automatic.


    tim

    Wednesday, March 29, 2017 2:21 PM
  • I wrote that about partition and vhds because you wrote "And each VHD is generally represented by a drive letter within the operating system of the VM". That was a simplification, but it did help me untangle my idea that the hyperv system had made a new vhd on it's own.
    Wednesday, March 29, 2017 2:27 PM