Link to home
Start Free TrialLog in
Avatar of gateguard
gateguard

asked on

I have too many VMDK files on an ESXi VM.

I created a Server 2012r2 VM on ESXi 5.5 and chose a 60gb thick drive for the OS.

Next I added a 400GB thin drive to use as a d-drive in windows.

Later I decided to add a 3rd drive, a 200GB thick drive as an e-drive in windows.

I decided I didn't want the d-drive (400GB thin) and copied all its files to the e-drive, removed the d-drive from Windows partitions (took it offline), shut down the VM, removed the 400GB hard drive from settings, and then browsed the datastore and deleted the vmdk file associated with that 400GB hard drive.

I booted back up, looked in windows, everything looking good and normal.  No d-drive, e-drive with all the files I put on it and 200GB.

But when I look in the datastore, I see three VMDK files: one 60GB file (my operating system c-drive), and two 200GB vmdk files (one with a _1.vmdk in the name).

With the VM offline I uploaded the entire folder to a windows drive and verified that the files really are that size and taking up that much space.

So I have ONE 200GB hard drive and TWO 200GB vmdk files associated with that hard drive.

What's going on here and how do I fix this?

Thanks.
SOLUTION
Avatar of Zephyr ICT
Zephyr ICT
Flag of Belgium 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 Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Did you actually use the option, Remove Hard Disk from virtual machine and delete from disk?

otherwise the virtual machine disk, would have been removed from the virtual machine but not deleted from the datastore.

Check in your VM Settings, what actually disks are being used, and then remove them virtual disks from the datastore using the datastore browser in the vSphere Client.
Avatar of gateguard
gateguard

ASKER

As far as I remember I did use the option, Remove Hard Disk from virtual machine and delete from disk.

What's weird is the byte count is exactly the same for the two vmdk files, 209,715,200,000, so it seems unlikely that one is the remnant of the 400gb original file.  Somehow I asked for one 200gb drive, got one 200gb drive and ended up with two 200gb files.

In settings I show only two drives: 60gb and 200gb, both thick provisioned.

Anyway, I'll try the suggestion of connecting one of the files to a different VM to see what's on it, but first I want to point out something interesting:

As I said, I downloaded the whole folder to a windows machine (using the datastore browser) and if I do a dir in windows, here are the files I get:

04/13/2014  06:05 AM    <DIR>          .
04/13/2014  06:05 AM    <DIR>          ..
04/13/2014  05:12 AM                13 vm100-aux.xml
04/13/2014  05:12 AM                73 vm100-ee8eb13e.hlog
04/13/2014  05:12 AM    64,424,509,440 vm100-flat.vmdk
04/13/2014  05:00 AM             8,684 vm100.nvram
04/13/2014  05:12 AM               501 vm100.vmdk
04/13/2014  05:00 AM                43 vm100.vmsd
04/13/2014  05:00 AM             3,567 vm100.vmx
04/13/2014  05:12 AM             3,240 vm100.vmxf
04/13/2014  05:38 AM   214,748,364,800 vm100_1-flat.vmdk
04/13/2014  05:38 AM               504 vm100_1.vmdk
04/13/2014  05:12 AM         1,459,396 vmware-14.log
04/13/2014  06:05 AM           229,640 vmware-15.log
04/13/2014  05:12 AM           172,316 vmware-16.log
04/13/2014  05:12 AM           223,860 vmware-17.log
04/13/2014  05:12 AM           225,826 vmware-18.log
04/13/2014  05:12 AM           222,424 vmware-19.log
04/13/2014  05:12 AM           222,233 vmware.log
04/13/2014  06:05 AM   214,748,364,800 vmapp-flat.vmdk
04/13/2014  05:38 AM               478 vmapp.vmdk

This machine (named vmapp) was originally cloned from a machine named vm100.  

In the windows download of this folder, the file size is 214,748,364,800, not 209,715,200,000.

But that's not the interesting thing.  The interesting thing is those two files are exactly the same size.

And BTW, there are no snapshots.  I may have used snapshots at one point (can't remember with certainty now because I was working on several VM's at the same time) but if I did, they are all deleted.

Thanks for your help on this.
Check the VM Current Properties and Settings, if the disks in use are these?

vmapp-flat.vmdk - this could be a different VM? as the name is different ?

vm100 ?
This was a clone of another machine, vm100, and the original files had that other machine's name (by clone I mean I copied the files to another location and opened a new vm using them).

Then I added the new drive under the NEW machine's name (vmapp).  that's how there are two different names.

But there's only one vm: vmapp.

vm100 is not using these files.

Thanks.
ASKER CERTIFIED SOLUTION
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
I did just delete the extra file and everything is fine.

Thanks for all your help.