Child pages
  • Xen

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

            LAN
             |
 +-----------+---------+
 |           |         |
| eth0 |
| | |  | +---------+-------+ | | | | | |
| | dummy | |
| | | | | | xenbr0 | | | | | | | | vif0.0 vif1.0 | | | | | | | | | +---+---------+---+ | | | | | | +---+---+ +---+---+ | | | | | | | | | | | eth0 | | eth0 | | | | | | | | | | DomU0 | | DomU1 | |
| +-------+ +-------+ | +---------------------+

/etc/network/interfaces example for single MAC address on the LAN.  The DomUs are configured to use 192.168.42.100 as default gateway:

...
# Configure netfilter
pre-up iptables-restore < /etc/iptables.conf
...
# dummy0
auto dummy0
iface dummy0 inet manual
 
# xenbr0
auto xenbr0
iface xenbr0 inet static
    bridge_ports dummy0
    address 192.168.42.100
    broadcast 192.168.42.255
    netmask 255.255.255.0
    bridge_stp off       # Disable Spanning Tree Protocol
    bridge_waitport 0    # No delay before a port becomes available
    bridge_fd 0          # No forwarding delay

Bridge references

...

On Debian, to set them during boot, put them in /etc/sysctl.conf

TODO: give examples of iptables rules that do routing.

NATting

To set up NATting (example is for eth0):

...

Its format, for use with the xl toolstack, is documented at http://xenbits.xen.org/docs/unstable/man/xl.cfg.5.html.

Kernel parameters

Use the extra configuration item.

.html.

(warning) xl shutdown and reboot does not effect changed configuration items; a create is required.

Kernel parameters

Use the extra configuration item.

Memory

Set by the memory configuration item.  Numeric only (no M or G suffix allowed).  Units are MB (or MiB?).

vif

vif (Default=[]; Value="type=TYPE, mac=MAC, bridge=BRIDGE, ip=IPADDR, script=SCRIPT," + \ "backend=DOM, vifname=NAME, rate=RATE, model=MODEL, accel=ACCEL" )

...

When creating Debian systems it uses debbootsrap (described above).

Required Debian packages

ntp is required.  Ref: http://xen.1045712.n5.nabble.com/keeping-time-in-sync-tp5725115p5725116.html

Controlling DomUs

Start a DomU

...

To shutdown the OS and destroy the DomU: xl shutdown <DomU config path><domain-id>

For example:

cd /etc/xen && xl list
xl shutdown <domain-id> 5

In case the DomU's OS has been stopped (or will not stop!): xl destroy <domain-id>

...

Detach from the console by Ctl+[ ] or, for putty, Ctl+5

 

Troubleshooting

...

File or directoryUsageNotes
/etc/default/xenToolstack selection 
/etc/default/xend  
/etc/default/xendomainsDomain startup and shutdown config 
/etc/xen/​ConfigurationConfiguration 
/etc/xen/*.cfgIndividual DomU configs 
/etc/xen/scripts/Scripts (smile) and scrippetsAs installed, all bash scripts.  More: Xen scripts
/etc/xen/xend-config.sxpxend daemon (and xen-tools) configuration 
/etc/xen/xlxl defaults config 
/proc/xen/xen-kernel information 
/var/lib/libvirt/imagesFile-based images 
/var/lib/xen/dump/Guest core dumps 
/var/log/xenLogs 

...