Skip to contentSkip to conversation

Control tools work

DISCUSSION Charles Coffing 5 participants 5 messages May 31, 2005 – Jun 3, 2005

lore
Share & tools
lore
#0 lore raw

Christian,

I've done a pull and now see the functionality in XendCheckpoint.py; thanks for the heads-up.

But how do you see things outside of xm & xend accessing this functionality? In particular, I'm thinking of a CIMOM provider written in C++. Forking/exec-ing an "xm migrate" command is less than ideal, for several reasons (progress reporting, error reporting without having to grok text, overhead on a busy server, ...) In my ideal world, this level of functionality would be in C or C++ libraries, so you can put whatever you want on top of it, be it Python commands or C++ CIMOM code or anything else.

I don't necessarily want to revive the old Python debate, but this does complicate things.

Thanks,
Charles

Quoted 1 line
Quoted 1 line
Quoted 1 line

[email protected] 05/31/05 3:07 pm >>>

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

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

#1 lore raw
Quoted 14 lines · Charles Coffing

Christian,

I've done a pull and now see the functionality in XendCheckpoint.py; thanks for the heads-up.

But how do you see things outside of xm & xend accessing this functionality? In particular, I'm thinking of a CIMOM provider written in C++. Forking/exec-ing an "xm migrate" command is less than ideal, for several reasons (progress reporting, error reporting without having to grok text, overhead on a busy server, ...) In my ideal world, this level of functionality would be in C or C++ libraries, so you can put whatever you want on top of it, be it Python commands or C++ CIMOM code or anything else.

Quoted 2 lines

I don't necessarily want to revive the old Python debate, but this does complicate things.

Hi Charles,

Please look at vm-tools, a set of C tools for managing Xen systems. It's a work in progress, but it's coming along. We have single purpose C tools that can easily be used to do what you require, whether wrapping them with scripts or accessing them directly.

Here's Anthony's post mentioned the latest version:

http://lists.xensource.com/archives/html/xen-devel/2005-05/msg01080.html

Here's where to get it:

http://www.cs.utexas.edu/users/aliguori/vm-tools/

Thanks,

Dan

#2 lore raw
In reply to Charles Coffing
Quoted 9 lines

But how do you see things outside of xm & xend accessing this functionality? In particular, I'm thinking of a CIMOM provider written in C++. Forking/exec-ing an "xm migrate" command is less than ideal, for several reasons (progress reporting, error reporting without having to grok text, overhead on a busy server, ...) In my ideal world, this level of functionality would be in C or C++ libraries, so you can put whatever you want on top of it, be it Python commands or C++ CIMOM code or anything else.

The basic save/restore stuff is now simplified (in particular has no dependencies on a callback mechanism out of the library). To do e.g. a non-live migrate you then effectively need to:

* work out what the config of the domain is
- do a save
- use the config to create an 'empty' domain
- restore into this, and
* perform final configuration tweaks

The key thing is that the steps with '*' (at least) require config information which xen doesn't have. You can maintain this yourself in your C++ app or, in the new tools world (in progress), get this from 'xenstore'.

There's no real short-cut around this, and it has very little to do with python. There is a real + desired separation of concerns between config info that xen needs to know about (domain instance state) and config info that a 'user' might care about (VM state). This latter info is currently managed by xend (one of its primary functions) but could equally be managed by the vmtools daemon or an arbitrary user app. However since in most scenarios we believe it's sane to keep all this consistent, having a single locus for such config info (viz. xenostore) makes a lot of sense.

Hope this addresses your concerns,

cheers,

S.

#3 lore raw
Quoted 9 lines · Steven Hand

The basic save/restore stuff is now simplified (in particular has no dependencies on a callback mechanism out of the library). To do e.g. a non-live migrate you then effectively need to:

* work out what the config of the domain is
- do a save
- use the config to create an 'empty' domain
- restore into this, and
* perform final configuration tweaks

There's actually still a callback during save, when we need to tell the domain to suspend itself. This uses the control channel between xend and the domain to send a control message to the domain. We could maybe make xc_linux_save talk directly to the domain through xcs or we could use xenstore for suspend requests...

christian

#4 lore raw
In reply to Charles Coffing
Quoted 7 lines · Charles Coffing

Christian,

I've done a pull and now see the functionality in XendCheckpoint.py; thanks for the heads-up.

But how do you see things outside of xm & xend accessing this functionality? In particular, I'm thinking of a CIMOM provider written in C++. Forking/exec-ing an "xm migrate" command is less than ideal, for several reasons (progress reporting, error reporting without having to grok text, overhead on a busy server, ...) In my ideal world, this level of functionality would be in C or C++ libraries, so you can put whatever you want on top of it, be it Python commands or C++ CIMOM code or anything else.

I'm quite happy with the direction the lower level infrastructure is going in. Once the store gets straightened out, the control channel multiplexing daemon becomes less interesting (which is the biggest barrier to tools entry today).

Christian's latest modifications to the xc_save/restore code were fantastic and we were able to start using it quickly. I'd still like to see some of the libxc interfaces refactored a bit (for instance, I'd like xc_domain_create to do a bit less so better error conditions can be obtained) but I think we're going to try to start helping to improve the existing error paths first.

I've always thought of VM-Tools as a mechanism to determine what aspects of Xen needs more work to support additional management tools.

Your point about OS-agnostic interfaces is a good one--there's a bit of a combinatorial domain creation problem as we support more types of domains on more types of architecture (and even if we ever support things other than Linux for dom0).

Regards,

Anthony Liguori

Quoted 42 lines

I don't necessarily want to revive the old Python debate, but this does complicate things.

Thanks,
Charles

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

[email protected] 05/31/05 3:07 pm >>>

Quoted 3 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 3 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

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

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