vWorld v.3

DCAS-#001 (Lab Preparation … Network)

Again, I have new goal and I want to rearrange my home lab to meet the requirements for it.
This time my goal is “VCAP4-DCA” certification and I have to use different kind of tools for preparation.
As one of my PC stop working (one of my two Physical host – whitebox), I have to make new lab base on my stuff.
I have created two new VMs and installed VMware ESXi 4.1 as guest (nested ESX/ESXi) on them and start using them.
Let back to our road map, as new year comes (in my country), I’d be free for two weeks and I would do my best for this exam.
I would start with simple things like, commands in VMware ESXi DCUI, and then moving to vCLI, PowerCLI and …
So by knowing these, here are my notes on daily exercise.

Network on ESXi 4.1

Well as I mentioned before I created two new VMs with VMware ESXi on them, for storage I want to use iSCSI and for that I need new VMKernel port on my virtualized ESXi.
I decided to start my exercise from right here by creating these Network by using commands (using DCUI or SSH) not vSphere Client.

First of all, I have checked the status of my virtual switch(es) by using “esxcfg-vswitch -l

Then, Checked the existing VMKernel port(s) by using “esxcfg-vmknic -l

By default, after first installation of VMware ESXi there would be one VMKernel port (vmk0) and one virtual switch (vSwitch0) with two port groups (Management Network & VM Network) in it.
For multipathing purpose and redundancy on my management network I need one more VMKernel port and for creating this new VMKernel port I need new port group in existing vSwitch or new vSwitch.
As far as my VMs only have one NIC which connected to “vSwitch0”, so I don’t need to create new vSwitch.
So next step would be creating new port group in existing vSwitch by using “esxcfg-vswitch -A “Management Network 2” vSwitch0” command.

After running this command, it would be wise to check if it’s work correctly by listing the available port groups and it means running “esxcfg-vswitch -l” commain again.

After creation of new port group, it’s time for creation of new VMKernel port by using “esxcfg-vmknic -a -i -n -p “Management Network 2”” command.

Again, checking the result is good 😉 so running the “esxcfg-vmknic -l” would help to be sure about creation of new VMKernel port.


  • For listing the current vSwitchs “esxcfg-vswitch -l” or “esxcfg-vswitch –list” can be used.
  • For listing the current VMkernel ports “esxcfg-vmknic -l” or “esxcfg-vmknic –list” can be used.
  • For creating new port group “esxcfg-vswitch -A “Name” vSwitchX” or “esxcfg-vswitch –add-pg=Name vSwitchX” can be used.
    Name is the name of new port group, vSwitchX is the name of selected vSwitch which port group would be placed on it.
  • For creating new VMKernel port “esxcfg-vmknic -a -i x.x.x.x -n y.y.y.y -p PGName” or “esxcfg-vmknic –add –ip x.x.x.x –netmask y.y.y.y –portgroup PGName” can be used.
    x.x.x.x would be the IP address of new VMKernel port, y.y.y.y would be the netmask for this interface and PGName would be the name of port group which the VMKernel port would connect to.
  • If help needed for using these two commands “–help” or “-h” can be used with them for getting more information about them, like “esxcfg-vswitch –h” or “esxcfg-vmknic –help

1 Comment

Add a Comment
  1. this post is very usefull thx!

It's your kindness to leave a reply/feedback

Kasraeian © 2016
%d bloggers like this: