qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] Use existing tun/tap network interface


From: Thomas Schwinge
Subject: Re: [Qemu-devel] [PATCH] Use existing tun/tap network interface
Date: Sun, 28 Nov 2004 17:07:20 +0100
User-agent: Mutt/1.4.2.1i

On Sat, Nov 27, 2004 at 11:54:30AM +0100, Lars Munch wrote:
> The attached patch adds a new option '-tun-if' which will enable you to
> use preconfigured tun/tap network interfaces as described here:
> http://user-mode-linux.sourceforge.net/UserModeLinux-HOWTO-6.html#ss6.7

I've been preparing a patch to achieve the same functionality some days
ago, but didn't have the time to finish it, yet.
It is, however, working: 'qemu-net-if.patch' is attached.

Things to be done:
* Make it possible to use '-net-if ...' and '-tun-fd ...' at the same
  time without interfering with each other - albeit I don't know if
  anybody will use both of them at the same time, ever.
* Disable the invocation of a tap/tun network init script when
  specifying '-net-if ...' or '-tun-fd ...'

> To use it, first configure your interface by using for example tunctl
> from UML:
> 
> # tunctl -t qemu0 -u OWNER
> # ifconfig qemu0 xxx.xxx.xxx.xxx up
> 
> Now you will have a network interface called 'qemu0'.

Wrapping that in other words:
You configure the network interfaces to be used by qemu in your system's
network configuration script (or anywhere else) and can use that
interface later without starting qemu (or a wrapper script) as root.

> Then start qemu with something like this:
> 
> # qemu -tun-if qemu0 .....

I'm adding '-n /bin/true' here.


Regards,
 Thomas

Attachment: qemu-net-if.patch
Description: Text document


reply via email to

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