Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N5eZZ-0006Uv-34 for qemu-devel@nongnu.org; Wed, 04 Nov 2009 07:02:45 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N5eZU-0006NR-KF for qemu-devel@nongnu.org; Wed, 04 Nov 2009 07:02:44 -0500 Received: from [199.232.76.173] (port=45764 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N5eZU-0006N6-Aa for qemu-devel@nongnu.org; Wed, 04 Nov 2009 07:02:40 -0500 Received: from cantor2.suse.de ([195.135.220.15]:47572 helo=mx2.suse.de) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N5eZT-0004wo-Ed for qemu-devel@nongnu.org; Wed, 04 Nov 2009 07:02:39 -0500 Subject: Re: [Qemu-devel] [PATCH 0/4] net-bridge: rootless bridge support for qemu Mime-Version: 1.0 (Apple Message framework v1076) Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes From: Alexander Graf In-Reply-To: <1257294485-27015-1-git-send-email-aliguori@us.ibm.com> Date: Wed, 4 Nov 2009 13:02:36 +0100 Content-Transfer-Encoding: 7bit Message-Id: <5F92BA13-77B1-4BAB-B009-F0D864D0C4CB@suse.de> References: <1257294485-27015-1-git-send-email-aliguori@us.ibm.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Mark McLoughlin , Arnd Bergmann , Dustin Kirkland , Juan Quintela , qemu-devel@nongnu.org, Michael Tsirkin On 04.11.2009, at 01:28, Anthony Liguori wrote: > This series solves a problem that I've been struggling with for a > few years now. > One of the best things about qemu is that it's possible to run > guests as an > unprivileged user to improve security. However, if you want to have > your guests > communicate with the outside world, you're pretty much forced to run > qemu as > root. > > At least with KVM support, this is probably the most common use case > which means > that most of our users are running qemu as root. That's terrible. Yeah. Worse than the "run as root" part is the "it's hard" part though. I hate how I feel when I try to explain someone how to use non- slirp networking :-(. The response to that is then usually "oh whatever, it's too complicated anyways". > We address this problem by introducing a new network backend: -net > bridge. This > backend is less flexible than -net tap because it relies on a helper > with > elevated privileges to do the heavy lifting of allocating and > attaching a tap > device to a bridge. We use a special purpose helper because we > don't want > to elevate the privileges of more generic tools like brctl. > > From a user perspective, to use bridged networking with a guest, you > simply use: > > qemu -hda linux.img -net bridge -net nic > > And assuming a bridge is defined named qemubr0 and the administrator > has setup > permissions accordingly, it will Just Work. My hope is that > distributions will > do this work as part of the qemu packaging process such that for > most users, > the out-of-the-box experience will also Just Work. Yeah, that won't work as easily. When your customer has 2 NICs this will already break. But let's imagine we only have a single NIC. So that NIC is a wifi card. When I set up the qemubr0 bridge for that one now, how does network manager configure my wifi access? It can't use the bridge device, as that doesn't have wifi extensions. It also can't use the wifi device, because setting up networking on that will break. IMHO the only customer friendly choice I see is the ugly way. The way VMware and Vbox do it. To make it a bit less ugly, maybe we could create some way to "glue" a tap device and an eth together, the same way the bridge code does, just without the extra device. Alex