public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* Trouble understanding net config options
@ 2009-07-15 22:54 Michael Jinks
  2009-07-15 23:05 ` Stephane Bakhos
  2009-07-15 23:07 ` Andreas Plesner Jacobsen
  0 siblings, 2 replies; 15+ messages in thread
From: Michael Jinks @ 2009-07-15 22:54 UTC (permalink / raw)
  To: kvm

On my desktop I have KVM working and one guest running, with the command line:

 # kvm -m 512M -net nic -net tap -hda /dev/mapper/pile-evil64 -boot c
-vnc :2 -smp 2 -nographic

Next I need to set up a virtual network for testing.  The plan calls
for four guest systems, and two virtual networks, one connected to the
outside world through eth0, and the other with no gateway, just
passing traffic back and forth between the VM's.  All the VM's wil
need to have two NICs each, one connected to each of the two virtual
networks.

So, having the OS automatically assign tap interfaces to guest NICs
isn't going to work.  I need to specify which tap goes to which
virtual bridge, and I'd like that to be consistent across VM reboots.

I have the bridges and several tap interfaces configured.  Here's my
'brctl show' output:

bridge name	bridge id		STP enabled	interfaces
br0		8000.00144fa1f17a	no		eth0
							tap0
							tap1
							tap12
							tap14
							tap16
							tap18
br1		8000.deadbeef3200	no		tap11
							tap13
							tap15
							tap17
							tap9

Now I want to bring up a VM with two NICs, one attached to tap12
(bridge 0), the other on tap11 (bridge 1), but I think I've
misunderstood the versious "-net" options as described in the kvm man
page.  It *seems* to say that the way to map a specific tap to a
specific guest NIC is to say, "-net nic" followed by "-net
tap,name=<name of the tap from the host OS's perspective>", and repeat
that sequence for each nic to appear within the VM.

So, here's the full command line I tried, based on that reading:

  # kvm -m 512M -net nic -net tap,name=tap11 -net nic -net
tap,name=tap12 -hda /vmstore/wee -vnc :11 -cdrom
/path/to/my/Windows.iso -boot d

But when I try that, the host OS brings up two new tap interfaces
(tap2 and tap3), the guest OS never boots (at least, nothing pops up
on its console through VNC), and networking on my system completely
freezes up until I kill -9 the kvm process (kill -15 is ignored) and
restart br0.

I tried "fd=" instead of "name=", but that looks for a file descriptor
instead of a network interface name, and I didn't even know that Linux
had file descriptors for network interfaces let alone how to map them
to a tap.  Nothing under /dev looks promising.

Clearly, I am confused.

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2009-07-16  0:03 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-15 22:54 Trouble understanding net config options Michael Jinks
2009-07-15 23:05 ` Stephane Bakhos
2009-07-15 23:08   ` Michael Jinks
2009-07-15 23:12     ` Stephane Bakhos
2009-07-15 23:12   ` Andreas Plesner Jacobsen
2009-07-15 23:17     ` Michael Jinks
2009-07-15 23:24       ` Chris Webb
2009-07-15 23:41         ` Michael Jinks
2009-07-16  0:03           ` Charles Duffy
2009-07-15 23:48     ` Andreas Plesner Jacobsen
2009-07-15 23:07 ` Andreas Plesner Jacobsen
2009-07-15 23:22   ` Michael Jinks
2009-07-15 23:27     ` Stephane Bakhos
2009-07-15 23:35     ` Andreas Plesner Jacobsen
2009-07-15 23:42       ` Michael Jinks

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox