Table of Contents

howo add diskspace to paravirt-domUs

dom0> dd if=/dev/zero of=/mnt/storage/xen/diskfile bs=128M count=1 
#      xm block-attach <Domain> <BackDev>                         <FrontDev> <Mode> [BackDomain]
dom0>  xm block-attach 82       tap:aio:/mnt/storage/xen/diskfile sdd        w      0
dom0> ssh sles10
domU> cat /proc/partitions |tail -1 # now new space comes up
   8    48     131072 sdd
domU> mkfs.ext3 /dev/sdd # and is usable

howto setup linux in paravirt-domUs

howto setup other os in paravirt-domUs

howto set up tty-stuff for para-domU

filesystems/software for xen

running a windows-xp installation both on bare metal and under xen

 mount /dev/sda2 /mnt/tmp
 cat /dev/zero >/mnt/tmp/fillfile # if this stops with comment 'maximum filesize reached' create an other file like this with a different name
                                  # at some point the filesystem is filled up (out of space) and you are done here
 rm /mnt/tmp/fillfile*            # delete the files, the zeros remain and make gzips job of compressing easy
 gzip -3 </dev/sda2 >/mnt/lv_public/xen_sda2_wixpbackup.gz # do the actual backup.
import os, re
arch = os.uname()[4]
if re.search('64', arch):
    arch_libdir = 'lib64'
else:
    arch_libdir = 'lib'
kernel = "/usr/lib/xen/boot/hvmloader"
builder='hvm'
memory = 1024
name = "HVMwixp"
vcpus=2
vif = [ 'type=ioemu, bridge=xenbr0' ]
disk = [ 'phy:/dev/sda,hda,w', 'file:/mnt/lv_public/cdrom.iso,hdc:cdrom,r' ]
on_poweroff = 'destroy'
on_reboot   = 'restart'
on_crash    = 'preserve'
device_model = '/usr/' + arch_libdir + '/xen/bin/qemu-dm'
boot="dcan"
sdl=1
vnc=0
vnclisten="10.0.1.1"
vncconsole=1
vncpasswd=''
stdvga=0
serial='pty'
soundhw='sb16'
usb=1
usbdevice='tablet'
keymap='de'

mounting

mount partitions of a domU with partitiontable from dom0

method 1:
  apt-get install multipath-tools # or whatever you distro uses. contains the kpartx-tool
  kpartx -av /path/to/domu_imagefile # creates a devnode for every partition under /dev/mapper
  mount /dev/mapper/loop4p1 /mnt/tmp # mounts the first partition

method 2:
  lomount -diskimage /mnt/storage/xen/xm64_gfs1 -partition 1 /mnt/tmp # does the same thing

method 3:
  fdisk -l -u /dev/vg1/lv1
  mount -o loop,offset=460615680 /dev/vg1/lv1p2 /mnt # or do a 'losetup -o ...' bevore

xennotes + examples

restrict outgoing traffic of a domU
vif = [ 'brigde=bridge0, rate=10MB/s' ]  # limit outgoing traffic to 10MB/second
rebuild domU-initrd with block-support
compute mac predictable from hostname
let a PV-domU see that its partitions growed
growing sparse-files
xen-vm-config options for windows in a hvm for better input-handling
xen-vm-config options to enable the qemu-menu
xen support for framebuffer of domU (starting with xen 3.0.4), notes by Mark Williamson
  you can run X within the guest directly.
  upgrade to 3.0.4, edit Config.mk to change XENFB_TOOLS to =y and do a make-install tools.  This'll give you the dom0 components
    for accessing the framebuffer.
  compile a domU kernel with framebuffer support in (it's selectable in the kernel menuconfig).  If you want to be able to run virtual
    terminals on the framebuffer,

  you'd also need to select the generic Linux options for the framebuffer console.  I'd recommend you do this.
  domU: /etc/inittab S0:2345:respawn:/sbin/mingetty ttyS0
  domU: /etc/securetty or /etc/securettys (whichever you have)
  domU configfile: "xencons=ttyS0 console=ttyS0 video=xenfb"
  domU configfile: "vfb=['type=sdl']" to get a local display of the domain's framebuffer or vfb=['type=vnc']
    or "vfb=['type=vnc,vnclisten=ipaddr']"
several stuff
00:16:3e:xx:xx:xx IEEE range assigned to XenSource Inc
core2duo board multiplicatorfree: asus P5B Deluxe, P5B Deluxe/WiFi-AP and P5W DH Deluxe starting with BIOS 1405
running Windows in HVM, get audio out of it with a sound server like pulseaudio.

An example debian-interfaces config entry for a bridge:
    auto xbr0
    iface xbr0 inet dhcp
        bridge_fd 0
        bridge_maxwait 0
        bridge_helo 0
        bridge_ports eth0

Manual creation of a simple bridge with enslaved eth0:
    brctl addbr xbr0
    ifconfig eth0 0.0.0.0 up
    brctl addif xbr0 eth0
    ifconfig xbr0 10.0.0.1 netmask 255.255.255.0

Advanced manual bridge:
    brctl addbr xbr0
    brctl setfd xbr0 0
    brctl sethello xbr0 0
    brctl stp xbr0 off
    ifconfig eth0 0.0.0.0 up
    brctl addif xbr0 eth0
    ifconfig xbr0 10.0.0.1 netmask 255.255.255.0