Networknet archive Blog

VMware ESX: Configure a Service Console IP address

Originally published Last updated 5 comments

VMware ESX provides command-line tools when installed with the Service Console, rather than ESXi. In this example, I will create a vSwitch, connect a physical network interface and assign an IP address to the Service Console management interface.

Create a virtual switch:

Code1 line
1
[root@LAB-ESX-01 root]# esxcfg-vswitch -a vSwitch0

Connect the first physical network interface to vSwitch0:

Code1 line
1
[root@LAB-ESX-01 root]# esxcfg-vswitch -L vmnic0 vSwitch0

The result of these two commands:

image

vmnic0, at 1000Mbps, is now associated with vSwitch0. Next, I want a Service Console port group on this virtual switch.

Code1 line
1
[root@LAB-ESX-01 root]# esxcfg-vswitch -A Service\ Console vSwitch0

This creates a port group named Service Console. Creating a port group is like defining an interface on a switch. I can then assign an L3 IP address to that interface/port group:

Code1 line
1
[root@LAB-ESX-01 root]# esxcfg-vswif -a vswif2 -p "Service Console" -i 192.168.1.2 -n 255.255.255.0 -b 192.168.1.255

This creates an L3 interface linked to the Service Console port group with a static IP address. ESX generates an L2 MAC address and assigns it to vswif2:

Code1 line
1
[2008-09-12 13:22:21 'Vnic' warning] Generated New MAC address, 00:50:56:40:49:f4 for vswif2

The resulting configuration:

image

Using two built-in ESX command-line tools, I created a Service Console interface and assigned its IP address on the specified physical management network interface.

Command summary

Code4 lines
1
2
3
4
esxcfg-vswitch -a switch_name
esxcfg-vswitch -L physical_nic switch_name
esxcfg-vswitch -A Service\ Console switch_name
esxcfg-vswif -a vswif2 -p "Service Console" -i 192.168.1.2 -n 255.255.255.0 -b 192.168.1.255

Related link

5 comments

Comments from the original WordPress site, kept read-only.

  1. Nimrod

    It a great post,
    is there a way to connect a service console to a vswitch without use a physical nic? I can do it with no problem from the VC