Link to home
Start Free TrialLog in
Avatar of sirius7
sirius7Flag for United States of America

asked on

How do shrink or remove files safely from my vm files?

I have a vmware server 2.0 running on a windows 2003 server and the files are out growing the host drive. I want eliminate some of the files but when I remove even one the vm won't boot and the file it is requesting access is not the file I deleted but a diff vm. The host server keeps running out of virtual memory even during boot.
Avatar of Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Flag of United Kingdom of Great Britain and Northern Ireland image

Do you use Snapshots? Check Snapshot Manager?

Background reading of Snapshots....


A snapshot is NOT a backup of a VM; that is a gross misconception.  

A snap shot is a way to preserve a point in time when the VM was running OK before making changes. A snapshot is NOT a way to get a static copy of a VM before making changes.  When you take a snapshot of a VM what happens is that a delta file gets created and the original VMDK file gets converted to a Read-Only file.  There is an active link between the original VMDK file and the new delta file.  Anything that gets written to the VM actually gets written to the delta file.   The correct way to use a snapshot is when you want to make some change to a VM like adding a new app or a patch; something that might damage the guest OS. After you apply the patch or make the change and it’s stable, you should really go into snapshot manager and delete the snapshot which will commit the changes to the original VM, delete the snap, and make the VMDK file RW. The official stance is that you really shouldn’t have more than one snap at a time and that you should not leave them out there for long periods of time. Adding more snaps and leaving them there a long time degrades the performance of the VM.  If the patch or whatever goes badly or for some reason you need to get back to the original unmodified VM, that’s possible as well.  

I highly recommend reading these 2 articles on VMware Virtual Machine Snapshots:

Understanding Snapshots - http://kb.vmware.com/kb/1015180
Snaphot Best Practices - http://kb.vmware.com/kb/1025279

Also check out the following Snapshot Articles by Eric Siebert

Pt.1- http://is.gd/Lajg4p
Pt.2- http://is.gd/NdKQWC
Pt.3- http://is.gd/tp2vEK
Avatar of sirius7

ASKER

User generated image
i understand the snapshot deal. included pic of files after i created a snapshot todate
Avatar of sirius7

ASKER

tried deleting some files but no matter which one I delete the vm wont start without it
Can you start the VM?

What error message do you get?
Avatar of sirius7

ASKER

Just Deleted the snapshots. When I delete file mailsever-1 then it can't find mail server-1-0000
Can you start the VM?

Please do not delete files, this is dangerous and you may lose data and the VM.
what files have you deleted, and before you started randomnly deleting files, did the virtual machine startup and power on correctly?
Avatar of sirius7

ASKER

It can power up, but the host has 50 mb of hd space left
Avatar of sirius7

ASKER

Wasn't permanently removing them just moving out of datastore folder
The only way to remove a Snapshot, is to Delete them from the Menu.

Select Snapshot Manager, and Delete the Snapshot there.
Avatar of sirius7

ASKER

I did, but I am still left with the space issue. I now have 75mb of hd space on the host. I have to beagle to get rid 1 of these files. Some of them have not been used since may of 2011. Can't I edit the vmx config file?
Do any snapshots show in the Snapshot Manager?

If not, complete the following:-

1. Create a new snapshot wait 60 seconds
2. Delete the snapshot.

this can be done when the VM is off.

Do you have any snapshots left in the folder?
Avatar of sirius7

ASKER

No snapshots left. I deleted thru the vm mgr
okay, do you still have snapshot files growing on the disk though

sometimes you can have snapshots that are not listed.

complete this.

1. Create a new snapshot wait 60 seconds
2. Delete the snapshot.

this can be done when the VM is off.
Avatar of sirius7

ASKER

I made sure that all files are visible and no other snapshots. Followed your instructions and no there are no Snapshots, but I'm still not able to remove any files. I need to find a way to shrink or remove some of these files
also how many disks attached to the VM, and screenshot of ALL disk settings in VM
Avatar of sirius7

ASKER

User generated image
When you say disks attached to the vm (please be patient w/me) your referring to how many hard drives does the vm have? and disk settings? When you say disk settings are you referring to the vmx settings?
vm is still running on snapshot.

you will need to use VMware Converter to complete a V2V which will create a new VM without this issue.
Avatar of sirius7

ASKER

While doing as you asked I did begin to notice some differences as you will once you have viewed the excel file. Also I noticed some files not listed in the vmx files. But when I remove lets say the mailserver-1.vmdk the vm cant start and it states it cant find the MailServer_2-000001.vmdk. Of course I placed it back & no wit runs. But Im running out of files to delete

 vmsinfo.xlsx
Avatar of sirius7

ASKER

I dont have any space to run the converter. in fact I had to uninstall it for space.
Avatar of sirius7

ASKER

The total size of the vm folder is 336GB. Its an exchange server back-end. A vm that size will be converting for awhile. I cant afford to be offline which is why Im a lil nervous, but there is no way to edit the vmx either?  Should I create another vm to offload the work then convert?
Avatar of sirius7

ASKER

can i add a usb storage device and make it a datastore then move the vm to it and have the vmware server 2.0 read from it?
USB would be very slow.

I'm afraid those are you options, increase host datastore space, or use Converter.

YOU CANNOT REMOVE ANY FILES.
YOU CANNOT DELETE ANY FILES.

Currently the VM is in snapshot mode, and writing to snapshot disks, that will continue to grow and fill up the disk..
Avatar of sirius7

ASKER

How do I snapshot mode?
Avatar of sirius7

ASKER

Stop snapshot mode
It does not look like you can.

We've tried.

Avatar of sirius7

ASKER

the host is on a dell poweredge 2850 with 6 scsi disks. I want to switch out one of the drives for a much larger drive so I can havce space to convert it. Any ideas?, but Im a little concerned that I will pull wrong the drive and it wont work.
You need to raise a new question on swapping drives.
ASKER CERTIFIED SOLUTION
Avatar of Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sirius7

ASKER

cant go wrong listening to this guy