Solved

Hyper V

Posted on 2015-01-10
8
84 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
[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
8 Comments
 
LVL 37

Expert Comment

by:Mahesh
ID: 40542315
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
ID: 40542317
Thanks will give it a go.
0
 
LVL 96

Expert Comment

by:Lee W, MVP
ID: 40542348
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
Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 

Author Comment

by:minniejp
ID: 40542354
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
 

Author Comment

by:minniejp
ID: 40542356
Just to get things working again
0
 
LVL 37

Accepted Solution

by:
Mahesh earned 500 total points
ID: 40542362
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
ID: 40542523
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
ID: 40558405
resized.
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

You might have come across a situation when you have Exchange 2013 server in two different sites (Production and DR). After adding the Database copy in ECP console it displays Database copy status unknown for the DR exchange server. Issue is strange…
In previous parts of this Nano Server deployment series, we learned how to create, deploy and configure Nano Server as a Hyper-V host. In this part, we will look for a clustering option. We will create a Hyper-V cluster of 3 Nano Server host nodes w…
This tutorial will give a an overview on how to deploy remote agents in Backup Exec 2012 to new servers. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as connecting to a remote Back…
This tutorial will walk an individual through setting the global and backup job media overwrite and protection periods in Backup Exec 2012. Log onto the Backup Exec Central Administration Server. Examine the services. If all or most of them are stop…

734 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