WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] xenapi.VM.create() with (data) uri for PV_kernel and PV_ramd

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] xenapi.VM.create() with (data) uri for PV_kernel and PV_ramdisk
From: Andreas Florath <xen@xxxxxxxxxxxx>
Date: Tue, 14 Jul 2009 21:02:37 +0200
Delivery-date: Tue, 14 Jul 2009 12:03:08 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla-Thunderbird 2.0.0.19 (X11/20090103)
Hello!

In my environment there is a central management system which starts
domUs on different dom0s.  This should be done with the help
of the XenAPI.  The problem is that when creating a VM, the remote
local filename must be specified (PV_kernel and PV_ramdisk).
This is a kind of strange; especially when a shared storage between all
dom0s is not possible.
To fix this, I added support for the data uri (as described in RFC 2397)
for the PV_kernel and PV_ramdisk parameters. So it is now possible to
specify the vm in the management system like:
    vmdesc = {
        'memory_dynamic_max': 96 * 1024 * 1024,
        'memory_static_max': 96 * 1024 * 1024,
        'PV_kernel': schema_data.create_from_file(
            "/debian/images/vmlinuz-2.6.26-2-xen-686"),
        'PV_ramdisk': schema_data.create_from_file(
            "/debian/images/initrd.img-2.6.26-2-xen-686"),
    ... }
    xenapi.VM.create(vmdesc)
The images are send base64 encoded to the remote host; there the files
are extracted and the vm is started with these files (mostly the same
idea as in pygrub).

The attached code should be seen as PoC.  The following things must be done:
o Add more test cases (file writer is not tested very well)
o The temp files must be deleted at some point of time (check how this
is done in pygrub).
o Add more encodings (RFC 2397 allows also URL encoding) [Really needed?]
o What about other language bindings? (Java, C, ...)
o Adapt documentation

My questions:
1) What do you think about this approach?
2) Is there a chance that this idea will make it to the xen-unstable some
   day?

If there is some kind of 'yes' for the second question, I'll invest some
time and clean up the code and handle the other ToDos.

Any additional hints / remarks are welcome.

Kind regards

Andreas Florath

Attachment: fileuri-0.1.tar.gz
Description: GNU Zip compressed data

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] xenapi.VM.create() with (data) uri for PV_kernel and PV_ramdisk, Andreas Florath <=