UML networking on Salix
Posted: 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
works fine. However, tun/tap networking is very difficult to set up. I've done the following:
But when I boot UML like this:
and run dhclient on the resulting ethernet interface, I get the following error:
1. What am I doing wrong?
2. Is there any easier way to set up networking with UML?
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
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
Code: Select all
./kernel64-3.3.4 ubda=CentOS6.x-AMD64-root_fs mem=512M umid=uml1 eth0=tuntap,tun0
Code: Select all
[ 45.760000] TUNSETIFF failed, errno = 1
RTNETLINK answers: Operation not permitted
2. Is there any easier way to set up networking with UML?