debuggers.hg

annotate stubdom/README @ 22848:6341fe0f4e5a

Added tag 4.1.0-rc2 for changeset 9dca60d88c63
author Keir Fraser <keir@xen.org>
date Tue Jan 25 14:06:55 2011 +0000 (2011-01-25)
parents fd6946ad6816
children
rev   line source
keir@17909 1 IOEMU stubdom
keir@17909 2 =============
keir@17909 3
keir@17909 4 This boosts HVM performance by putting ioemu in its own lightweight domain.
keir@17909 5
keir@17173 6 General Configuration
keir@17173 7 =====================
keir@17173 8
keir@18240 9 Due to a race between the creation of the IOEMU stubdomain itself and allocation
keir@18240 10 of video memory for the HVM domain, you need to avoid the need for ballooning,
keir@18240 11 by using the hypervisor dom0_mem= option for instance.
keir@18240 12
keir@18240 13
keir@19634 14 There is a sample configuration set in xmexample.hvm-stubdom
keir@18264 15
keir@20014 16 In your HVM config "hvmconfig" use stubdom-dm as dm script:
keir@17173 17
keir@20014 18 device_model = 'stubdom-dm'
keir@17173 19
keir@17173 20
keir@17066 21 To run
keir@17066 22 ======
keir@17066 23
keir@18121 24 mkdir -p /exports/usr/share/xen/qemu
keir@18121 25 ln -s /usr/share/xen/qemu/keymaps /exports/usr/share/xen/qemu
keir@17255 26 mkdir -p /exports/var/lib
keir@17255 27 ln -s /var/lib/xen /exports/var/lib
keir@17066 28 /usr/sbin/fs-backend &
keir@17066 29
keir@17173 30 xm create hvmconfig
keir@17909 31
keir@17909 32
keir@17909 33
keir@17909 34 PV-GRUB
keir@17909 35 =======
keir@17909 36
keir@17909 37 This replaces pygrub to boot domU images safely: it runs the regular grub
keir@17909 38 inside the created domain itself and uses regular domU facilities to read the
keir@17909 39 disk / fetch files from network etc. ; it eventually loads the PV kernel and
keir@17909 40 chain-boots it.
keir@17909 41
keir@17909 42 Configuration
keir@17909 43 =============
keir@17909 44
keir@17909 45 In your PV config,
keir@17909 46
keir@20014 47 - use pv-grub.gz as kernel:
keir@17909 48
keir@20014 49 kernel = "pv-grub.gz"
keir@17909 50
keir@17909 51 - set the path to menu.lst, as seen from the domU, in extra:
keir@17909 52
keir@17909 53 extra = "(hd0,0)/boot/grub/menu.lst"
keir@17909 54
keir@21044 55 or you can provide the content of a menu.lst stored in dom0 by passing it as a
keir@21044 56 ramdisk:
keir@21044 57
keir@21044 58 ramdisk = "/boot/domU-1-menu.lst"
keir@21044 59
keir@21044 60 or you can also use a tftp path (dhcp will be automatically performed):
keir@17909 61
keir@17909 62 extra = "(nd)/somepath/menu.lst"
keir@17909 63
keir@21044 64 or you can set it in option 150 of your dhcp server and leave extra and ramdisk
keir@21044 65 empty (dhcp will be automatically performed)
keir@17909 66
keir@17909 67 Limitations
keir@17909 68 ===========
keir@17909 69
keir@17909 70 - You can not boot a 64bit kernel with a 32bit-compiled PV-GRUB and vice-versa.
keir@17909 71 To cross-compile a 32bit PV-GRUB,
keir@17909 72
keir@17909 73 export XEN_TARGET_ARCH=x86_32
keir@17909 74
keir@17909 75 - bootsplash is supported, but the ioemu backend does not yet support restart
keir@17909 76 for use by the booted kernel.
keir@18662 77
keir@21044 78 - PV-GRUB doesn't support virtualized partitions. For instance:
keir@21044 79
keir@21044 80 disk = [ 'phy:hda7,hda7,w' ]
keir@21044 81
keir@21044 82 will be seen by PV-GRUB as (hd0), not (hd0,6), since GRUB will not see any
keir@21044 83 partition table.
keir@21044 84
keir@18662 85
keir@18662 86 Your own stubdom
keir@18662 87 ================
keir@18662 88
keir@18662 89 By running
keir@18662 90
keir@18662 91 cd stubdom/
keir@18662 92 make c-stubdom
keir@18662 93
keir@18662 94 or
keir@18662 95
keir@18662 96 cd stubdom/
keir@18662 97 make caml-stubdom
keir@18662 98
keir@18662 99 you can compile examples of C or caml stub domain kernels. You can use these
keir@18662 100 and the relevant Makefile rules as basis to build your own stub domain kernel.
keir@18662 101 Available libraries are libc, libxc, libxs, zlib and libpci.