Creating Xen Bridge Interface
In my previous blog, I go over a simple how-to for setting up Xen. In this configuration the xen guests are only visible to the xen-host, and any services on the xen-hosts must be accessed via port forwarding, tunneling etc.
For some applications, a bridging configuration works better. you can set this up as follows:
Setup your host interfaces file
On your host system (Dom0), setup an /etc/network/interfaces file similar to:
auto br0
iface br0 inet static
address [HOST IP HERE]
netmask 255.255.0.0
gateway 172.16.254.254
bridge_ports eth0
Check the networking defaults in xen-tools set sensible values for your gateway and netmask in /etc/xen-tools.conf e.g.:
#
# Uncomment and adjust these network settings if you wish to give your
# new instances static IP addresses.
#
gateway = 172.16.254.254
netmask = 255.255.0.0
Create your virtual machines
create your new virtual machine e.g.
xen-create-image --tar=./mynewhostimage.tar.gz --ip=172.16.68.1 --hostname=mynewhost
Now startup your new machine and you should be all set:
xm create mynewhost.cfg