Sébastien Riccio
2011-Jul-10 06:24 UTC
[Xen-users] xen 4.1.1 - xl create and python in config files
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. Any help appreciated :) Thanks, Sébastien _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Fajar A. Nugraha
2011-Jul-10 11:44 UTC
Re: [Xen-users] xen 4.1.1 - xl create and python in config files
2011/7/10 Sébastien Riccio <sr@swisscenter.com>:> 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/PythonInXlConfigThat is expected behaviour.> Is there a workaround for this ?Don''t use xl. xm should still work just fine. -- Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Task Struct From Hell
2011-Jul-11 00:25 UTC
Re: [Xen-users] xen 4.1.1 - xl create and python in config files
2011/7/10 Sébastien Riccio <sr@swisscenter.com>:> 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@lists.xensource.com http://lists.xensource.com/xen-users
Sébastien RICCIO
2011-Jul-14 15:22 UTC
Re: [Xen-users] xen 4.1.1 - xl create and python in config files
On 07/11/2011 02:25 AM, Task Struct From Hell wrote:> > 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@lists.xensource.com > http://lists.xensource.com/xen-users >Hi TSFH, Thank you for your reply. Okay I understand this. It is just that as explained on the page you linked, that xm / xend will be replaced by xl, so I am trying to be up to date with that. But in the meantime I''ve get into other issues with xl, such as it doesn''t support live migrations anymore ? It doesn''t support remus which needs xend (high availability, clone live vm cloning on two hosts, no more xmlrpc daemon). On the other side xl seems to "support" tap:vhd block devices without letting the dom0 in a vegetative state (using xm to create a vm that uses tap2:vhd and ps -aux on dom0 is hanging, etc). What will be the future of opensource xen if these features are gone with xm / xend ? Is that an attempt to force the use of XenServer or XCP ? At this point I don''t really get what are the positive points to move from xm to xl. Do you ? Best regards, Sébastien _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Task Struct From Hell
2011-Jul-15 17:12 UTC
Re: [Xen-users] xen 4.1.1 - xl create and python in config files
2011/7/14 Sébastien RICCIO <sr@swisscenter.com>:> But in the meantime I''ve get into other issues with xl, such as it doesn''t > support live migrations > anymore ? It doesn''t support remus which needs xend (high availability, > clone live vm cloning on > two hosts, no more xmlrpc daemon).I guess this may be a bug and should be reported. I`d try sending a report to the xen-users list about the live migration issue you are currently experiencing. Do note that, VM virtual storage needs to be agile, eg in an NFS/ISCSI/FC setup seen by both hosts in the same way. Also, if the VM isn''t paravirtualized, it will not migrate.> On the other side xl seems to "support" tap:vhd block devices without > letting the dom0 in a > vegetative state (using xm to create a vm that uses tap2:vhd and ps -aux on > dom0 is > hanging, etc).This might be a bug in blktap / tapdisk activation, run the question thru the xen-users list and if not much help, send the question to the xen-devel list. If you have a serial port, it may be helpful to log the serial output somewhere and send it to the xen-devel list.> What will be the future of opensource xen if these features are gone with xm > / xend ? Is thatxl is new a new and lightweight toolstack. Give it sometime and don''t despair ;-)> an attempt to force the use of XenServer or XCP ?XCP is an opensource toolstack which is far better than xend. XS is opensource and has a free edition. For some uses, it might suit your needs!> Atthis point I don''t really get what are the positive points to move from > xm to xl. Do you ?The positive points at the moment may not be very noticeable or clearly known yet, but xend is only useful for home setups. It''s not made to scale.> Best regards, > Sébastien > > > > >-- --- TSFH _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users