Posted in: Networking, VMware

vDS Out of Sync

This blog is focused on rectifying the vDS and making it in sync state.

First, please you are not hitting a known BUG in vDS 6.6, check VMware Release Notes.

You might see below warning in summary page of vDS

The vSphere Distributed Switch configuration on some hosts differed from that of the vCenter Server

If you see the error:
A specified parameter was not correct. vlanSpec

To workaround the issue, ensure that the vpxd cache value is set to 9223372036854775807.

To set the vpxd cache on vCenter Server:

Connect to vCenter Server using the vSphere Client.

Go to Administration > vCenter Server Settings > Advanced Settings.
Set VirtualCenter.CacheSize to the value 9223372036854775807.


Restart the VMware VirtualCenter Server service.

If its a general vDS out of sync and you do not see any errors at all

You need to clean the port in VCDB manually. Here are the steps:

(1) Record the out of sync ports in UI OR connect to VCDB as mentioned here
and run below commands


# select * from vpx_dvhost_out_of_sync;

This will give you all the ports which are currently out of sync

VCDB=# Select * from vpx_dvhost_out_of_sync;
dvs_id | host_id | property_name
--------+---------+--------------------------------
2961 | 2883 | vNetwork Distributed Port:243
2981 | 2944 | vNetwork Distributed Port:1962
(2 rows)


If you are checking this via UI on vSphere Networking. You will entry similar to below:

DVS-VMTEST-TL-DR

Host: test1.dummyhost.com

Parameters
vNetwork Distributed Port:237
vNetwork Distributed Port:224
vNetwork Distributed Port:238
vNetwork Distributed Port:236
vNetwork Distributed Port:243


DVS-VMTEST-TL-AC

Host: test2.dummyhost.com

Parameters
vNetwork Distributed Port:1238
vNetwork Distributed Port:1220
vNetwork Distributed Port:989
vNetwork Distributed Port:1166
vNetwork Distributed Port:743
vNetwork Distributed Port:2113
vNetwork Distributed Port:510
vNetwork Distributed Port:1076
vNetwork Distributed Port:742
vNetwork Distributed Port:737
vNetwork Distributed Port:1022
vNetwork Distributed Port:2722
vNetwork Distributed Port:991
vNetwork Distributed Port:985
vNetwork Distributed Port:2724
vNetwork Distributed Port:1977
vNetwork Distributed Port:566
vNetwork Distributed Port:689
vNetwork Distributed Port:1962


(2) Check whether the connectee VM is still running on host in this datacenter.
(3) Backup VCDB and stop vpxd.
(4) For each port, execute the following DB command (Please note you need to replace the dvs_id and dvport_key):


UPDATE vpx_dvport SET link_up=NULL, link_blocked=NULL, proxy_host=NULL, trunk_mode_flg=NULL, connection_cookie=NULL, connectee=NULL, connectee_type=NULL, connectee_nic_key=NULL, persistence_location=NULL where dvs_id=’YOUR_DVS_ID’ and dvport_key=’YOUR_DVPORT_KEY’;

Taking above output as example your command would be:

# UPDATE vpx_dvport SET link_up=NULL, link_blocked=NULL, proxy_host=NULL, trunk_mode_flg=NULL, connection_cookie=NULL, connectee=NULL, connectee_type=NULL, connectee_nic_key=NULL, persistence_location=NULL where dvs_id='2961' and dvport_key='2883';

You have to run this for every port which is out of Sync by running above command. In this case 2 times (as seen in VCDB command) and 24 times as seen in UI.

(5) Start vpxd, and wait for 15 minutes for VDS to sync with vCenter.

Please Note:- The VCDB output and UI output mentioned above is from 2 different lab environments. Hence the number of output is different. In your case you will see same number of output for both UI as well as VCDB.

Comments (2) on "vDS Out of Sync"

  1. I had tried everything but nothing resolved the issue. I wanted a solution with out any impact. These steps really solves the vds out of sync issue. And make your host compliant again.

  2. Like!! I blog frequently and I really thank you for your content. The article has truly peaked my interest.

Comments are closed.

Back to Top