4 Replies Latest reply on Jan 19, 2015 2:39 AM by vfk

    renaming vswitch0 using esxcli

    mag2sub Novice

      Inherited a  pacthwork esx install done using " interactive" process with esx shell enabled ....how do go in and cleanup/modify the default configs in place in terms of  naming convention etc ?


      For instance the interactive process followed by DCUI had created the vSwitch0 (managment network) .. and now would like to go in the esx shell and rename /clean


      i am aware of esxcli commands to add vswitch, adding port groups adding uplinks, add vmk0,ip  etc ...but how do i just rename a existing vswitch0 to a more meaningful name using the shell ?


      Thanks and appreciate as newbie

        • 1. Re: renaming vswitch0 using esxcli
          MKguy Virtuoso

          As far as I'm aware there is no option to rename an existing Standard vSwitch on the fly, neither through esxcli nor through esxcfg-vswitch (or vim-cmd). You will probably have to re-create the vSwitch on the shell to rename it. The GUI doesn't even allow you to configure a customg Standard vSwitch name upon creation, so I don't really see what your colleague supposedly did wrong here.


          You could maybe poke around in the /etc/vmware/esx.conf file but I don't really see the point of bothering at all instead of using the default naming scheme of vSwitch[number]. You still have the port group names and hopefully a thorough documentation.

          • 2. Re: renaming vswitch0 using esxcli
            aaronwsmith Hot Shot

            vSwitch0 is a standand naming convention for standard virtual switches.  Only way to rename it is to modify the esx.conf file, then reboot the host to make the change effective.  But this is not supported, and if host is managed via Auto Deploy (assuming this is a possibility since you're posting to ESXi 5 discussions), the changes will be gone after rebooting the host anyhow (unless if host profile is updated as well to support changes made...)

            • 3. Re: renaming vswitch0 using esxcli
              sunhero Lurker

              if you have one of the host with the target switch name, let try to create a host profile and apply it to the ESX with old name.

              it's work

              • 4. Re: renaming vswitch0 using esxcli
                vfk Expert

                I agree with MKguy - your best approach it recreate the the vswitch through cli, there is a very little gain in changing the default name.