All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] domUloader
@ 2006-01-16 23:43 Kurt Garloff
  2006-01-17 11:52 ` Anthony Liguori
                   ` (2 more replies)
  0 siblings, 3 replies; 30+ messages in thread
From: Kurt Garloff @ 2006-01-16 23:43 UTC (permalink / raw)
  To: Xen development list


[-- Attachment #1.1: Type: text/plain, Size: 3336 bytes --]

Hi,

one of the troubles with the way xen boots paravirtualized kernels
is that you get the kernel and the initrd from domain 0, whereas
modules that are later loaded are on the domU filesystem.

This is a management headache: You must ensure that the kernel
and initrd you configure in dom0 for domU booting are in sync
with the kernel (modules) in domU.

Jeremy Katz has thankfully created some infrastructure to allow
plugging in bootloaders instead and contributed pygrub.

I extended the infrastructure a bit and added another bootloader.
Unlike pygrub it does not offer a menu and does not parse the
grub menu.lst; it's meant for paravirtualized domains and thus
we accept that the booted kernel is selected differently. By e.g.
a symlink, if one wants to control it from the domU. The bootloader
is called domUloader.

domUloader parses the bootentry (passed via --entry=) and the disk
setup (passed via --disks=). It then sets up loop devices as needed,
scans for partition tables (the exported disks / loop devs can
contain partitions) using kpartx (dm) and sets them up, so the kernel
and initrd can be copied to a temporary location in dom0. 
The bootentry may contain a dev: prefix describing the partition
(from a domU perspective!) where kernel and initrd are located,
followed by kernel filename and (optional) initrd filenames relative
to the filesystem on dev:.
The kernel and initrd filename can also be relative to the domU root
filesystem. The domUloader than evaluates /etc/fstab found in the
root filesystem (passed via --root=) to locate kernel and initrd.
Afterwards everything is cleaned up. (We use the destructors, so
python reference counting makes sure this also happens when
exceptions occur.)

Unlike pygrub, it does use any code to understand filesystems or
partitions; the filesystem support comes from the dom0 kernel,
whereas kpartx (from multipath-tools) is used for the knowledge
of partitions and for setting up device-mapper.

More details by calling domUloader.py --help.

An example config could look like this:
bootentry = hda2:/vmlinuz-xen,/initrd-xen
bootloader = /path/to/domUloader.py
disks = ['phy:VG_Xen/LV_dom5,hda,w', 'file:/var/lib/xen/test,sda,w']
...
assuming LV_dom5 has a second partition with a filesystem containing
vmlinuz-xen and initrd-xen in its root fs (the /boot partition).

or 
bootentry = /boot/vmlinuz-xen,/boot/initrd-xen
bootloader = /path/to/domUloader.py
root = /dev/hda1
disk = ...
assuming that the root filesystem has an /etc/fstab that points the
way to /boot/vmlinuz-xen. (Does not need to be a separate FS.)

The following three mails will contain 
(1) A patch to xend/XenDomainInfo.py, xend/XenBootloader.py and 
    xm/create.py, making sure that all the needed info is passed
    to the bootloader and also stored for reuse on rebooting.
(2) A patch to make pygrub accept the new parameters passed by
    XendBootloader.py (but so far pygrub just ignores them ...)
(3) The domUloader.py script.


Patches are against a working copy (8259) on my laptop; if noone
else will, I can create diffs against mercurial tip.

I hope this is useful to someone and can be integrated into the
Xen distribution.

Enjoy,
-- 
Kurt Garloff, Head Architect, Director SUSE Labs (act.), Novell Inc.

[-- Attachment #1.2: Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 30+ messages in thread
* RE: [PATCH 0/3] domUloader
@ 2006-01-26 10:17 Edwards, Nigel (Nigel Edwards)
  2006-01-26 13:06 ` Mark Williamson
  2006-01-26 13:37 ` Philip R. Auld
  0 siblings, 2 replies; 30+ messages in thread
From: Edwards, Nigel (Nigel Edwards) @ 2006-01-26 10:17 UTC (permalink / raw)
  To: Kurt Garloff, Philip R. Auld; +Cc: Jeremy Katz, Xen development list

> 
> I would really handle iSCSI in dom0 and export sdX/hdX to domU.
> Solves the nasty OOM problem as well and makes your domains know
> less about the underlaying storage. Which is good in my vision
> of virtualization.
> 
There are good arguments for isolating storage management in Dom0.
However, I have been looking at migration of domains with iSCSI
and have found it a pain to fix up so that the iSCSI disk
appears on the same /dev/sdx point in both source and destination
Dom0s.

That is why I have started looking at direct iSCSI attachment in DomU
via initrd. Then storage is fixed up automatically via migration of
network connections. The disadvantage of this, as Kurt points out,
is that it exposes your iSCSI infrastructure into DomU.

Cheers,
Nigel.

> -----Original Message-----
> From: xen-devel-bounces@lists.xensource.com 
> [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of 
> Kurt Garloff
> Sent: 23 January 2006 14:20
> To: Philip R. Auld
> Cc: Xen development list; Jeremy Katz
> Subject: Re: [Xen-devel] [PATCH 0/3] domUloader
> 
> 
> Hi,
> 
> On Fri, Jan 20, 2006 at 06:08:26PM -0500, Philip R. Auld wrote:
> > Of course, that would mean support for root on iSCSI in the 
> installer
> > and mkinitrd code.
> 
> I would really handle iSCSI in dom0 and export sdX/hdX to domU.
> Solves the nasty OOM problem as well and makes your domains know
> less about the underlaying storage. Which is good in my vision
> of virtualization.
> 
> Best,
> -- 
> Kurt Garloff, Head Architect, Director SUSE Labs (act.), Novell Inc.
> 

^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2006-04-17 19:56 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-16 23:43 [PATCH 0/3] domUloader Kurt Garloff
2006-01-17 11:52 ` Anthony Liguori
2006-01-17 14:34   ` Kurt Garloff
2006-01-17 17:28     ` Adam Heath
2006-01-17 21:28       ` Kurt Garloff
2006-01-17 21:41     ` Anthony Liguori
2006-01-18 18:06   ` Jeremy Katz
2006-01-18 23:21     ` Kurt Garloff
2006-01-19  4:31       ` Anthony Liguori
2006-01-19 17:19         ` Jeremy Katz
2006-01-20 20:36           ` Stephen Tweedie
2006-01-20 23:08             ` Philip R. Auld
2006-01-23 14:19               ` Kurt Garloff
2006-01-23 14:59                 ` Philip R. Auld
2006-01-17 12:33 ` [PATCH] " Tim Deegan
     [not found]   ` <1137607621.22846.17.camel@bree.local.net>
2006-01-19 13:06     ` Tim Deegan
2006-01-20 12:43       ` Kurt Garloff
2006-01-23 13:39       ` Tim Deegan
2006-03-22 18:59 ` Matt Ayres
2006-03-22 22:01   ` Kurt Garloff
2006-04-17 19:56     ` Matt Ayres
  -- strict thread matches above, loose matches on Subject: below --
2006-01-26 10:17 Edwards, Nigel (Nigel Edwards)
2006-01-26 13:06 ` Mark Williamson
2006-01-26 13:37 ` Philip R. Auld
2006-01-26 14:01   ` Ian Campbell
2006-01-26 14:20     ` Philip R. Auld
2006-01-26 18:28       ` Kurt Garloff
2006-01-26 18:31         ` Mark Williamson
2006-01-26 18:57         ` Philip R. Auld
2006-01-26 19:14           ` Kurt Garloff

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.