Manage Learn to apply best practices and optimize your operations.

What I learned yesterday: DvSData Folder,View all IPs, Sysprep & Guest Customization

Explains how to use DvSData Folder, View all IPs, and Sysprep & Guest customization.

 Here’s what I learned yesterday.

What is the DvSData Folder?

If you are using DvSwitches you might notice on one of your shared VMFS volumes a .DvSData folder like so:

I was prompted to investigate further via an email from Jeremy Waldrop of asking me what the heck this folder was for. In truth I wasn’t 100% sure, pretty clearly it has something to do with DvSwitches, and the fact that although DvSwitches are configured in vCenter fundamentally where they stored/live/do there work is down to the ESX hosts. After all that’s where the physical VMNICs are. 

I figured some of my colleagues on the private trainer forum had probably come across this – so forum-whacked there. Here’s what the DvSdata folder is all about (by the way this is a cut and paste job, because I can’t think of more succinct way of putting this!)

“DVS switches create a “hidden vSwitch” on each ESX host. This enables the ESX host to continue to use the DVS switch even if the vCenter Server goes down. The data that describes DVS is stored automatically on each ESX host in some shared storage location. The actual location is chosen automatically. One of the things can do is use the net-dvs command to locate where in shared storage information on a particular DVS is. Here is a sample though. Early in the net-dvs output it correlated the HEX code for the DVS switch with the switch name:


There is also a local copy of the DVS information on each ESX host located at /etc/vmware/dvsdata.db. This is a binary file (database) that can be dumped with the net-dvs command and the “-f” switch. This information can also be grabbed with the vm-support command.
Finally. It is possible for the DVS data and the ESX host data to get “out of sync”. When that happens it may be impossible to modify certain ports or switches – even legacy vSwitches – on an ESX host. There was a draft KB on this — kb1010913 – which has now been released:
What I love about this little fact is this. Very often I learn something new, when some one asks me a question I’ve never heard of before or about a situation I’ve never seen before I love it when students ask me a question I have no answer to because it triggers/forces me to find out for them, which then is added to my personal KB system in my brain. Rather than being intimidated by questions I don’t know the answer to – I see them as an opportunity to learn more…

View all IPs of VM:

This has probably been around for years and years, but its new to me. I frequently give some of my “core” VMs multiple IP addresses. I don’t want to get into the ins and outs of why I do this – but I do. Sometimes I forget what IPs I’ve assigned to which VMs. I don’t have many “core” VMs that I do this to (about 8) but the number of IPs is growing. I'm a bit lazy and I’ve never listed these in a spreadsheet. Previously, I would remote console to a VM and do ipconfig /all completely unaware that in vCenter4 their is a View All button that will show you all the IPs assigned:

Of course, if I want to list all my IPs in use (perhaps to put together that spreadsheet I should have) a bit of PowersHell might be handy too:

Get-VM | select name, @{Name=”IP”; expression={foreach($nic in (Get-View $_.ID) {$nic.ipAddress}}}

Sysprep.inf & Guest Customization:

This is one I’ve known for a while but never bothered look into – re-using the sysprep.inf file create a guest customization profile. I always create a new guest customizations by running through the wizard and saving them at the end. I’ve never just created the guest customization by scratch, and that’s where I saw the sysprep.inf option. Why is this handy? Well, the guest customization wizard only handles a fraction of your deployment needs. Unless your using View3 “Linked Clones” which can add virtual desktops to the right OU, if you're using ordinary template deployments, all your new virtual desktops get dumped in the default computers container. Well, not if you use a sysprep.inf file which supports computer account placement!


This was last published in July 2009

Dig Deeper on Scripting administrative tasks

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.