Skip to contentSkip to conversation

Control tools work

DISCUSSION Charles Coffing 4 participants 4 messages May 31, 2005 – Jun 1, 2005

lore
Share & tools
lore
#0 lore raw

I've been looking at the next-generation of control tools, and see some areas that I think still need some work. I'm working on some code that will be ready "soon", but I wanted to post and get feedback on my ideas now rather than later. Here are the things I'm working on:

1. Providing a higher-level consistent API for domain actions (create, save, migrate, restore, pause, etc).

2. Making the tools/libraries agnostic w.r.t. the guest OS type.

3. Pushing rate-limiting lower into the IO streams.

4. Making xfrd's functionality available as a library.

I'll give you some of my motivation, for each of these items:

1. Higher-level API: This is listed as a task in Andrew/Keir/Christian's Xen Control Tools Design Plan. This is also becoming important to support items #2 and #4.

2. OS agnostic: I can give some examples of where this is not the case (migrations assume Linux; rate limiting is only Linux, etc). But beyond specific examples, making things OS agnostic forces some concepts to be clarified in the code. High-level commands (such as "create") logically have a fixed sequence of steps, regardless of the OS type. Those high-level logical steps should be separate from OS-specific implementation details. Mixing the two creates maintenance and portability headaches.

3. Rate limiting: Rate limiting should be available to all IO streams, regardless of OS and regardless of the current action. Currently it is only available for a Linux domain. I'm pushing this down the stack, so that it is more transparent (but optional still).

4. libxfrd: Xend and xfrd are tied pretty tightly together via an SXP-based protocol. Once xend is gone, either xfrd will need to be reworked or the xend replacement will need to adhere to this protocol. Since we're moving towards multiple single-purpose tools (e.g., VM-tools), continuing to maintain this protocol would be awkward. I would prefer to have xfrd's functionality available as a library, that any tool can link against. I still see the receiving end of xfrd running as a daemon (a small daemon using the xfrd library, that is). But commands that want to initiate xfrd-style sends can call the library directly. Other advantages of this are that progress reports can be done via a simple C callback, and you can get finer-grained error reporting (rather than the current success/failure code). Once you start looking at this within a larger management framework, these things become important.

I'm refactoring / rewriting / writing code in xutil, libxc, and xfrd (although it wouldn't be hard to slip libxen in there instead of libxc if that is the ultimate direction). I hope to have something to show in a week or two.

Cheers,
Charles

#1 lore raw
Quoted 2 lines · Charles Coffing

1. Providing a higher-level consistent API for domain actions (create, save, migrate, restore, pause, etc).

I'm no longer convinced there is a much higher API to have. Except for create and migrate, all the actions you list are already single functions in libxc, migrate is save | restore. It might be useful to group several functions together for create, but it's not quite clear how/where device configuration fits in there.

Quoted 4 lines

I'm refactoring / rewriting / writing code in xutil, libxc, and xfrd (although it wouldn't be hard to slip libxen in there instead of libxc if that is the ultimate direction). I hope to have something to show in a week or two.

Please note that xfrd does no longer exist in -unstable. Also we don't use libxutil anymore.
Xend handles the first half of a relocation itself and then runs the xc_save or xc_restore helper programs to do the second part. During the first part of a relocation, the xend domain configuration is exchanged and the format of this part is specific to xend. The xc_save and xc_restore helpers are merely wrappers for the xc_linux_save and xc_linux_restore functions and use pipes to communicate with xend and write/read the virtual machine image to/from a file handle or socket.

christian

#2 lore raw
In reply to Charles Coffing
Quoted 1 line · Charles Coffing

2. Making the tools/libraries agnostic w.r.t. the guest OS type.

I recently created a small Xen guest that is able to build a guest OS from a ramdisk containing a stage2 loader and a kernel image. My goal is to have it load from a block device or the network as well as from the ram disk. Starting my guest instead of vmlinuz directly would allow unification of domain builders from the dom0 perspective, and would prevent ELF-parsing attacks on dom0. The same guest would be used for reviving checkpoints, so there would not need to be a special linux_load (linux_save can be handled using self-checkpointing to a raw device btw).

If there is interest I can post the source.

Jacob

#3 lore raw

I am interested in your code. I don't know if you will be posting the source to the list, but if you decide not to could you at least send it to me? I am currently working on trusted boot (ie TPM support, measuring new domains etc., we were also considering moving the domain builder out of domain0, to a separate domain maybe, I am not quite certain how your builder works, but it looks to be quite a reasonable approach).

Cheers
Gregor

Quoted 20 lines
Quoted 1 line · Charles Coffing

2. Making the tools/libraries agnostic w.r.t. the guest OS type.

I recently created a small Xen guest that is able to build a guest OS from a ramdisk containing a stage2 loader and a kernel image. My goal is to have it load from a block device or the network as well as from the ram disk. Starting my guest instead of vmlinuz directly would allow unification of domain builders from the dom0 perspective, and would prevent ELF-parsing attacks on dom0. The same guest would be used for reviving checkpoints, so there would not need to be a special linux_load (linux_save can be handled using self-checkpointing to a raw device btw).

If there is interest I can post the source.

Jacob

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

Signature · 1 line
Quidquid latine dictum sit, altum viditur --- Anon