I have seen some information flying around today regarding vDS switches, what is the .DvsData folder and what happens with the loss of vCenter. Some information regarding vDS is listed below:
1. Each ESX host keeps local database that describes vDS /etc/vmware/dvsdata.db. This allows the ESX host to run vDS as a simple vSwitch, when vCenter is down There is an unsupported tool to display contents of this database /usr/lib/vmware/bin/net-dvs
– The dvsdata.db file only holds information that doesn’t have to be shared across esx hosts, this will include local switch configuration (uplinks etc.) as well as configuration for dvPorts that host vnics (mgmt, vmotion and FT) connect to.
2. There is .DvSdata folder, which as I understood holds the information about virtual switches, which is synchronized with all ESX hosts, which are using this switch.
– The folder contains information about ports relating to the vm vnics. Ports connected to vnics will have their state persisted in the same datastore dvsData folder as the VM’s working directory. The idea is that when there is an HA failover HA will load the same port configuration (by reading the port file on disk) on the failover host before powering on the VM. This assumes that the port data needs to be visible on both the primary and failover host. Given that the VM itself resides on the datastore and thus needs to be visible to both the primary and the failover host this assumption is valid.
Some FAQ’s on vDS that you may be interested in.
1. How is the VMFS volume which is used to store .DvSData is chosen? (for example we have 5 VMFS volumes available to the whole cluster)
– If there is a VM that has its working directory on a datastore and is using dvs, we will create a dvsData file there.
2. Can we have more than one .DvSdata file (for example we have in the cluster only 2 VMFS volumes accessible to subset of cluster nodes each)?
– Each ports configuration exists in only one folder. If we do a storage vmotion the persistence location of the port configuration will also change.
3. Why .DvSdata have a folder for the each host in cluster? Does this tree ( .DvSdata and subdirectories) guarantee that vDS configuration on the each host in cluster is the same?
– There is only VM related port configuration in the shared datastores. It does not have any configuration that is host specific.
4. When the host which was previously in a cluster is powered on and joins the cluster (or not) then it first checks the local /etc/vmware/dvsdata.db then finds the pointer to its .DvSdata and then checks whether his local /etc/vmware/dvsdata.db is up to date. Is that correct?
– The /etc/vmware/dvsdata.db contains information that is local to the host i.e. host vnics and uplinks and base vswitch configuration. The reason this is persistant locally is that this might be required to bootstrap the system to be able to talk to VC.
5. .DvSdata should be moved, when all VMs leave the VMFS volume.
-If there are no VMs on the datastore that are using dvs then yes the folder should be removed.
I deleted all VMs from a datastore and still .Dvsdata folder residing on ESX host.