Windows 2008R2 Virtual server, want to reduce size of virtual disks

I have an old Windows 2008R2 virtual machines with 2 virtual disks, one of 50GB another of 120GB (more or less). I have replaced this VM server with another VM so I want to "warehouse" this VM, store it, backup it up so I can get to in the event we discover something on the new VM we did not transfer from the old. What is the best way to do this? The MAIN GOAL is to minimize the size of the virtual disks? Drive C (the 50GB drive) only has about 20GB of space used and Drive D (the 120GB) is only using about 70GB. In other words is there a process that will allow me to only backup, export, ???? that only what is being used, so as to reduce the size of the virtual disks to something close to the actual space used? That way if I do have to get to it (restore it, import it) it will be 2 drives of 20GB and 70GB instead of 50 and 120? Again, the MAIN GOAL being that we want to minimize the size of the virtual disks? Thank you very much.
LVL 26
Lionel MMSmall Business IT ConsultantAsked:
Who is Participating?
 
Lionel MMConnect With a Mentor Small Business IT ConsultantAuthor Commented:
Well I can't get the VM back. I was told by this company they have complete backups (I should have known better and checked before proceeding) but come to find out what they really have are only copies of their data. As such I could not get the VM running again. Fortunately it is the old VM and a few months have gone by since I put in the new VM and there has been no need to go back to the old one (yet--hopefully never) so at this point I will have to count it as lost or to try to do a OS repair or reinstall--not sure if I will do it since they may never need it.
0
 
Shabarinath RamadasanConnect With a Mentor Infrastructure ArchitectCommented:
Hi,

Could you please confirm the type of disk used with this VMs? Is that a dynamic disk or fixed disk ? If its a dynamic disk, you could check the size of vhd file as it may not be grow to the full usually.

However, the main challenge here is Windows server 2008 R2. If this was on Windows Server 2012 or 2012 R2, we have direct options available to compact or resize or what else.

The only option I have in mind to resize a VHD is a third party tool named vhd resizer.


This tool is no more available in the orginal website as its no more relevant after the release of Windows server 2012. How ever, you can try downloading it from this site.

http://www.bursky.net/index.php/2013/02/resize-vhd-volumesize/

Export and keep a copy safe before playing with it. Another catch with VHD Resizer is that it can reduce the VHD only upto 100 GB.

The best way I see to get rid of all such challenges is to make use of a Windows 2012 server. If you can afford to have a Windows 2012 server with Hyper-V, its easier. Export form Windows 2008 R2 HyperV and import to Windows Server 2012. Convert the disk to VHDX and then you could really compact the disk as required. I assume this can be accomplished even with a Windows8 client with enough storage as Windows8 has HyperV Buitin. However, Always keep a copy of export folder safe.

Good luck.
0
 
Michael OrtegaConnect With a Mentor Sales & Systems EngineerCommented:
Without using 3rd party tools, you can create 2 new virtual hard drives with size limits on them. Then you can clone your existing data on the larger disks over to the new drives.

MO
0
Simplify Active Directory Administration

Administration of Active Directory does not have to be hard.  Too often what should be a simple task is made more difficult than it needs to be.The solution?  Hyena from SystemTools Software.  With ease-of-use as well as powerful importing and bulk updating capabilities.

 
Lionel MMSmall Business IT ConsultantAuthor Commented:
OK how do I clone them?
0
 
Michael OrtegaConnect With a Mentor Sales & Systems EngineerCommented:
If you attach the disks in another running server you can simply copy the files over from one disk to the other.

For example:

Shut the old VM down and attach it's disks to another running server. Also attach the new disks to the same server. Simply copy the contents of one disk to the other.

MO
0
 
Svet PaperovConnect With a Mentor IT ManagerCommented:
This should be very easy to do it. I presume the VM is down but still attached.  
1.      Make sure you don’t have snapshots – of you have, apply them
2.      If the VHD disks are fixed size – convert them in dynamic
3.      Compact the dynamic disks
4.      Export the VM
All that you can do it in Hyper-V Manager. The exported copy will be your archive. After securing it in a save location, you can delete the VM.

If the VM doesn’t exist anymore (only the VHD files are available), you could either attach them to an existing (powered down VM), or create a new VM (don’t power it up) and repeat the steps above.

However, in some cases the compact may not complete the job well (especially the system drive). That could happen when there are still VSS copies available on the virtual server. In that case, you will have to power up the old VM (disconnect it from the network, if its domain name is used) and remove the VSS copies. For more information of how to it, please, read the help of vssadmin http://technet.microsoft.com/en-us/library/cc754968.aspx
0
 
Shabarinath RamadasanConnect With a Mentor Infrastructure ArchitectCommented:
As Mgortega mentioned, you could clone the data to another disk. This will get all the data moved to the new disk and you can keep the new disk safely.

However, this will not be equivalent to the exporting option. If you export after compacting the disk, you can bring back the same server on a later time without much issues. If you are not bothered about the server and only concerned about the data, the option which mgortega mentioned seems to be more appropriate and straight forward.

Good luck.
0
 
Lionel MMSmall Business IT ConsultantAuthor Commented:
The server must remain bootable (running a SQL app and database--may have to get back at this app and data down the road)--it is not just a question of the data on the drives--if it were just a question of the drive contents I could copy/robocopy the files and folders. The idea is to keep the Old VM in its current bootable state with with drives as small as possible. So far Svet Paperov's suggestion looks the most promising. I have looked at Shabarinath Ramadasan suggestion and from his comments about the 100GB limit is a non-starter as the C Drive is now only 50 and I would like to get it to around 20 to 30GB. Thanks thus far.
0
 
Shabarinath RamadasanInfrastructure ArchitectCommented:
Yes. I agree with you Lionelmn.. The option which has been provided by Svet is the appropriate one. I was under the impression that Compacting disk is a feature came up with Windows Server 2012.

If 2008R2 support that, you can just compact the disk and export it so that you will have a safe copy of the VM with data.

Good luck.
0
 
Lionel MMSmall Business IT ConsultantAuthor Commented:
I tried the suggestions form 39828137 above and I must have done something wrong as the VM is no longer bootable. I can't run Windows repair and when I go to the command prompt to look at the drive there is no longer a C:\Windows folder.
0
 
Svet PaperovIT ManagerCommented:
What exactly did do? Could you walk me though, please, step by step? I've never seen a VM been corrupted because of compact, unless there were some hard disk issues with the host.
0
 
Lionel MMSmall Business IT ConsultantAuthor Commented:
Well at this point I am trying to get it working again but basically I followed the steps you gave. I had no snapshots so I used the Vssadmin to see if any shadow copies existed and then removed them. Then I compacted the drives (both were already dynamics so need to convert). I exported the VM, and then tried to use that export to create another VM to make sure I had a good VM--that failed. I then tried to use the existing compacted VM (did not delete it yet) and tried to start it and it failed too. So both the original and the export do not work.
0
 
Svet PaperovIT ManagerCommented:
This is very strange. As I said, I’ve never seen or heard of VM being corrupted by compacting it.

I am afraid, you will have to go back to your last working backup of the VM, restore it and start over. But this time, I would recommend verifying the storage of the host first for issues. I don’t see another explanation for what have happened with the VM.
0
 
Lionel MMSmall Business IT ConsultantAuthor Commented:
The suggestions I were given actually caused my VM to become non functional and could not get it back so I can't say whether these suggestions will work for others or not.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.