VMware Cloud Community
ldrose537
Contributor
Contributor
Jump to solution

Free space in datastore is lower than it should be

Hello,

I am running VMware ESXi on an HP Proliant DL380 G5 - The datastore has an overall Capacity of 678 GB, with now 34 GB free. I have 5 running VMs:

drive1/drive2

(1) Win2k3: 50/100

(3) Win2k3: 50/50

(1) WinXP: 10

Oh - and two templates, one for the Server (50) and one XP (10)

Yesterday I created a couple of clones of the XP, 1 with Vmkfstools - i and the other with vConverter - mostly for practice, But those are only 10 GB. Before my creations, the free space read roughly 115 GB - Then I noticed it dropped to the now 34GB. I deleted the two new VMs thinking I would get the space back, but no dice. Math is not my best subject, but this doesn't seem to add up. Did I do something wrong, miss something?

Is it possible to get that space back? Before I thought to check with you guys, it occured to me that I could stop all the VMs and restart the Host, but if there's another way, I want to know it.

Linda

0 Kudos
1 Solution

Accepted Solutions
jbogardus
Hot Shot
Hot Shot
Jump to solution

Browse the datastore - go to the 'Home - Inventory - Datastores' view, right-click on a datastore and select browse.

Look at the subdirectory for each VM and determine which seem to have abnormal files of significant size & total size of all files that exceed size of virtual disks assigned to the VM. If you then specify what the names of the files are a plan can be made for how to get rid of them.

View solution in original post

0 Kudos
12 Replies
jbogardus
Hot Shot
Hot Shot
Jump to solution

When a VM is running it creates a swap file in the datastore that is the same size as the amount of memory the VM has been assigned. Add up the amount of memory you have assigned to each VM. Does it roughly equal the amount of disk space you think you are missing?

0 Kudos
jbogardus
Hot Shot
Hot Shot
Jump to solution

Have you taken any snapshots?

When you 'deleted' the VMs did you select 'Remove from inventory' or 'Delete from disk'. "Remove from inventory' will delete them from the VirtualCenter view, but the VMs will still remain in disk. If there are some of these you will need to browse the datastore, find the .vmx file right-click it and select 'Add to Inventory' to get them back in the VC view then do a 'Delete from disk' on the VM.

0 Kudos
ldrose537
Contributor
Contributor
Jump to solution

JBogardus,

...I chose Delete from Disk. The only folders in the datastore remaining are the ones I want.

I haven't taken any snapshots - and there are none in Snapshot manager - but I've come to understand that may not be reliable. Where might I go, or what might I look for to make certain?

Linda

0 Kudos
ldrose537
Contributor
Contributor
Jump to solution

The VMs assigned Memory add up to roughly 3.5 GB -

vm1 - 1 GB; vm2 - 512 MB; vm3 - 512 MB; vm4 - 256 MB

the XP vm is (256), and the templates are (512 and 256) - these three are currently not powered on.

0 Kudos
jbogardus
Hot Shot
Hot Shot
Jump to solution

Browse the datastore - go to the 'Home - Inventory - Datastores' view, right-click on a datastore and select browse.

Look at the subdirectory for each VM and determine which seem to have abnormal files of significant size & total size of all files that exceed size of virtual disks assigned to the VM. If you then specify what the names of the files are a plan can be made for how to get rid of them.

0 Kudos
jbogardus
Hot Shot
Hot Shot
Jump to solution

Typical large files are:

.vmdk - virtual disk. If there are extra ones then it may be due to additional virtual disks being created for the VM temporarily then when they were no longer needed 'remove from VM' being selected rather than 'delete from disk' so the files remain in the VM's directory

-00000x.vmdk - differential file used by snapshots. Since you haven't taken any there shouldn't be any

-Snapshotx.vmsn - memory state save during a snapshot. Again shouldn't be any since snapshots not used

.vswp - swap file. Equal in size to amount of memory assigned to VM (if reservation is 0)

BTW:

Typically a datastore is create for multiple VMs to share and is much larger than 9 GB. For many environments around 300 GB to 500 GB are common datastore sizes.

Typically when VMs are powered on there should remain 10% to 20% free space for snapshots, unless you are sure you won't directly or indirectly have snapshots created on the VMs.

0 Kudos
Sly
Contributor
Contributor
Jump to solution

I had an issue one time where I had less reported free space than was actually available. I could browse the datastore and determine I had 150GB or so of free space but only about 30GB was reported. I called VMware support and they had me putty in and restart one of the hypervisor's services (I don't recall which one). Immediately afterwards I was abe to refresh the console and the sizes matched. If you are having the same issue I would image rebooting the host would do the same thing.

0 Kudos
RParker
Immortal
Immortal
Jump to solution

Did you RESCAN after you deleted? Maybe the space didn't 'refresh'

ldrose537
Contributor
Contributor
Jump to solution

RParker,

I feel foolish asking, but how would I perform a RESCAN?

Linda

0 Kudos
ldrose537
Contributor
Contributor
Jump to solution

jbogardus,

Typical large files are:

.vmdk - virtual disk. If there are extra ones then it may be due to additional virtual disks being created for the VM temporarily then when they were no longer needed 'remove from VM' being selected rather than 'delete from disk' so the files remain in the VM's directory

The *.vmdk files show as I expect, for example: one of the server VMs has two hard disks - disk 1 is configured as 50 GB and shows in the datastore as 524,428,800

-00000x.vmdk - differential file used by snapshots. Since you haven't taken any there shouldn't be any

-Snapshotx.vmsn - memory state save during a snapshot. Again shouldn't be any since snapshots not used

I have neither.

.vswp - swap file. Equal in size to amount of memory assigned to VM (if reservation is 0)

The .vswp file looks as I expect - for example: one of the server VMs is configured for 256 MB and has a size in the data store as 262,144.00 (the name of the file is "<vmName>"-b7d17126.vswp - they're all kind of like that, so I figure that's normal)

BTW:

Typically a datastore is create for multiple VMs to share and is much larger than 9 GB. For many environments around 300 GB to 500 GB are common datastore sizes.

Typically when VMs are powered on there should remain 10% to 20% free space for snapshots, unless you are sure you won't directly or indirectly have snapshots created on the VMs.

The datastore is 678.75 GB

Thanks for the breakdown.

Linda

0 Kudos
ldrose537
Contributor
Contributor
Jump to solution

Jbogardus,

I need glasses.

It turns out there was an extra - unused .vmdk/-flat.vmdk file in one of my VMs folders that I didn't notice the first time. I made certain that it wasn't being used. Copied them, just in case - and tossed 'em. VM is up and running, no problem.

I feel a tad stupid that I missed it the first go round - sorry.

Thanks for the help!

Linda

0 Kudos
ldrose537
Contributor
Contributor
Jump to solution

RParker,

In VMware Infrastructure Client - Host/ Configuration tab, under Storage - there is an option "Refresh." I'm not saying I never noticed it before, but I didn't give it two thoughts. I'm a Windows gal, "Refresh" to me, is for screen refresh - the term or option I was looking for was RESCAN for hard disk stuff. But Refresh worked. Even before I found the extra *.vmdk files - I clicked Refresh and regained the couple of GBs from my XP VMs.

Thanks for the help!

Linda

0 Kudos