Solved

Hyper V

Posted on 2015-01-10
8
78 Views
Last Modified: 2015-01-19
Hi, I have recently started a new post and my predecessor has over sized the disks in a number of the Virtual Machines (to a larger size that the host has space for).  On the Virtual DC, he has one c partition which obviously holds the OS and he has given it 600GB in size.  They will never use this amount of space and I want to reduce it down, i'm assuming I can't just disk management to shrink it, as the VHD on the host won't shrink and this is really what i need...., so was wondering if anyone had any advice.

Cheers
0
Comment
Question by:minniejp
8 Comments
 
LVL 35

Expert Comment

by:Mahesh
Comment Utility
You need to do this in two steps

Under the guest OS:
1.Defrag the drive.
2.Open Disk Management and shrink the partition to size you want, like 100 GB or whatever you want. Make sure all of the free space is at the end of the drive.
3.Shut down the guest.

From hyper-v disk settings edit:
1.Compact the VHD.

See if above works
0
 

Author Comment

by:minniejp
Comment Utility
Thanks will give it a go.
0
 
LVL 95

Expert Comment

by:Lee W, MVP
Comment Utility
If it's a fixed VHD size then that won't help.  It needs to be a dynamic VHD.

One idea
1. put the machine off-line then use Disk2VHD WITHIN the VM saving the VHD to a network share OUTSIDE the VM.  This should create a dynamic VHD of a size a few GB larger than actually needed.  This can be the "data" drive.  
2. Shut down the original VM and COPY the original VHD and then mount it in another VM (not the same - the disk signatures will be the same.  You need to change the signature on one disk after you copy it - see http://blogs.technet.com/b/markrussinovich/archive/2011/11/08/3463572.aspx
3.  In the copy of the original VHD, DELETE the data that's on the drive - ONLY the data.  Then reboot the hosting system and run Disk2VHD again to capture that drive - it should be your boot drive (and in a good state to boot up normally).

You should end up with TWO VHDs, one with data, the other with OS.  The data one, you can delete the OS stuff from (C:\Windows) - this will still leave some space to grow into and the OS will report the drives as BOTH being the original sie of the single, but ACTUAL USED SPACE will be not TOO much more than they ACTUALLY required.

(You could copy the VM twice, fix the disk signature issues, delete the OS on one, then the data on the other and THEN VHD them both...)
0
 

Author Comment

by:minniejp
Comment Utility
It may be easier to move one of the Hyper Vs to a different partition on the physical host.  Can you go through this process please?
0
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 

Author Comment

by:minniejp
Comment Utility
Just to get things working again
0
 
LVL 35

Accepted Solution

by:
Mahesh earned 500 total points
Comment Utility
One another way to do that is through VMToolKit’s VHD Resizer http://almoselhy.azurewebsites.net/2013/10/seriously-how-to-shrink-a-vhd/
1st step is same as 1st comment
for 2nd step use VM Toolkit VHD Resizer tool to compact the disk

The VHD Resizer tool can be downloaded from below site
http://www.brothersoft.com/vhd-resizer-336963.html

 The original site is no longer I think
0
 
LVL 12

Expert Comment

by:Dave
Comment Utility
Is it actually using 600gb on the host disk or is it a dynamic drive, set to expand as needed. If the latter why bother trying to shrink it...
0
 

Author Closing Comment

by:minniejp
Comment Utility
resized.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Scenario:  You do full backups to a internal hard drive in either product (SBS or Server 2008).  All goes well for a very long time.  One day, backups begin to fail with a message that the disk is full.  Your disk contains many, many more backups th…
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 tutorial will walk an individual through the steps necessary to configure their installation of BackupExec 2012 to use network shared disk space. Verify that the path to the shared storage is valid and that data can be written to that location:…
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…

763 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now