Skip to main content

Rename interfaces on Ubuntu 14.04

On my virtual machines I use many network interfaces, each one connected to a different vlan. I usually rename the interfaces on the guest machine with a meaningful name referring to its vlan, like eth40 for the interface that is connected to vlan 40. Until now I used to use ifrename package on my debian guests, but on Ubuntu 14.04 this packakge is not very long distributed.

To achive this I used an udev rule. Simply create the file /etc/udev/rules.d/70-persistent-net.rules with the following content, one line for each interface you want to rename:

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="b2:b3:31:58:96:59", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth40"

 

 

Now, change your /etc/network/interfaces file accordingly, reboot the guest and your interfaces should have changed.

/usr/sbin/irqbalance: irq X affinity_hint subset empty

 

I found these messages  in my Ubuntu 14.04 server filling the syslog:

 

Jul 4 14:49:14 h80-stack01 /usr/sbin/irqbalance: irq 121 affinity_hint subset empty
Jul 4 14:49:14 h80-stack01 /usr/sbin/irqbalance: irq 122 affinity_hint subset empty
Jul 4 14:49:14 h80-stack01 /usr/sbin/irqbalance: irq 123 affinity_hint subset empty
Jul 4 14:49:14 h80-stack01 /usr/sbin/irqbalance: irq 124 affinity_hint subset empty
Jul 4 14:49:14 h80-stack01 /usr/sbin/irqbalance: irq 125 affinity_hint subset empty
Jul 4 14:49:14 h80-stack01 /usr/sbin/irqbalance: irq 126 affinity_hint subset empty
Jul 4 14:49:14 h80-stack01 /usr/sbin/irqbalance: irq 133 affinity_hint subset empty
Jul 4 14:49:14 h80-stack01 /usr/sbin/irqbalance: irq 134 affinity_hint subset empty
Jul 4 14:49:14 h80-stack01 /usr/sbin/irqbalance: irq 135 affinity_hint subset empty
Jul 4 14:49:14 h80-stack01 /usr/sbin/irqbalance: irq 136 affinity_hint subset empty
Jul 4 14:49:14 h80-stack01 /usr/sbin/irqbalance: irq 137 affinity_hint subset empty
Jul 4 14:49:14 h80-stack01 /usr/sbin/irqbalance: irq 138 affinity_hint subset empty
Jul 4 14:49:14 h80-stack01 /usr/sbin/irqbalance: irq 146 affinity_hint subset empty
Jul 4 14:49:14 h80-stack01 /usr/sbin/irqbalance: irq 147 affinity_hint subset empty
Jul 4 14:49:14 h80-stack01 /usr/sbin/irqbalance: irq 148 affinity_hint subset empty
Jul 4 14:49:14 h80-stack01 /usr/sbin/irqbalance: irq 149 affinity_hint subset empty
Jul 4 14:49:14 h80-stack01 /usr/sbin/irqbalance: irq 150 affinity_hint subset empty
Jul 4 14:49:14 h80-stack01 /usr/sbin/irqbalance: irq 151 affinity_hint subset empty
Jul 4 14:49:14 h80-stack01 /usr/sbin/irqbalance: irq 158 affinity_hint subset empty
Jul 4 14:49:14 h80-stack01 /usr/sbin/irqbalance: irq 159 affinity_hint subset empty
Jul 4 14:49:14 h80-stack01 /usr/sbin/irqbalance: irq 160 affinity_hint subset empty
Jul 4 14:49:14 h80-stack01 /usr/sbin/irqbalance: irq 161 affinity_hint subset empty
Jul 4 14:49:14 h80-stack01 /usr/sbin/irqbalance: irq 162 affinity_hint subset empty
Jul 4 14:49:14 h80-stack01 /usr/sbin/irqbalance: irq 163 affinity_hint subset empty

Seems to be a bug reported in Ubuntu, to avoid it, I followed these steps:

Edit file /etc/init/irqbalance.conf and change the line

exec /usr/sbin/irqbalance $DOPTIONS

for

exec /usr/sbin/irqbalance $OPTIONS $DOPTIONS

Edit /etc/default/irqbalance and add this line:

OPTIONS="--hintpolicy=ignore"

The file should look like this:

#Configuration for the irqbalance daemon

#Should irqbalance be enabled?
ENABLED="1"
#Balance the IRQs only once?
ONESHOT="0"
OPTIONS="--hintpolicy=ignore"

Finally restart irqbalance service:

$ sudo service irqbalance restart

If the service restart does not work try rebooting machine.


Notice: Undefined variable: wp_sh_class_name in /var/www/elkano.org/blog/wp-content/plugins/wp-syntaxhighlighter/wp-syntaxhighlighter.php on line 1002

Notice: Undefined variable: wp_sh_class_name in /var/www/elkano.org/blog/wp-content/plugins/wp-syntaxhighlighter/wp-syntaxhighlighter.php on line 1002

Warning: Use of undefined constant XML - assumed 'XML' (this will throw an Error in a future version of PHP) in /var/www/elkano.org/blog/wp-content/plugins/wp-syntaxhighlighter/wp-syntaxhighlighter.php on line 1048