iperf3 on VMware ESXi 8 gives “Operation not permitted” error message

I have been using iperf3 to test network performance between ESXi hosts or between an ESXi host and another device running iperf3. Earlier we could simply copy the iperf3 file to a new file like iperf3.copy and run that but this no longer work in ESXi 8 due to security being hardened.

Here is a way to still be able to use iperf3 in ESXi 8.

ESXi shell command to run on the host acting as the iperf3 server:

esxcli network firewall set --enabled false
localcli system settings advanced set -o /User/execInstalledOnly -i 0

cp /usr/lib/vmware/vsan/bin/iperf3 /usr/lib/vmware/vsan/bin/iperf3.copy
/usr/lib/vmware/vsan/bin/iperf3.copy -s -B 192.168.0.111

localcli system settings advanced set -o /User/execInstalledOnly -i 1
esxcli network firewall set --enabled true

ESXi shell commands to run on the host acting as the iperf3 client:

esxcli network firewall set --enabled false
localcli system settings advanced set -o /User/execInstalledOnly -i 0

cp /usr/lib/vmware/vsan/bin/iperf3 /usr/lib/vmware/vsan/bin/iperf3.copy
/usr/lib/vmware/vsan/bin/iperf3.copy -i 1 -t 10 -c 192.168.0.111

localcli system settings advanced set -o /User/execInstalledOnly -i 1
esxcli network firewall set --enabled true

One thought on “iperf3 on VMware ESXi 8 gives “Operation not permitted” error message

  1. Lijomon's avatar Lijomon June 6, 2024 / 7:56 pm

    Thanks a lot this helped me.

    Like

Leave a comment