From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bill Davidsen Subject: Re: Simple way of putting a VM on a LAN Date: Wed, 09 Jul 2008 12:28:05 -0400 Message-ID: <4874E715.8040903@tmr.com> References: <170fa0d20806262146s5710198cw7072aeaac4c7f39f@mail.gmail.com> <48649112.7000704@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Mike Snitzer , kvm@vger.kernel.org To: Chris Lalancette Return-path: Received: from mail.tmr.com ([64.65.253.246]:53028 "EHLO gaimboi.tmr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751674AbYGIQXJ (ORCPT ); Wed, 9 Jul 2008 12:23:09 -0400 In-Reply-To: <48649112.7000704@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Chris Lalancette wrote: > Mike Snitzer wrote: >> I've taken to using a bridge (or in virt-manager speak "shared >> physical device"). The 'network-bridge' script (and supporting >> xen-network-common.sh and xen-script-common.sh) that are provided with >> xen rpms (e.g. xen-3.1.0-13.fc8.x86_64.rpm) make this relatively >> painless. >> >> The overall solution is not what I'd call "simple" but once I've >> started the bridge I just defer to libvirtd to abstract away the >> complexity associated with exposing each kvm guest to the physical >> network. > > Yep, exactly. Actually, generally your distribution of choice provides nice > startup scripts to such things; in Fedora, you create an > /etc/sysconfig/network-scripts/ifcfg-eth0 that has a BRIDGE=br0, and an > /etc/sysconfig/network-scripts/ifcfg-br0 that defines the actual bridge with > TYPE=Bridge, and the system will bring up the bridge at bootup and plug your > eth0 into it. I'm sure the other distributions have similar mechanisms. > A bit of the original problem seems to have been clipped before you read it, or I stated it poorly. - the problems are immediate, not permanent hosting. So startup anythings are out, I'd have to put in scripts for every machine I might ever want to host on every machine capable of hosting. - I need to bind an IP, unless you can point me to a different bridge package. If eth0 is x.y.z.10 and I put x.y.z.20 on eth0:1 ifconfig eth0:1 x.y.z.20 up adding eth0:1 moves the whole NIC to the bridge, and the normal functions of the machine come to a halt. I'm probably doing something wrong, currently I'm getting this done by ugly iptables abuse. I am missing some piece on doing this quickly and selectively, for the case of "dns02 just dropped a cooling fan, we need another server, run it on your {whatever} machine for a few minutes." These are immediate and short term, but often done on machines in burn-in state, someone's desktop, etc. Little load, but the service must be running. Does that clarify? -- Bill Davidsen "We have more to fear from the bungling of the incompetent than from the machinations of the wicked." - from Slashdot