vShield is a very nice soft but one can admit that sometimes, it can be really paintfull to modify some item configuration.
In this post, we will see how to modify the MTU of a dvSwitch that is being used in a Network prepared cluster.
The procedure consists of three steps :
Retrieving dvSwitch configuration
Updating dvSwitch configuration
Installing Firefox Rest Client
Several tools exist for this but when I first worked on this topic, I used the Firefox Rest client. You can find it here.
Once downloaded, we have to deploy it.
More than easy :
The plugin is now available :
If you get the message below after selecting the XPI file :
– Edit Mozilla configuration file and replace the line « lockPref(“xpinstall.enabled” ,false) » by « lockPref(“xpinstall.enabled” ,true) ».
– Save the file.
– Replay the Add-on installation step.
Load your RestClient
You should get this page :
Now, configure the header of your requests by setting an authentication profile :
In my case, I choose vShield local admin account
You can now see the authentication information in the header panel
Once done, you can run GET requests.
Let’s retrieve the ID of the dvSwitch we want to reconfigure.
|As we will need right after to send a XML request, I higly suggest to copy the content of the vdsContext tag.
Doing so, you should get :
To reconfigure a setting we have to use another REST method, PUT*.
To do so, we first have to add another information in the request header, the format we’ll use to send the data.
|* In REST language, several methods are supported depending on the URi you are working with. The main four are : GET, PUT, POST, DELETE
GET helps in getting information
PUT, in modifying an existing entry
POST, in adding a new entry
DELETE, in deleting an existing entry.
Headers must have changed
The header is now ready, let’s prepare the update request.
In the REQUEST panel :
|Your XML should look like this :
Press “SEND” to execute the query and verify the status code in the tab “Response Headers”, it must be “200 OK”.
|Another way to check the new MTU :
Via CLI command, on each ESX attached to the dvSwitch : esxcli network nic list
Check the MTU for the NIC attached to the dvUplink participating to VXLAN.
If you are wondering if the procedure described is reusable with NSX, the answer is NO.
The PUT request does not work, actually it is even not supported.
BUT, you can easily change the MTU thanks to your vSphere Web Client.
From the Network view, just edit the settings of your dvSwitch and change your MTU.
Leave a Reply