[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-API] Cloning and Templates



I'm building a system that needs to be able to bring up fresh VMs rather
quickly, and I've had experience scripting around with lvm2
copy-on-write snapshots for this in the past.  The trouble now is that
I'll be needing to manage a pool of physical servers that host VMs, and
I'm hoping to save myself the fuss of maintaining much of this
infrastructure myself, and using the Xen API to do most of the remote
legwork.

Looking through the xen-api docs in the Xen 3.2 source tree, I found:

        \subsubsection{RPC name:~clone}

        {\bf Overview:} 
        Clones the specified VM, making a new VM. Clone automatically
        exploits the capabilities of the underlying storage repository
        in which the VM's disk images are stored (e.g. Copy on Write).
        This function can only be called when the VM is in the Halted
        State.

This seems tailor-made for my needs!  Unfortunately I've had some
trouble trying to figure out what I need to do to make it work.  

The documentation does talk about a 'template' type for VMs, but I can
find no formal documentation of same: all google turns up for me is a
more casual use of the term.  

Ignoring the 'template' status, I ran xen-create-image from the shell
and then popped into python and ran VM.get_all_records() (which appears
nowhere in the API documentation that I can find, and I only know about
it because of the examples[1]).  All that I got back was the dom0, and
get_all() just gave me the all-zeroes UID that was the dom0 key.

Is there better documentation for this sort of task somewhere?  Am I
going on the right path by using the Xen API over some kind of remote
connection to each physical server?  I did see mention of all kinds of
pooling and management techniques, but I'm a bit lost as to whether
they'd be supported in Xen 3.2.

-- 
"There should be a homonym exam before people are         Nick Moffitt
issued keyboards."     -- George Moffitt                 nick@xxxxxxxx

1: 
http://ca.downloads.xensource.com/XenServer-5.0.0RC4/api/client-examples/python/index.html

_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.