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/
Home Products Support Community News


Re: [Xen-API] Start a VM from a .cfg file with xen api

To: Agustín López <Agustin.Lopez@xxxxx>
Subject: Re: [Xen-API] Start a VM from a .cfg file with xen api
From: Stefan de Konink <skinkie@xxxxxxxxx>
Date: Mon, 12 May 2008 19:53:36 +0200 (CEST)
Cc: xen-api@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 12 May 2008 10:53:49 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <482881F6.9080500@xxxxx>
List-help: <mailto:xen-api-request@lists.xensource.com?subject=help>
List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
List-post: <mailto:xen-api@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
On Mon, 12 May 2008, Agustín López wrote:

> I am looking for one example to start a xen VM with the python binding
> of the xen API .
> I am trying:
>    vm = session.xenapi.VM.get_by_name_label(domainU)[0]
> but this get one error because domainU is not started.
> Any tip, please?

I can help you with exactly this problem... but there are currently some
better alternatives. For XenAPI you have to go Xen XML, I'm probably the
only one with an example of this online.

Next to this importing the XenAPI python code is required to for 'useful'
creates. For new users I would advise to go with libvirt's python
bindings. It has more documentation to set such thing up.


xen-api mailing list

<Prev in Thread] Current Thread [Next in Thread>