Anda di halaman 1dari 5

Adding second service console via CLI

Service Console commands.


In the last series I explained how to change the IP address of the Service console (SC), which is an interface called vswif . You can see all the configured vswif interfaces with this command:

esxcfg-vswif -l
Normaly the first SC is vswif0. Before adding second SC we will first create a second vswitch. To create a vswitch via CLI its not so difficult. In my first article about VMware CLI commands I explained some of them. Especially the one to list already configured vswitches.I suppose that our vswitch0 is still in place so Ill be creating vswitch1. To create a new vSwitch just use this command: esxcfg-vswitch -a vswitch1

As you can see the esxcfg-vswitch -l helps you to see the new just created vswitch client.

The result can be seen via VI

To be able to add SC to this vswitch we need first create a portgroup. A portgroup is. A port group specifies port configuration options such as bandwidth limitations and VLAN tagging policies for each member port. Network services connect to vSwitches through port groups. Port groups define how a connection is made through the vSwitch to the network. To add a portgroup to our newly created vswitch1 use this command: esxcfg-vswitch -A vladportgroup vswitch1

And we again can verify our work via GUI and the VMware Virtual Infrastructure client.

Well, ok. Now we can attach some NIC to our switch. What do you say? Yes we need to atach a NIC so the vswitch can communicate to the outside world. We will do it again via CLI. Lets go. (I see that vmnic0 is already used Ill take vmnic1 as a NIC). Use this command: esxcfg-vswitch -L vmnic1

And again check in the VI client.

Well, now as promised at the beginning, we can add a second SC to this portgroup Use this command: esxcfg-vswif -a For example to add second service console: esxcfg-vswif -a vswif1 -p vladportgroup -i 192.168.40.10 -n 255.255.255.0

And again check in the via the VI client.

Now we have a second working service console. This was a step-by-step demonstration creation a new vswitch, portgroup and service console with attaching to a NIC. I expressively used step after step, to see the progress. Now Im sure there are shorter ways. Maybe next time Stay Tuned..

Vmware CLI commands:


1.
Basic VMware ESX CLI networking commands - March 6, 2010

2. 3.

VMware ESX - Configuration of Service console via CLI - March 8, 2010 Adding second service console via CLI (This post) - March 15, 2010