Last active
February 13, 2020 20:26
-
-
Save einsteinx2/1ce7364d9a7c0b70ae872b2957163a4f to your computer and use it in GitHub Desktop.
ProxMox if-up.d script to fix hanging Intel e1000e Gigabit NIC when a VM has a lot of network usage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -e | |
# Instructions: | |
# Change HANGING_IFACE to match the interface name of your interface (this can | |
# be found by running `ifconfig -a` or `cat /etc/network/interfaces`. | |
# | |
# Place this file in `/etc/network/if-up.d` and make sure to make it executable | |
# by running `chmod a+x /etc/network/if-up.d/hangfix-intel-e1000e` then reboot. | |
# | |
# After reboot, confirm it worked by running `ethtool -k eno1 | grep segmentation` | |
# where `eno1` is the HANGING_IFACE interface. Everything should be set to off. | |
HANGING_IFACE=eno1 | |
# NOTE: Due to the defualt ProxMox network config not running scripts for eno1, | |
# we instead run this when it finishes all interfaces (calls scripts again | |
# with IFACE as --all). | |
# | |
# Alternatively, we could add auto eno1 to the /network/interfaces, but I | |
# don't know if that will cause other issues. | |
if [ "$IFACE" = "--all" ]; then | |
/sbin/ethtool -K $HANGING_IFACE gso off gro off tso off tx off rx off | |
fi | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment