If you use a distributed virtual switch you can notice that on some of your datastores there is a folder called .dvsData. Why is it created and what it is used for? Here you will find a description of this folder’s role.
As you can see below, a virtual machine called Workstation 1 is connected to the „Virtual machines internal” vdportgroup which in turn is on the vds called simply „ds”.
The VM is stored on the VMFS I datastore:
where one can also see a folder called .dvsData. Let’s have a look inside:
In the .dvsData folder there is a sub-folder which name suits the UUID of the distributed switch:
In this subfolder you will find one more files and their numbers will suit the number of ports the virtual machine(s) is connected to:
That means that .dvsData will appear on the datastore where your VM’s configuration file (vmx) is stored. If you open the configuration file you will find the same information:
This information is synchronized (from vmx to .dvsData folder) by the host every 5 minutes. So now you know what this folder is, why subfolder and files’ names are so strange, etc. But what’s the purpose of the .dvsData folder and its content?
It is used by HA. Imagine the situation when your host fails and HA starts a VM on another physical server. It needs to know which port is should connect the machine to. I did a very simple test – I removed the file called 264 from the datastore and I stopped the ESXi server the VM Workstation 1 was running on. A few seconds later HA detected a possible failure of the host. However this was the result on the VM:
Leson learnt: don’t touch the folder .dvsData unless you really know what you are doing.
PS. As you see all operations in this note were done using the new Web-Client. More on this client soon.