UML networking on Salix

You have a problem with Salix? Post here and we'll do what we can to help.

UML networking on Salix

Postby GJones » 4. May 2012, 23:16

One of the awesome things about User Mode Linux is that it doesn't require anything special on the host system; it just runs. At least in theory... In practice, things may be harder.

As an experiment I have downloaded prebuilt images of user mode kernel 3.3.4 and CentOS 6.x. Booting into this system

Code: Select all
$ ./kernel64-3.3.4 ubda=CentOS6.x-AMD64-root_fs mem=512M


works fine. However, tun/tap networking is very difficult to set up. I've done the following:

Code: Select all
# modprobe tun
# modprobe iptable_nat
# iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
# echo 1 > /proc/sys/net/ipv4/ip_forward
# chown root:users /dev/net/tun


But when I boot UML like this:

Code: Select all
./kernel64-3.3.4 ubda=CentOS6.x-AMD64-root_fs mem=512M umid=uml1 eth0=tuntap,tun0


and run dhclient on the resulting ethernet interface, I get the following error:

Code: Select all
[   45.760000] TUNSETIFF failed, errno = 1
RTNETLINK answers: Operation not permitted


1. What am I doing wrong?

2. Is there any easier way to set up networking with UML?
GJones
 
Posts: 257
Joined: 22. Jul 2011, 23:27

Return to Problems