virtualization:vmware:67:vmk0_01
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| virtualization:vmware:67:vmk0_01 [2019/10/12 08:26] – rplecko | virtualization:vmware:67:vmk0_01 [2019/10/12 08:39] (current) – rplecko | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| === Remove and recreate Management Network VM Kernel interface [vmk0], using ESXi CLI === | === Remove and recreate Management Network VM Kernel interface [vmk0], using ESXi CLI === | ||
| + | [[https:// | ||
| As you may know, ESXi Management interface (aka vmk0) is created during installation. By default that interface will inherit MAC address of one of the physical NIC cards. Now, this is not a problem at all in most cases, but sometimes it can create problems. | As you may know, ESXi Management interface (aka vmk0) is created during installation. By default that interface will inherit MAC address of one of the physical NIC cards. Now, this is not a problem at all in most cases, but sometimes it can create problems. | ||
| Line 21: | Line 22: | ||
| === Find Port ID === | === Find Port ID === | ||
| - | Second, you will need to find a port number on dvswitch which is used by vmk0. To list Switch | + | Second, you will need to find a port number on dvswitch which is used by vmk0. To list Switch |
| + | | ||
| + | |||
| + | and then look for **vmk0**. The output of that command can be very long, so you can use grep and awk to filter out only the value you need. | ||
| esxcfg-vswitch -l |grep vmk0 |awk ' | esxcfg-vswitch -l |grep vmk0 |awk ' | ||
| Line 38: | Line 42: | ||
| esxcli network ip interface add --interface-name=vmk0 --dvs-name=DVSWITCHNAME --dvport-id=PORT_ID_FROM_STEP_TWO | esxcli network ip interface add --interface-name=vmk0 --dvs-name=DVSWITCHNAME --dvport-id=PORT_ID_FROM_STEP_TWO | ||
| - | Of course you will need to replace DVSWITCHNAME with your Distributed Switch name and PORT_ID_FROM_STEP_TWO with the Port ID we acquired in step 2. | + | Of course you will need to replace |
| - | Again, we can check if port was created using esxcfg-vmknic -l or esxcfg-vswitch -l. | + | Again, we can check if port was created using\\ |
| - | Configure IP settings | + | < |
| + | or | ||
| + | esxcfg-vswitch -l</ | ||
| + | === Configure IP settings | ||
| - | In step number 5 we need to assign IP configuration to the new vmk0 interface. Use the following command to do it. Replace IP and NETMASK with info captured in step 1. | ||
| - | esxcli network ip interface ipv4 set --interface-name=vmk0 --ipv4=IP --netmask=NETMASK | + | In step number 5 we need to assign IP configuration to the new vmk0 interface. Use the following command to do it. Replace **IP** and **NETMASK** with info captured in step 1. |
| - | Set default Gateway | + | esxcli network ip interface ipv4 set --interface-name=vmk0 --ipv4=IP --netmask=NETMASK --type=static |
| + | |||
| + | === Set default Gateway | ||
| We also need to set the default GW back to its place, as it was removed once we removed vmk0. | We also need to set the default GW back to its place, as it was removed once we removed vmk0. | ||
| - | esxcfg-route -a default IP_OF_GW | + | |
| + | |||
| + | === Mark vmk0 for Management traffic === | ||
| - | Mark vmk0 for Management traffic | ||
| It may happen that vmk0 will not be marked for Management traffic after recreation. You can use the following command to mark interface for management in CLI. | It may happen that vmk0 will not be marked for Management traffic after recreation. You can use the following command to mark interface for management in CLI. | ||
| - | esxcli network ip interface tag add -i vmk0 -t Management | + | |
virtualization/vmware/67/vmk0_01.1570868789.txt.gz · Last modified: 2019/10/12 08:26 by rplecko
