VMware Cloud Community
bnk
Contributor
Contributor

Ghost vm´s on emtpy datastore

I have storage migrated all our virtual machines from a datastore. It is now empty execpt from the .dvsData folder. When I through vCenter tries to se which virtual machines are on the empty datastore it still says that there is 6 virtual machines???

All 6 vm´s do not have any cd mounted.

I need to delete the empty datastore vmfs3 so i can create a new vmfs5 datastore.

But I do not konw if it is safe to do when vCenter thinks that there still are 6 vm´s on the datastore.

Does anyone know how I can get rid of the ghost vm´s on the empty datastore.

Is it safe to delete the .dvsData folder on the empty datastore?

0 Kudos
8 Replies
iw123
Commander
Commander

Hi,

Yes, once the datastore is empty of VMs it is safe to delete the .dvsData folder - see this KB for more info on that - http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=101839...

*Please, don't forget the awarding points for "helpful" and/or "correct" answers
0 Kudos
bnk
Contributor
Contributor

Hi

I read the link you posted and it says:

"When performing VMFS maintenance, ensure that no virtual machines on this datastore are registered in vCenter. After you do this, you can safely remove the .dvsData folder and sub folders."

In my case virtual machines are still registered in vCenter even though the datastore is empty????

So I assume that it is not safe to remove the .dvsData file?

0 Kudos
iw123
Commander
Commander

Yes, as I said - once the datastore is empty of VMs it is safe to remove .dvsdata - not until then. What do you see on the datastore if you browse to it from an SSH session?

*Please, don't forget the awarding points for "helpful" and/or "correct" answers
0 Kudos
bnk
Contributor
Contributor

Hi

When I browse through ssh the datastore is empty.

The problem is that vCenter still thinks that there is 6 vm´s in the datastore.

That is when i choose "Datastore and Datastore Clusters" and then select the tab "Virtual Machines"

Here it shows 6 vm´s ???

0 Kudos
a_p_
Leadership
Leadership

Do these VM's have active snapshots? In this case you may want to delete the snapshots. Maybe something was mounted to the VM when the snapshots were created!?

André

0 Kudos
Kahonu84
Hot Shot
Hot Shot

Can you remove them from your inventory?

0 Kudos
bnk
Contributor
Contributor

Yes, I can remove them from inventory.

I tried to remove one vm and then added it to inventory again, but it did not fix the problem?

0 Kudos
nshetty
Enthusiast
Enthusiast

If you have svmotioned all the VMS from one datastore to another and u see all the VMs running on the destination datastore Then you need not have to worry abt the stale entries on the source datastore.

If you do not need the VMs on the source datastore then you could delete the VMs by performing a delete operation from the GUI or could delete all the files from the command line.

# rm -rf dvsdata

If you have any questions please feel free to respond.


--NS

0 Kudos