Re: KVM networking.
- From: Sthu Deus <sthu.deus@xxxxxxxxx>
- Date: Fri, 11 Nov 2011 23:41:55 +0700
Thank You for Your time and answer, Arno:
3. W/ tap - You have seen already the problem - some unknown to meI can make a guess:
permission problem - do You know why is it so?
$ ls -l /dev/net/tun
crw-rw---- 1 root kvm 10, 200 Nov 9 21:36 tun
$ groups
aschuring users kvm [..]
$ /usr/sbin/tunctl -b
TUNSETIFF: Operation not permitted
$ sudo setcap cap_net_admin+ep /usr/sbin/tunctl
$ /usr/sbin/tunctl -b
tap0
Or may have an ideaYes. You can just add tunctl to your list of sudo commands, and use the
what else command I have to add to sudoers file for the user or some
other way by root specify the interface parameters that the user has
to use the interface w/?
output of ifname=$(sudo tunctl -b -u $(whoami)) on the kvm command
line. Alternatively, set the cap_net_admin capability on tunctl and you
won't need sudo (but still upgrade-unsafe)...
I have included more options to network script:
/usr/bin/kvm -localtime -m 256 -no-reboot -boot c -hda da
-net nic -net tap,ifname=$(sudo /usr/sbin/tunctl -b -u $(whoami);
sudo /sbin/ifconfig tap0 192.168.1.1 up; sudo /sbin/route add -host
192.168.1.1 dev tap0),script=no,downscript=no
that gave me no root involving into the process and tap0 dev. is
created and route for it is added to the route table:
Destination Gateway Genmask Flags Metric Ref Use
Iface default 192.168.0.1 0.0.0.0 UG 0 0 0 eth0
link-local * 255.255.0.0 U 1000 0 0 eth0
localnet * 255.255.255.0 U 0 0 0 eth0
192.168.1.0 * 255.255.255.0 U 0 0 0 tap0
192.168.1.1 * 255.255.255.255 UH 0 0 0 tap0
but no connection host-guest...
--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx
Archive: http://lists.debian.org/4ebd505d.0611cc0a.1232.ffffc59a@xxxxxxxxxxxxx
- Follow-Ups:
- Re: KVM networking.
- From: Arno Schuring
- Re: KVM networking.
- References:
- KVM networking.
- From: Sthu Deus
- Re: KVM networking.
- From: Arno Schuring
- Re: KVM networking.
- From: Sthu Deus
- Re: KVM networking.
- From: Arno Schuring
- KVM networking.
- Prev by Date: Re: Dead keys in Gnome3/Shell?
- Next by Date: Re: emacs RMAIL -- help needed
- Previous by thread: Re: KVM networking.
- Next by thread: Re: KVM networking.
- Index(es):