Ron says -

> I prefer the nat way we do things. Aki and I set things up so when you
> create the domain, it "just happens".

Not to start a xen configuration war here, but bridging and nat each
have different advantages.  If xen puts your virtual Plan 9 server
behind a nat, how do you access it from other machines on your network
or from the outside internet?

Without hacking on the standard xen scripts at all, my bridged
configuration also "just happens".

> This is useful because the way xen works, it gives you a different
> veth every time, so you can't easily stick with a fixed IP/MAC.

You can define a fixed ethernet address in the guest domain config
file.  As the example /n/sources/xen/xen3/etc-xen-plan9 shows:

  name = "plan9"
  vif = [ 'mac=aa:00:10:00:00:10' ]
  disk = ...

You can then configure your DHCP server to assign a fixed IP
address to this MAC.

If you don't use DHCP, then you don't need a fixed MAC, and
you can define all the IP address information in the guest
domain config file.  Just edit the Plan 9 /rc/bin/cpurc script
to contain the command
   eval ip/ipconfig $ipconfig
and set up the domain config file something like this:

name = "p9cpu"
vif = [ '' ]
disk = [ 'file:/usr/xen9/plan9.img,sda,w' ]
extra="""
bootargs=local!/dev/sd00/fossil
venti=/dev/sd00/arenas
ipconfig=-g 192.168.0.1 192.168.0.42
DNSSERVER=192.168.0.1 192.168.0.2
"""

If you configure the Plan 9 guest as a file and auth server, you could
use a second domain config file to define a diskless client, by
omitting the 'disk=' line, and defining the 'extra=' section something
like this:

extra="""
bootargs=tcp -g 192.168.0.1 192.168.0.100
fs=192.168.0.42
auth=192.168.0.42
DNSSERVER=192.168.0.1 192.168.0.2
"""

Reply via email to