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-users

Re: [Xen-users] xen 4.1.1 - xl create and python in config files

To: Sébastien Riccio <sr@xxxxxxxxxxxxxxx>
Subject: Re: [Xen-users] xen 4.1.1 - xl create and python in config files
From: Task Struct From Hell <taskstructfromhell@xxxxxxxxx>
Date: Sun, 10 Jul 2011 20:25:47 -0400
Cc: xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Sun, 10 Jul 2011 17:27:06 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=31OExMDEnDEcm7p53VboXk0orWVctRgtosN71CFQZ2Q=; b=iGB6wNJ0XEpD1EA8Gtjl03I9M7kmWBpIMCMo7QExKMmDGVK6rDQxWJrVgbe9HhGtkM QMTdANg7DtaUDkCjrpE43XZrr+BuroFyB1viUQeiRANJIXmg7CErzMEdX2gBWk9Ow8OU STENIM2OuFyaFp9941rUa6aByH6k1pTDdWFNs=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4E19458E.4020009@xxxxxxxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <4E19458E.4020009@xxxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
2011/7/10 Sébastien Riccio <sr@xxxxxxxxxxxxxxx>:
> Hi,
>
> I am in the process of upgrading some xen installations from 3.x to 4.1.1
> and
> got into this:
>
> box# xl create vm1.cfg
> warning: Config file looks like it contains Python code.
> warning:  Arbitrary Python is no longer supported.
> warning:  See http://wiki.xen.org/xenwiki/PythonInXlConfig
> Failed to parse config file: Invalid argument
>
> I'm using python stuff to define vifs and disks related to vm
> name:
>
> bootloader = "/usr/bin/pygrub"
> memory = 1024
> name = "vm1"
> vcpus = 4
> vif = [ 'ip=10.111.5.10 10.111.5.11, bridge=trunk0, vifname=%s.0' % (name),
> 'ip=192.168.50.83, bridge=trunk1, vifname=%s.1' % (name) ]
> disk = [ 'tap2:vhd:/cloud/data2/machines/%s.vhd,xvda,w' % (name) ]
> root = "/dev/xvda1"
> extra = "fastboot"
> ip = "10.111.5.10"
> netmask = "255.255.0.0"
> gateway = "10.111.0.1"
> hostname = "vm1.myhost.ch"
> on_poweroff = 'destroy'
> on_reboot = 'restart'
> on_crash = 'restart'
> xen_shell = 'shelladmin %s' % (name)
>
> Is there a workaround for this ? I headed to the suggested page
> http://wiki.xen.org/xenwiki/PythonInXlConfig but it doesn't seems
> to exists.

In Xen 3.4.x and below, xend would assume the configuration file was a
python module and you were therefore allowed to use python statements
and constructs to describe the configuration options dynamically.  If
using that config file is a must, then you should use xend just as
before. Otherwise, you should read the guide to Xen 4.1 from the link
below:

http://wiki.xensource.com/xenwiki/MigrationGuideToXen4.1%2B

    -- TSFH

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users

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