VMware vSphere 6.5 Change vmkernel MTU size

0

When dealing with VMkernel ports in vSphere 6.5 for most use cases for performance, we want to enable jumbo frames on the vmkernel ports to allow for less fragmentation of the packets for iSCSI, vMotion, and so forth.  Let’s take a quick look at the topic of VMware vSphere 6.5 Change VMkernel MTU size with the web client as well as with PowerCLI.

VMware vSphere 6.5 Change vmkernel MTU size

Changing the MTU size in the web client is a bit clunky as you have to click in the right place to get the MTU options for your VMkernel ports.  However, it is fairly straightforward with just pointing and clicking.

Under Networking >> Virtual Switches.  We then need to click the vmkernel port group and click the vmk nic and IP address.  Then click the “pencil” button which takes us to where we can modify the vmk nic settings.

vkernmtu01 VMware vSphere 6.5 Change vmkernel MTU size

Here we can change the NIC settings to 9000.

vkernmtu02 VMware vSphere 6.5 Change vmkernel MTU size

Also, make sure the vSwitch itself is also set for Jumbo frames.  Click the vSwitch above and the pencil icon above the vSwitch section.  Here we can set the jumbo frames MTU to 9000.

vkernmtu02b VMware vSphere 6.5 Change vmkernel MTU size

Using PowerCLI

Alan Renouf has a great one liner script for getting vmkernel port settings including MTU and altering these to 9000.

Getting the port settings.

Get-VMHost | Get-VMHostNetworkAdapter | Where { $_.GetType().Name -eq "HostVMKernelVirtualNicImpl" } | Select VMHost, Name, MTU

Changing the settings without confirming:

Get-VMHost | Get-VMHostNetworkAdapter | Where { $_.GetType().Name -eq "HostVMKernelVirtualNicImpl" } | Foreach { $_ | Set-VMHostNetworkAdapter -Mtu 9000 -Confirm:$false }

Before:

vkernmtu03 VMware vSphere 6.5 Change vmkernel MTU sizeAfter:
vkernmtu04 VMware vSphere 6.5 Change vmkernel MTU size

Thoughts

VMware vSphere 6.5 Change vmkernel MTU size is easily accomplished either in the Web client or by using PowerCLI.  The beauty of PowerCLI is that if you want to make mass changes, there is simply no way to do these kinds of bulk changes in the web client so PowerCLI is a much better option.  There are many great one liners out there written by Alan and others that are extremely useful making these types of changes.