You get a bonus - 1 coin for daily activity. Now you have 1 coin

Xen and Squeeze: the TAP Interface Doesn't Work

Practice



Debian Squeeze comes with built-in support for Xen 4.0.1-2 right out of the box, which is great (no need to build it from source).

Everything would be fine, Xen is built into Squeeze, everyone's happy... except the Squeeze developers made one teeny-tiny mistake — they forgot to include one file in the Xen package, without which our beloved TAP interface (tap:aio:) won't work. When starting a machine (guest), Xen will hang and after a few minutes throw an error along the lines of "I can't connect the tap interface via hot-plug". To fix this, you need to create a file called hotplugpath.sh in the /etc/xen/scripts directory with the following content:

SBINDIR="/usr/sbin"
BINDIR="/usr/bin"
LIBEXEC="/usr/lib/xen/bin"
LIBDIR="/usr/lib64"
SHAREDIR="/usr/share"
PRIVATE_BINDIR="/usr/lib64/xen/bin"
XENFIRMWAREDIR="/usr/lib/xen/boot"
XEN_CONFIG_DIR="/etc/xen"
XEN_SCRIPT_DIR="/etc/xen/scripts"

It's a small file, but without it TAP won't work. You also need to give this file execute permission:

$ chmod +x hotplugpath.sh

Next, you need to add a couple of lines to the /etc/modules file:

# /etc/modules
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded# at boot time, one per line. Lines beginning with "#" are ignored.
# Parameters can be specified after the module name.
loop
blktap
xen-evtchn

The last two lines were added separately.

Let's reboot. Now the TAP interface will work, which is quite nice.
created: 2017-05-10
updated: 2026-03-09
359



Was this answer useful?
Choose a quick rating so we can improve the next answer for you.
How satisfied are you?


Comments

To leave a comment

If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Lectures and tutorial on "LINUX operating system"

Terms: LINUX operating system