?
Solved

Reducing VMWare Virtual Machine Disk space usage

Posted on 2008-11-10
12
Medium Priority
?
6,556 Views
Last Modified: 2012-05-06
I have a 250GB hard drive which I run two virtual machines off of. I received a disk space warning the other day and decided to look into the issue. One virtual machine, is taking up 140GB on the physical hard drive, but when running the only virtual disk is only 48GB used.

How can I reduce the size of the virtual disk to back around the actual size of the data (48GB)? Any other ideas on reducing the size of this huge VM?

I tried Defrag and Shrink, but shrink needs the same size as the VM in free space to shrink. I come up a few GB short.

I do have another empty 250GB hard drive to write to if that helps.

I am using VMWare Workstation 6.0.3 to run Windows XP on a Windows Vista (x64) machine.
0
Comment
Question by:aiscom
  • 6
  • 6
12 Comments
 
LVL 23

Expert Comment

by:bhanukir7
ID: 22928233
Hi,

Instead of running the vmware tools from the VM to shrink the vmdk file use the command line tool

vmware-vdiskmanager.exe         this is available in the following location.

X:\Program Files\vmware\vmware workstation\

for us to get the shrink to work we should have exactly double the size of the VMDK.

but i think we dont have 300 GB disk rather it is only 250gb.

bhanu
0
 

Author Comment

by:aiscom
ID: 22931254
Yes, that is correct Bhanu I only have a 250GB disk so I do not have double the size of the vmdk. Any other way to reduce the size of the disk, maybe wioth VMWare converter, or Clone?
0
 
LVL 23

Expert Comment

by:bhanukir7
ID: 22931504
a clone would be a wonderful option but if this is a full clone i think it would simply do a copy of the vmdk file which would again lead to the same issue of 140 gb drive

vmware converter would be a better option i think
0
NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

 

Author Comment

by:aiscom
ID: 22931700
Any ideas on how to use Converter to optimize? I tried running Converter on my current VM and selected remove restore points. No change in the size of the VM on the disk though.
0
 
LVL 23

Expert Comment

by:bhanukir7
ID: 22932135
do you have any backup solution with agents to run backup of the VM a full backup of the VM installing a agent on it
0
 

Author Comment

by:aiscom
ID: 22932398
I do have a backup solution that can create a backup of the disk. You would suggest creating a backup, then a new VM and restore to that VM?

I am getting closer to a possible solution. I used the disk manager command line tool to "convert" the disk to a new Virtual Disk. I then edited the vmx config file and changed the filename of the disk to my new copy. The new copy is about the same size as the disk information.

The VM starts and runs but woudn't login to our office domain. I did not have a local login so I got stumped here. I loaded the original disk, updated the administrator password and am now making another copy (the same way as before) and hoping to get into the XP OS using the admin password instead of a domain login. I am wondering of the disk copy has "deactivated" my copy of Windows and that is why I cannot login to the domain.
0
 
LVL 23

Expert Comment

by:bhanukir7
ID: 22932603
Hi,

When you do a disk copy it does not deactivate if you are using the same VMX file. But if you create another VM this changes the UUID of the VM which would cause the deactivation of license as the license is specific to hardware.

The best is to copy the UUID from the old image and then bring it online.

bhanu
0
 

Author Comment

by:aiscom
ID: 22933149
Turns out the reson I could copy the VM was because I was copying the parent disk of the VM which happens to be about the same size. When I tried with the current disk, the copy failed with not enough space.

I am too troubled with trying a backup and restore to new VM so I think I may just be headed off to find a 500GB drive.
0
 

Author Comment

by:aiscom
ID: 23234377
I have never found a resolution. I added a 500GB drive to the system and ran the shrink successfully. Let this be a lesson to anyone else running these virtual machines. NEVER let VM's take more than 50% of the drive.
0
 
LVL 23

Expert Comment

by:bhanukir7
ID: 23234386
hi aiscom,

if the issue is put to rest then please close the question.

bhanu
0
 
LVL 23

Expert Comment

by:bhanukir7
ID: 23234508
hi

what ultimately resolved the issue was one of the recommendations made. I.e. is to run the shrink on the vm which will reduce the disk space. As you had disk space constraints you had add additional space to be able to shrink the file which answered your question.

Can you please change your comments and close the question saying you could not resolve the issue with the available resources as after adding the additional disk you followed what has been provided as a solution.

I dont worry about the points, you certainly claim a refund of points but dont try to say the solution was not helpful.

0
 

Accepted Solution

by:
aiscom earned 0 total points
ID: 23236517
bhanukir7, your solution to shrink the VM was not the solution to the problem as described. In the original problem I already indicated that I knew to shrink the VM, the problem was that shrink required an equal amount of disk space. I was looking for a solution for what to do if a person does not have that available disk space. I cannot mark "shrinking the disk" as the solution because it would insult a person who found this thread looking for a solution to shrinking the disk without enough space. The appropriate solution is "There is no solution". It can't be done anyway, anyhow. If you have a VM that has grown larger than the available space on the disk, either find another disk or you will eventually run out of space and your VM will be unusable.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

When converting a physical machine to a virtual machine using VMware vCenter Converter Standalone or vCenter Converter Enterprise, if an adapter type is not selected during the initial customization the resulting virtual machine may contain an IDE d…
In this article, I will show you HOW TO: Suppress Configuration Issues and Warnings Alert displayed in Summary status for ESXi 6.5 after enabling SSH or ESXi Shell.
Teach the user how to use create log bundles for vCenter Server or ESXi hosts Open vSphere Web Client: Generate vCenter Server and ESXi host log bundle:  Open vCenter Server Appliance Web Management interface and generate log bundle: Open vCenter Se…
This video shows you how to use a vSphere client to connect to your ESX host as the root user. Demonstrates the basic connection of bypassing certification set up. Demonstrates how to access the traditional view to begin managing your virtual mac…
Suggested Courses

862 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