[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MirageOS-devel] Mirage OS 2.4 errors on install and mirage-skeleton build

On 04/29/2015 11:58 AM, Justin Cormack wrote:
On 29 April 2015 at 10:35, Thomas Gazagnaire <thomas@xxxxxxxxxxxxxx> wrote:
Third, when I managed to get one of the network samples building, for
example "ping", I couldn't get the unikernel running locally with a tun/tap
device I created. Even though I use tapctl to create a tap0 device owned by
my user account, just like the tutorial advises, when I go to execute the
unikernel I still get this error:

Fatal error: exception Failure("net_tap0")
Raised at file "src/core/lwt.ml", line 788, characters 22-23
Called from file "src/unix/lwt_main.ml", line 34, characters 8-18
Called from file "main.ml", line 47, characters 2-28

This is rather cryptic but might indicate that you need to run the command
using sudo.
What does strace show here? It might be permissions but if you made
the device owned by your user account it shouldnt be. You may need to
make /dev/net/tun world read and write (which is safe to do).
On 14.04.2, I need to run with sudo even if the device is owned by my user, I've made it with tunctl -u me, and the mode is u+rwx, otherwise strace shows

open("/dev/net/tun", O_RDWR)            = 4
ioctl(4, TUNSETIFF, 0x7fffb7dd0a20)     = 0
ioctl(4, TUNSETPERSIST, 0)              = 0
fcntl(4, F_GETFL)                       = 0x8002 (flags O_RDWR|O_LARGEFILE)
ioctl(5, SIOCGIFFLAGS, {ifr_name="tap0", ifr_flags=IFF_BROADCAST|IFF_MULTICAST}) = 0 ioctl(5, SIOCSIFFLAGS, {ifr_name="tap0", ???}) = -1 EPERM (Operation not permitted)

So you may need to run it with elevated privileges even if it seems like you should be able to get away with running it as yourself.

(Thanks for the bug report; attempting to reproduce it got me to actually use the tap interface for the first time.)


MirageOS-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.