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?
