Linux - VirtualizationThis forum is for the discussion of all topics relating to Linux Virtualization. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I've been trying to setup a Debian Lenny virtual machine inside KVM and I'm having significant trouble with the bridging mode of networking when KVM is run as a user. There are no problems when KVM is run as root, so clearly this is some kind of permissions issue. However, I can't figure out where it is and hoped somebody here might know. I've done this before without difficulty, so I can't understand why it no longer works.
I've been following this as a guide using the "public bridging" method. I'm running Debian Lenny on the host too with the 2.6.30 kernel. The guest virtual machine must be accessible from the local network.
The tun kernel module is loaded and seems to works properly. I've set the group permission of the /dev/net/tun device to "tun" and added that group to my user account. The permissions are 660, although 666 also doesn't work. The /etc/qemu-ifup script I've used is the same as shown in the above guide and is executable for all users. I've confirmed that /sbin/ip, /usr/sbin/brctl and /usr/sbin/tunctl are all installed and seem to be working. I've also added sudo introductions for each of these to run under the current user account, although it doesn't even ask for a password to access them. The contents of my /etc/network/interfaces is:
Thanks for your response. It's amazing how you never think of the obvious until it's suggested to you
Setting it up manually worked fine. Although the TUN/TAP networking seems horribly slow for some reason, at about 10% of the real network capacity. It doesn't appear to be bottlenecked by CPU or disk throughput.
For the benefit of others reading this thread, I didn't have to follow all the stages suggested by others as I already had a bridge setup configured. So I basically did the following to configure one tap interface.
I added this to my rc.local file and now it configures it on every boot-up. I removed the promisc parameter from the ifconfig line as I found it wasn't needed and made no difference to performance. I also can't be sure of this, but I think using the promisc flag may introduce a security implication as the guest virtual machine may receive transmissions meant for the real host, i.e allowing packet sniffing on the virtual machine. But I have no idea if this is really a possible scenario or not.
Setting it up manually worked fine. Although the TUN/TAP networking seems horribly slow for some reason, at about 10% of the real network capacity. It doesn't appear to be bottlenecked by CPU or disk throughput.
Try setting the following for improved network speed:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.