qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] tap devices in a bridge


From: justin
Subject: [Qemu-devel] tap devices in a bridge
Date: Wed, 12 Jul 2006 22:56:26 -0000
User-agent: KMail/1.8.2


Here's the problem :

running Qemu 0.8.1 binary (as provided on the download page),
both with and without kqemu accelerator.

I want to be able to run a virtual LAN of Virtual machines
within my PC, that is seperate from the physical LAN the host PC
is connected to.

I don't want to use the socket/listen or socket/connect approach,
because if the primary VM (the one called with socket/listen)
crashes, the whole virtual LAN stops working.

My "qemu-ifup" script configures tap0 for a single virtual machine,
but creates a bridge (combining 2 or more tap devices) for 2 or
more virtual machines.

Everything works well, until I want to shutdown a virtual machine
whose tap device forms part of the bridge. When the Qemu session
ends, the bash prompt isn't returned. This is because the bridge
is still showing the tap device (brctl show), even though the tap
device no longer exists (brctl delif tap1). The only way to get
the prompt back after Qemu exits is to remove the bridge module
(rmmod bridge).

Question :

Would it be possible to have an /etc/qemu-ifdown script ?
This way I could remove the VM's tap device from the bridge,
and delete the bridge if the last VM was being shutdown. The
only other way I can see, is to modify each guest Linux O.S,
such that its shutdown script runs a remote command to the host
to remove its tap device from the bridge.

Another question, not entirely unrelated :

It says in the man page......

"fd=h can be used to specify the handle of an already opened
host TAP interface"

Is there any reason why I can't create a tap device using
"tunctl", and then use the fd parameter when starting qemu ?

I've tried using "fd=h" and "fd=0" (for tap0), and when I ping
the host from the guest, I see (in the terminal that launched qemu) :

ÿÿÿÿÿÿRTRT4VÀ¨À¨

...repeated for each failed ping response.


Thoughts invited.





reply via email to

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