On Thu, Jun 26, 2008 at 6:54 PM, Bill Davidsen <[EMAIL PROTECTED]> wrote:
> I seem to be missing the "right way" to put a VM on the LAN such that it
> appears to really be a machine on the LAN. This is a requirement for being
> able to deploy internal servers as needed.
>
> For instance, consider a DNS server or outbound mailer at IP 10.x.y.z and
> how to do that with a VM. Current I have not found a way other than putting
> the IP on as an alias, like eth0:1, setting up a tunnel using a bunch of
> stuff from Debian, plugging in a set of moderately complex iptables rules,
> starting the VM using a bunch of obscure -nic options unreleated to the
> actual IP to be provided, and generally a ton of complexity to install and
> remove.
Do some reading on bridged networking, and for configuring bridged
interfaces in Debian.
You'll need to install the tun-utils and bridge-utils packages, and
then configure /etc/network/interfaces to create the bridge device at
boot.
Basically, just move the "address", "netmask", and "gateway" lines
from eth0 to kvmbr0.
As an example:
# eth0 is the primary NIC
# This just needs to be "up" in order for the bridge to use it
auto eth0
# kvmbr0 is the bridge device used for KVM virtual machines
auto kvmbr0
iface kvmbr0 inet static
bridge-ports eth0
bridge-maxwait 5
address 10.1.x.x
netmask 255.255.255.0
gateway 10.1.x.1
Then configure /etc/kvm/kvm-ifup to use kvmbr0 as the bridge.
Then start your VMs. So long as you are using -nic tap, they should
automatically be added to the kvmbr0 interface, and appear on the
network the same as any other server.
There's plenty of how-tos for this on the kvm wiki:
http://kvm.qumranet.com/kvmwiki
--
Freddie Cash
[EMAIL PROTECTED]
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html