how to create the vswif0 interface on the ESX 3.5

Posted on 2009-04-17
Last Modified: 2013-12-06
I deleted the vswif0 and vswif1 interfaces along with the Vswitch0 and Vswitch1 from my ESX and now unable to connect via VI client. Then I tried creating the vswif0 which gets created but It seems like the previously deleted  interfaces and Vswitch still show up when I run the command "esxcfg -vswitch -l". Need  help urgently with all cmd line instructions to delete and re-create the vswif interfaces back with new Vswitch and Service Console.
Question by:nittech
    LVL 8

    Accepted Solution

    This can be achieved via esxcfg -vswitch ..... But I must be honest in that I have for some time been struggling to find a reliable solution to setup  networking via the CLI. All the doco says it works, but it's not reliable.
    I would suggest you simply reinstall your ESX server. It's a sure fix.
    If you are keep to go the CLI routine
    To check your current Service console settings run the below command
    esxcfg-vswif -l
    To set the service console IP to with a mask of run the below
    esxcfg-vswif -i  -n vswif0
    Change the IP and subnet in /etc/sysconfig/network-scripts/ifcfg-vswif0
    Then via nano change the gateway, hostname, interface etc. in
    Then Change DNS servers in /etc/resolv.conf
    Then Change host info in /etc/hosts
    then "service network restart"

    And for the other things.
    #Setting Port Speeds
    esxcfg-nics -s 1000 -d full vmnic0
    esxcfg-nics -s 1000 -d full vmnic1

    ## Setting vSwitch0 parameters
    # Create vSwitch0 with 8 ports
    esxcfg-vswitch -a vSwitch0:12
    # Create the port group "Service Console"
    esxcfg-vswitch -A "Service Console" vSwitch0
    # Link the vmnics to the port group
    esxcfg-vswitch -M vmnic0 vSwitch0 -p "Service Console"
    esxcfg-vswitch -M vmnic1 vSwitch0 -p "Service Console"

    esxcfg-vmknic -a -i -n "Service Console"

    # Create the port group "VMotion"
    esxcfg-vswitch -A VMotion vSwitch0
    # Link the vmnics to the port group
    esxcfg-vswitch -M vmnic0 vSwitch0 -p "VMotion"
    esxcfg-vswitch -M vmnic9 vSwitch0 -p "VMotion"
    # esxcfg-vswitch -M vmnic1 vSwitch0 -p "Service Console"
    # Link the vmnics to the vSwitch
    #esxcfg-vswitch -L vmnic0 vSwitch0 #(Already Exists)
    esxcfg-vswitch -L vmnic9 vSwitch0
    # Change Port Group VMotion to VMKernel Port type and assign IP details
    esxcfg-vmknic -a -i -n VMotion
    sleep 20
    #Setting VMotion Port to alow VMotion traffic
    vimsh -n -e "/hostsvc/vmotion/vnic_set VMotion"

    LVL 21

    Expert Comment

    Hopefully, my previous post to another member of this forum having the same issue can help you..

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Windows 7 does not have the best desktop search built in. This is something Windows 7 users have struggled with. You type something in, and your search results don’t always match what you are looking for, or it doesn’t actually work at all. There ar…
    This article is an update and follow-up of my previous article:   Storage 101: common concepts in the IT enterprise storage This time, I expand on more frequently used storage concepts.
    Teach the user how to rename, unmount, delete and upgrade VMFS datastores. Open vSphere Web Client: Rename VMFS and NFS datastores: Upgrade VMFS-3 volume to VMFS-5: Unmount VMFS datastore: Delete a VMFS datastore:
    This Micro Tutorial steps you through the configuration steps to configure your ESXi host Management Network settings and test the management network, ensure the host is recognized by the DNS Server, configure a new password, and the troubleshooting…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now