FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 01-05-2010, 10:30 PM
T o n g
 
Default KVM networking

On Tue, 05 Jan 2010 15:02:29 +0000, Jon Dowland wrote:

>> > How I can run KVM w/ network support under normal user?
>>
>> http://www.linux-kvm.org/page/Networking
>
> This page is very good, but the instructions under "public bridge" are
> not applicable to Debian.

This is really an excellent post. I have questions on KVM networking for
quite a while. Relating to this, my questions are:

I want all users in the kvm group can start kvm and have network access.
Does this require different setting than your previous answer?

> I have a public bridge setup on Debian for KVM VMs. I have network
> access via Ethernet, using interface 'eth0'. I have the following
> /etc/network/interfaces:
>
> <begin>
> iface eth0 inet manual
>
> auto br0
> iface br0 inet dhcp
> pre-up /usr/sbin/tunctl -u jon -t tap0 pre-up ifconfig tap0 up
> bridge_ports all tap0
> post-down ifconfig tap0 down
> post-down tunctl -d tap0
> <end>

If I config my box with static address before, say:

auto eth0
iface eth0 inet static
address 192.168.0.100
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1

what should my '/etc/network/interfaces' file be now? (please give full
file, not just some segments)

Having restarted networking, do I now need to use br0 instead of eth0 for
all primary network interface? E.g., instead of,

xnetload -if eth0

I now need to say

xnetload -if br0

? That seems quite a big change to me. Will all exiting networking tools
know not to use eth0 as the primary network interface any more
automatically?

> . . .
> In this case, I run my VM as the user 'jon'. This is reflected in the
> '-u jon' argument to tunctl.

In this case, can other people in the kvm group use br0 as well?

Thanks

--
Tong (remove underscore(s) to reply)
http://xpt.sourceforge.net/techdocs/
http://xpt.sourceforge.net/tools/


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 01-07-2010, 03:13 PM
Jon Dowland
 
Default KVM networking

On Tue, Jan 05, 2010 at 11:30:46PM +0000, T o n g wrote:
> I want all users in the kvm group can start kvm and have
> network access. Does this require different setting than
> your previous answer?

I believe so, see below.

> If I config my box with static address before, say:
snip
> what should my '/etc/network/interfaces' file be now?
> (please give full file, not just some segments)

auto lo
iface lo inet loopback
iface eth0 inet manual

auto br0
iface br0 inet static
address 192.168.0.100
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1
pre-up /usr/sbin/tunctl -u jon -t tap0
pre-up ifconfig tap0 up
bridge_ports all tap0
post-down ifconfig tap0 down
post-down tunctl -d tap0

> Having restarted networking, do I now need to use br0
> instead of eth0 for all primary network interface?
(snip example)
> know not to use eth0 as the primary network interface any
> more automatically?

I believe you can continue to refer to eth0 as you wish
(certainly I do in the case of wireshark, for instance)

> In this case, can other people in the kvm group use br0 as
> well?

What tunctl does is configure a tap device and give user jon
access to it. The tap device is plumbed into the br0 bridge
(the user jon does not need to manipulate the bridge
directly). This would not give other users access to that
tap device.

Looking at the source code for tunctl, it seems to support a
'-g' argument to specify a group for the tap device, in a
similar way to the -u argument. This is missing from the man
page, however.

Having said all that, I don't think you want each VM to
write to the same tap device: you want one per VM. So, to
have a second VM, you would need to:

* add 'tap1' to the end of the 'bridge_ports' line
* copy all other lines with 'tap0', changing to 'tap1'

If you wanted a more flexible, dynamic scheme, I think you
would need to use another approach.

--
Jon Dowland
 
Old 01-08-2010, 01:26 PM
T o n g
 
Default KVM networking

On Thu, 07 Jan 2010 16:13:20 +0000, Jon Dowland wrote:

>> I want all users in the kvm group can start kvm and have network
>> access.
>> Does this require different setting than your previous answer?
>
> I believe so, see below. . .

Thanks a lot!

--
Tong (remove underscore(s) to reply)
http://xpt.sourceforge.net/techdocs/
http://xpt.sourceforge.net/tools/


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 08:12 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org