qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Kирилл Паленов" <kirill.palenov@gmail.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] multiple VM on one tap device
Date: Thu, 13 Dec 2007 19:57:18 +0300	[thread overview]
Message-ID: <9842d2430712130857m769da6edr516a1ee788f394ec@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1166 bytes --]

Hello all.

Is it possible run several VM connected with one tap device?
I tried to run two VM with allready exist tap0 but when I started second
I've got message: "warning: could not configure /dev/net/tun: no virtual
network emulation Could not initialize device 'tap' ".

I did following under root:

-bash-3.00# tunctl -b -t tap0
-bash-3.00# ifconfig tap0 192.168.4.1 netmask 255.255.255.0 up
-bash-3.00# ifconfig tap0
tap0      Link encap:Ethernet  HWaddr 00:FF:A1:81:05:B0
          inet addr:192.168.4.1  Bcast:192.168.4.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

Then started VM with following parameters:

1. -net nic,macaddr=00:1a:4b:34:74:43 -net
tap,vlan=0,ifname=tap0,host=sv3,script=no
2. -net nic,macaddr=00:1a:4b:34:74:44 -net
tap,vlan=0,ifname=tap0,host=sv4,script=no

I did it under linux kernel 2.6.23.9.

What does it mean fd in -net tap,fd ?  File discriptor of /dev/net/tun  or
tap device.

[-- Attachment #2: Type: text/html, Size: 1949 bytes --]

                 reply	other threads:[~2007-12-13 16:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9842d2430712130857m769da6edr516a1ee788f394ec@mail.gmail.com \
    --to=kirill.palenov@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).