I have a couple of VMs which according to vCenter are present in multiple datastores. In all cases one datastore would be showing used space 0.00 B of xx.xx GB.
Is there a way to fix this? All I can think of is that at some point the VM could have been migrated from one datastore to another. It's never been renamed; one of the datastores holds no files as below...
vCenter 5.5.0 2183111
ESXi 5.5.0 2456374
latest vm hardware compatibility and tools.
This is what is visible on the summary page for the VM:
but if you examine both datastores - the VM is only present in datastore 4:
~ # ls -la /vmfs/volumes/ESXi1-datastore4/dc1
total 13286440
drwxr-xr-x 1 root root 4480 Mar 25 08:34 .
drwxr-xr-t 1 root root 1820 Mar 23 10:17 ..
-rw------- 1 root root 134344704 Mar 6 18:42 dc1-000001-delta.vmdk
-rw------- 1 root root 310 Mar 6 18:38 dc1-000001.vmdk
-rw------- 1 root root 1895952384 Mar 24 15:16 dc1-000002-delta.vmdk
-rw------- 1 root root 343 Mar 24 15:03 dc1-000002.vmdk
-rw------- 1 root root 50458624 Mar 25 09:14 dc1-000003-delta.vmdk
-rw------- 1 root root 317 Mar 25 08:34 dc1-000003.vmdk
-rw------- 1 root root 16904192 Mar 24 15:17 dc1-000004-delta.vmdk
-rw------- 1 root root 317 Mar 24 15:17 dc1-000004.vmdk
-rw------- 1 root root 28969 Mar 6 12:35 dc1-Snapshot1.vmsn
-rw------- 1 root root 29000 Mar 6 18:47 dc1-Snapshot2.vmsn
-rw------- 1 root root 32015 Mar 24 15:17 dc1-Snapshot3.vmsn
-rw-r--r-- 1 root root 120 Mar 24 15:17 dc1-aux.xml
-rw------- 1 root root 2147483648 Mar 25 08:34 dc1-bbbf052e.vswp
-rw------- 1 root root 64424509440 Mar 6 12:35 dc1-flat.vmdk
-rwx------ 1 root root 290136 Mar 24 15:17 dc1-vss_manifests3.zip
-rw------- 1 root root 8684 Mar 25 08:35 dc1.nvram
-rw------- 1 root root 540 Mar 6 11:01 dc1.vmdk
-rw-r--r-- 1 root root 1245 Mar 24 15:17 dc1.vmsd
-rwxr-xr-x 1 root root 3536 Mar 25 08:34 dc1.vmx
-rw------- 1 root root 0 Mar 25 08:34 dc1.vmx.lck
-rw-r--r-- 1 root root 3258 Mar 24 15:17 dc1.vmxf
-rwxr-xr-x 1 root root 3535 Mar 25 08:34 dc1.vmx~
-rw-r--r-- 1 root root 554141 Mar 6 12:35 vmware-3.log
-rw-r--r-- 1 root root 225262 Mar 6 18:36 vmware-4.log
-rw-r--r-- 1 root root 160708 Mar 6 18:42 vmware-5.log
-rw-r--r-- 1 root root 219307 Mar 16 11:21 vmware-6.log
-rw-r--r-- 1 root root 245326 Mar 24 15:17 vmware-7.log
-rw-r--r-- 1 root root 214032 Mar 24 16:19 vmware-8.log
-rw-r--r-- 1 root root 192487 Mar 25 08:35 vmware.log
-rw------- 1 root root 114294784 Mar 25 08:34 vmx-dc1-3149858094-1.vswp
datastore 3 holds nothing and I am certain this VM has never been renamed etc.
~ # ls -la /vmfs/volumes/ESXi1-datastore3/dc1
ls: /vmfs/volumes/ESXi1-datastore3/dc1: No such file or directory
Based on the list of files, your VM is running from snapshot and maybe the state of virtual machine before take the snapshot was using the ISO on the old datastore. If you can, try removing the snapshot and the reference to the old datastore will be removed.
is there a ISO mounted? if yes, you see the datastore in the summery where de iso is located
Thanks Bruno,
I would have used an ISO to install the OS and yes ISOs are stored in a folder in datastore3, but there is not one presently mounted so not sure why that data store is still being listed...
on the CD Drive you have to select Client Device. Is it selected? have a look on my print screen
yes. client device is selected.
You probably have a snapshot with a mounted ISO.
Based on the list of files, your VM is running from snapshot and maybe the state of virtual machine before take the snapshot was using the ISO on the old datastore. If you can, try removing the snapshot and the reference to the old datastore will be removed.
thanks. deleting the old snapshots did the trick indeed.
Thanks to brunofernandez1
on the CD Drive you have to select Client Device.