how to create the vswif0 interface on the ESX 3.5

Posted on 2009-04-17
Medium Priority
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

Accepted Solution

markzz earned 1500 total points
ID: 24176417
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

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

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

August and September have been big months for VMware—from VMworld last month to our new Course of the Month in VMware Professional - Data Center Virtualization. We reached out to Andrew Hancock, resident VMware vExpert, to have a more in-depth discu…
It’s time for spooky stories and consuming way too much sugar, including the many treats we’ve whipped for you in the world of tech. Check it out!
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:
Teach the user how to edit .vmx files to add advanced configuration options Open vSphere Web Client: Edit Settings for a VM: Choose VM Options -> Advanced: Add Configuration Parameters:

850 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