[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: setting up xen networking

Not a daft question -- the networking model changed a little between toolstacks 
in Xen.  I've had a few other people ask me this recently, so I'll elaborate a 
little more than you need.

The basic goal is to end up with a bridge that connects the external world to 
the Xen VM VIFs.  Every new Xen VM has a virtual interface that is added to 
this bridge if it's specified in the config file (vif=['bridge=xenbr0']).

It used to be the case that xend would, at startup, rebind your external 
interface to a bridged one. This involved renaming the physical interface name, 
which was somewhat error prone.

The modern toolstack (xl) leaves the network bridge setup to the sysadmin to 
take care of.  This is a little more work upfront, but worth doing.  I use this 
in my /etc/network/interfaces:

auto xenbr0
iface xenbr0 inet dhcp
  bridge_ports eth0

The next problem is ensuring that your VM has a vif attached.  Here's how 
mirage-www builds work:

- you send a pull req to mirage/mirage-www
- Travis picks up the commit and checks the build: 
- I merge
- When merged, the Travis script runs again, but also commits the resulting Xen 
binary to another repository: https://github.com/mirage/mirage-www-deployment
- The deployment machine that runs Xen watches this repository and restarts the 
running kernel if a new one appears.  If anything goes wrong, it can roll back 
to the previous Git repo.

It uses this xl config file;

Note that mirari doesnt (yet) have support for adding VIFs to the config files, 
so I tend not to use that.  But I really like the Travis/Mirage-WWW workflow 
and intend to use that more.  We basically use version control to track all our 
dependencies, and existing hosted services to take (most of) the pain out of 


On 24 Oct 2013, at 14:40, Christopher Greenhalgh 
<Chris.Greenhalgh@xxxxxxxxxxxxxxxx> wrote:

> Perhaps this is a daft question, but I’ve not used xen before today…
> how do I set up the networking for a mirage xen application with xen running 
> on by desktop ubuntu machine?
> from http://www.openmirage.org/wiki/xen-boot I’ve built the mirage-www app 
> for xen,
> as per https://help.ubuntu.com/community/Xen I have set up xen on my ubuntu 
> desktop (but with xl toolchain) and rebooted into xen, created a xenbr0 
> interface with bridging
> I can run the vm with xl create, and I see the usual output include “Netif: 
> add resume hook” but nothing else to do with networking.
> I tried “xl network-attach www” (network-list was showing nothing before for 
> the new domain) and that made a vif but still get no console info about 
> whether anything is happening on the mirage network side; does something like 
> this need to be in thewww.xl file?
> My xenbr0 is quite possible on the “wrong” IP running it this way ( 
> so I tried changing www.conf to dhcp but with no output I don’t know if ; no 
> visible action.
> Fool-proof directions welcome :-)
> Cheers
> Chris
> This message and any attachment are intended solely for the addressee and may 
> contain confidential information. If you have received this message in error, 
> please send it back to me, and immediately delete it.   Please do not use, 
> copy or disclose the information contained in this message or in any 
> attachment.  Any views or opinions expressed by the author of this email do 
> not necessarily reflect the views of the University of Nottingham.
> This message has been checked for viruses but the contents of an attachment 
> may still contain software viruses which could damage your computer system, 
> you are advised to perform your own checks. Email communications with the 
> University of Nottingham may be monitored as permitted by UK legislation.



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.