VMware
 

Knowledge Base

Search the Knowledge Base:

Products:
Search In:
 

Recreate Service Console Networking from the Command Line

Details

You may experience the following symptoms:

  • The Service Console loses connectivity
  • Due to misconfiguration of service console network connection fails
  • An additional NIC is added to ESX host

Solution

To delete and recreate a virtual switch and Service Console with the command line:
 
NoteOn your system the vswif, vmnic, vSwitch numbers and network settings are different. 
  1. Run the following command to list the name of the vswif adapter:

    esxcfg-vswif -l

  2. Run the following command to delete the vswif adapter:

    esxcfg-vswif --del vswif0

  3. Run the following command to list the name of the vSwitch:

    esxcfg-vswitch -l

  4. Run the following command to delete the vSwitch:

    esxcfg-vswitch -d vSwitch0

  5. Run the following command to create the vSwitch:

    esxcfg-vswitch -a vSwitch0

  6. Run the following commands to create default port groups for vSwitch:

    esxcfg-vswitch -A "VM Network" vSwitch0
    esxcfg-vswitch -A "Service Console" vSwitch0

  7. Run the following command to create the vswif adapter:

    esxcfg-vswif --add --portgroup "Service Console" --ip=nnn.nnn.nnn.nnn --netmask=255.255.255.0 vswif0 

  8. Run the following command to verify that the settings in the network file are correct:

    cat /etc/sysconfig/network

    NETWORKING=yes
    GATEWAYDEV=vswif0
    HOSTNAME=host.domain.com
    GATEWAY=nnn.nnn.nnn.nnn

  9. Run the following commands to list all of the network adapters and associate a vmnic which has a link status of up:

    esxcfg-nics -l
    esxcfg-vswitch -L vmnic1 vSwitch0

  10. Run the following command to verify that the vmnic is associated with the vSwitch:

    esxcfg-vswitch -l

  11. Ping an IP address to check for network connectivity. If the ping fails remove the previous vmnic from the vSwitch and try another adapter that has a link status of up.

    esxcfg-vswitch -U vmnic1 vSwitch0
    esxcfg-vswitch -L vmnic2 vSwitch0

  12. Run the following command to change the vlan ID of a vSwitch

    [root@server root]# esxcfg-vswitch -p "VM Network 1" -v 10 vSwitch0


  13. If you make any manual changes to /etc/sysconfig/network, run the following command to restart the network service:

    service network restart
For additional information, see Configuring a VLAN on a portgroup(1003825).

Keywords

service console networking

Feedback

Rating: 1 - Lowest 2 3 4 5 - Highest (10 Ratings)   

Did this article help you?
This article resolved my issue.
This article did not resolve my issue.
This article helped but additional information was required to resolve my issue.
What can we do to improve this information? (2000 or fewer characters)
Submit
Rating: 1 - Lowest 2 3 4 5 - Highest (10 Ratings)   
Actions