How do I give label to vSwitches on VMWare?

7,003

Solution 1

This is not possible using the UI.

On the CLI:

Create a new Switch with a name:

esxcli network vswitch standard add --vswitch-name=vSwitch

Rename an existing switch:

According to: http://www.cyberfella.co.uk/2012/04/11/rename-vswitch/

/etc/vmware/esc.conf

/net/vswitch/child[0001]/name = “vSwitch4“

Solution 2

There is no need to rename your vSwitches. It is not a common practice (hence the omission from the GUI and the difficulty you're having).

This is mainly because the actual Portgroup names are what matter from a VM and clarity perspective. See below.

enter image description here

enter image description here

Share:
7,003
Abhishek Sha
Author by

Abhishek Sha

Engineering Student in the field of Information Technology, with a knack for anything related to the technology, computing, programming, gaming and gadgets. So yes, I am a geek and I often get asked to fix computers. I am a self learner and I like to learn by hacking. Not a great coder, but anything I code is done with passion for that technology and not just because I have to or I can do. I love the concept of creating rich experiences and making life a whole lot easier by instructing the machine to your whims and fancies. Application Developer for the Windows 8 and Windows Phone platforms and a Microsoft Student Partner. I own an Droid and hence most of life would already be wasted flashing new ROMs and restoring backups iPhone 5. Avid Twitter-er too and all around a nice person. Oh, and an extremely proud owner of the PlayStation 3 and the Google Nexus 7. Also I love these genre of games - RTS, Action, FPS and Simulation. You can follow me on: Twitter Facebook Google+ OR PM: [email protected] (Actually, you'd better follow me on Twitter!)

Updated on September 18, 2022

Comments

  • Abhishek Sha
    Abhishek Sha over 1 year

    I've searched extensively trying to name the vSwitches that I create, but all I can name them are "vSwitchX" where x= some number. How do I give these switches names? I'm using the Web Client.

    Thanks!

  • Abhishek Sha
    Abhishek Sha about 10 years
    What's the reason we give hostnames to Cisco Switches? We can also add a description to each of the interfaces, right? -.- I have many vSwitches. I would like to group the Portgroups together on one Switch and name it, so it becomes much easier to navigate than break my head on which vSwitch did I keep that port group. Moreover, if you have about 10 vSwitches and you delete some in the middle, the continuity in the naming is broken.
  • ewwhite
    ewwhite about 10 years
    @AbhishekSha But it's really not the right way to do this... It's not common to have lots of vSwitches either :(
  • ravi yarlagadda
    ravi yarlagadda about 10 years
    @AbhishekSha I agree, I'd bet there's something you can change in your architecture to make things much more manageable without naming the vSwitches; if you need those, then something's probably wrong.