VMware ESXi 7
Sponsored Link

Add VMkernel NIC2023/03/17

 
To add VMkernel NIC, configure like follows.
If you like to set multiple IP address to ESXi Host, it needs to add VMkernel NIC.
Therefore, this is based on that your ESXi computer has multiple physical network interfaces.
This example is based on the environment like follows.
Add VMkernel NIC setting to physical NIC [vmnic1] that has no setting now and assign it to the vswitch and portgroup created in advance.
        10.0.0.0/24
------------+------------
            |
       [ vSwitch0 ]
            |
    [ vmk0 (10.0.0.25)]
            |                         |
      vmnic0|vmnic2                   |
+-----------+-----------+             |
|  [ ctrl.srv.world ]   |             |
|       ESXi Host       +-------------+ 192.168.0.0/24
|                       |vmnic1       |
+-----------------------+             |

[1] To add on shell access, configure like follows.
[root@ctrl:~]
esxcli network nic list

Name    PCI Device    Driver  Admin Status  Link Status  Speed  Duplex  MAC Address         MTU  Description
------  ------------  ------  ------------  -----------  -----  ------  -----------------  ----  -----------
vmnic0  0000:01:00.0  ne1000  Up            Up            1000  Full    52:54:00:94:d8:17  1500  Intel Corporation 82574L Gigabit Network Connection
vmnic1  0000:07:00.0  ne1000  Up            Up            1000  Full    52:54:00:76:e9:9c  1500  Intel Corporation 82574L Gigabit Network Connection
vmnic2  0000:08:00.0  ne1000  Up            Up            1000  Full    52:54:00:2a:ec:f4  1500  Intel Corporation 82574L Gigabit Network Connection

[root@ctrl:~]
esxcli network ip interface ipv4 address list

Name  IPv4 Address  IPv4 Netmask   IPv4 Broadcast  Address Type  Gateway   DHCP DNS
----  ------------  -------------  --------------  ------------  --------  --------
vmk0  10.0.0.25     255.255.255.0  10.0.0.255      STATIC        10.0.0.1     false

[root@ctrl:~]
esxcli network vswitch standard list

vSwitch0
   Name: vSwitch0
   Class: cswitch
   Num Ports: 2990
   Used Ports: 6
   Configured Ports: 128
   MTU: 1500
   CDP Status: listen
   Beacon Enabled: false
   Beacon Interval: 1
   Beacon Threshold: 3
   Beacon Required By:
   Uplinks: vmnic2, vmnic0
   Portgroups: VM Network, Management Network

vSwitch1
   Name: vSwitch1
   Class: cswitch
   Num Ports: 2990
   Used Ports: 3
   Configured Ports: 128
   MTU: 1500
   CDP Status: listen
   Beacon Enabled: false
   Beacon Interval: 1
   Beacon Threshold: 3
   Beacon Required By:
   Uplinks: vmnic1
   Portgroups: Management Network Internal

[root@ctrl:~]
esxcli network vswitch standard portgroup list

Name                         Virtual Switch  Active Clients  VLAN ID
---------------------------  --------------  --------------  -------
Management Network           vSwitch0                     1        0
Management Network Internal  vSwitch1                     0        0
VM Network                   vSwitch0                     0        0

# add VMkernel NIC [vmk1] and assign it to the portgroup [Management Network Internal]

[root@ctrl:~]
esxcli network ip interface add --interface-name=vmk1 --portgroup-name="Management Network Internal"
# set static IP address to [vmk1]
# * if set gateway too, add [--gateway=***] option

[root@ctrl:~]
esxcli network ip interface ipv4 set --interface-name=vmk1 --ipv4=192.168.0.100 --netmask=255.255.255.0 --type=static

# set service tag to [vmk1]
# available tags are follows
#  - vMotion
#  - Provisioning
#  - Fault Tolerance logging
#  - Management
#  - vSphere Replication
#  - vSphere Replication NFC
#  - vSAN
#  - vSphere Backup NFC
#  - NVMe over TCP
#  - NVMe over RDMA
[root@ctrl:~]
esxcli network ip interface tag add --interface-name=vmk1 --tagname=Management

[root@ctrl:~]
esxcli network ip interface ipv4 address list

Name  IPv4 Address   IPv4 Netmask   IPv4 Broadcast  Address Type  Gateway   DHCP DNS
----  -------------  -------------  --------------  ------------  --------  --------
vmk0  10.0.0.25      255.255.255.0  10.0.0.255      STATIC        10.0.0.1     false
vmk1  192.168.0.100  255.255.255.0  192.168.0.255   STATIC        10.0.0.1     false

[root@ctrl:~]
ping -c3 192.168.0.1

PING 192.168.0.1 (192.168.0.1): 56 data bytes
64 bytes from 192.168.0.1: icmp_seq=0 ttl=64 time=0.486 ms
64 bytes from 192.168.0.1: icmp_seq=1 ttl=64 time=0.377 ms
64 bytes from 192.168.0.1: icmp_seq=2 ttl=64 time=0.430 ms

--- 192.168.0.1 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 0.377/0.431/0.486 ms

# to clear IP settings, run like follows

[root@ctrl:~]
esxcli network ip interface ipv4 set --interface-name=vmk1 --type=none

# to remove VMkernel NIC, run like follows

[root@ctrl:~]
esxcli network ip interface remove --interface-name=vmk1

 
To add on VMware Host Client, configure like follows.
[2] Move to [Management] - [Network] -[VMkernel NICs] section and click [Add VMkernel NIC] button to open the window and set IP address and portgroup, others. For services section selection, refer to details on the official site below.
⇒ https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.networking.doc/GUID-1C0D8D8D-F9A5-4443-9AE7-544742630D39.html
[3] New VMkernel NIC has beed added.
Matched Content