ESXi: how to change the MTU of vmkernek (vmk) interface (when UI fails)

root's picture

Sometimes you need to change the MTU on a vmkernel interface and sometimes it does not work from web UI. Or you just like more to do stuff from command line.
Ok, let's get into it!

List interface and MTU 1500 is presented

[root@eeny:~] esxcli network ip interface list
vmk0
   Name: vmk0
   MAC Address: t4:rg:zr:o2:2e:a3
   Enabled: true
   Portset: vSwitch0
   Portgroup: Mgmt
   Netstack Instance: defaultTcpipStack
   VDS Name: N/A
   VDS UUID: N/A
   VDS Port: N/A
   VDS Connection: -1
   Opaque Network ID: N/A
   Opaque Network Type: N/A
   External ID: N/A
   MTU: 1500
   TSO MSS: 65535

Modify the MTU on vmkernel interface (no output on command - it's OK)

[root@eeny:~] esxcli network ip interface set -i vmk0 -m 9000

List interface and MTU 9000 is presented

[root@eeny:~] esxcli network ip interface list
vmk0
   Name: vmk0
   MAC Address: t4:rg:zr:o2:2e:a3
   Enabled: true
   Portset: vSwitch0
   Portgroup: Mgmt
   Netstack Instance: defaultTcpipStack
   VDS Name: N/A
   VDS UUID: N/A
   VDS Port: N/A
   VDS Connection: -1
   Opaque Network ID: N/A
   Opaque Network Type: N/A
   External ID: N/A
   MTU: 9000
   TSO MSS: 65535
   RXDispQueue Size: 2
   Port ID: 167772175

That's it!

Thou shalt not steal!

If you want to use this information on your own website, please remember: by doing copy/paste entirely it is always stealing and you should be ashamed of yourself! Have at least the decency to create your own text and comments and run the commands on your own servers and provide your output, not what I did!

Or at least link back to this website.

Recent content

root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root