qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 4/4] Add support for bridge


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH 4/4] Add support for bridge
Date: Thu, 06 Oct 2011 13:19:45 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.21) Gecko/20110831 Lightning/1.0b2 Thunderbird/3.1.13

On 10/06/2011 01:15 PM, Corey Bryant wrote:


On 10/06/2011 01:49 PM, Anthony Liguori wrote:
On 10/06/2011 10:38 AM, Richa Marwaha wrote:
The most common use of -net tap is to connect a tap device to a
bridge. This
requires the use of a script and running qemu as root in order to
allocate a
tap device to pass to the script.

This model is great for portability and flexibility but it's incredibly
difficult to eliminate the need to run qemu as root. The only really
viable
mechanism is to use tunctl to create a tap device, attach it to a
bridge as
root, and then hand that tap device to qemu. The problem with this
mechanism
is that it requires administrator intervention whenever a user wants
to create
a guest.

By essentially writing a helper that implements the most common qemu-ifup
script that can be safely given cap_net_admin, we can dramatically
simplify
things for non-privileged users. We still support existing -net tap
options
as a mechanism for advanced users and backwards compatibility.

Currently, this is very Linux centric but there's really no reason why it
couldn't be extended for other Unixes.

The default bridge that we attach to is qemubr0. The thinking is that
a distro
could preconfigure such an interface to allow out-of-the-box bridged
networking.

Alternatively, if a user wants to use a different bridge, they can say:

qemu-hda linux.img -net
tap,br=br0,helper=/usr/local/libexec/qemu-bridge-helper
-net nic,model=virtio


Wouldn't it be better to make the syntax:

-net bridge[,br=BRIDGE][,helper=HELPER]

And default BRIDGE to br0 and HELPER to
${prefix}/libexec/qemu-bridge-helper ?

That gives distros a proper way to configure a default bridge making
-net bridge Just Work for most people.

Regards,

Anthony Liguori


Yes I think it would be much more usable under -net bridge. I really wanted this
to work under -net tap (where fd and init are) but now we know there's no good
way to default to the helper without spelling out the path.

I'm certainly in favor of leaving helper as part of -net tap, but I think there should be a -net bridge in addition.

Regards,

Anthony Liguori



reply via email to

[Prev in Thread] Current Thread [Next in Thread]