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

Re: [Xen-API] How to create Templates for Network Installs that need additional Kernel-parameters ?? eliloader.py - patch suggestion


  • From: "Andreas Balg" <a.balg@xxxxxxxx>
  • Date: Wed, 07 Nov 2012 14:50:22 +0100
  • Cc: xen-api@xxxxxxxxxxxxxxxxxxx
  • Delivery-date: Wed, 07 Nov 2012 13:50:33 +0000
  • List-id: User and development list for XCP and XAPI <xen-api.lists.xen.org>

Hi Grant,

Maybe I just don't get your idea - or maybe you don't get mine. If I make a clone of e.g. a CentOS 6 Template - How am I supposed to put the corresponding kickstart URLs and other parameters like "ksdevice, ip=dhcp, ..." already inside this very template? Why? So Joe average can come along double click the CentOS 6 - template and voila - gets his preconfigured CentOS-system up and running some minutes after?

Even worse - I'd have to give shell access and explain xe commands to joe average in order to have him setup his VM - This is not an option for my needs.

According to your setup he'd have to know the URL of the kickstart-file and he would have to answer initial questions about the NIC used to bootstrap the machine and much more  - this is by no meeans hands-off or automatic isn't it - I don't want it that way and I need that already predefined in a template - This is exactly what I asked for and what could be done with the patch to XenServers eliloader I already included in my post.

If anybody would integrate something like the 3 lines of code into eliloader I'd just define 
xe template-params set other-config:installer-args="ip=dhcp ksdevice=eth0 ks="http:..."  once for a TEMPLATE and I'm done 

If you are using an intelligent backend-script delivering the respective kickstart-files to your machines afterwards (e.g. satellite or spacewalk ) you can have a really comfortable and really automatic management of your machines configurations.

And actually we've already implemented this for our entire physical infrastructure (and customers) using a database-controlled PXE/cfengine setup to kick in afterward that does the rest - But in order to integrate something like that in a way users are able to use it I'd need to have fixed installer-args already in the template

So my question was: Is there already a way to do this the way I need it or do I have to patch eliloader (which is not very nice of course) - Or ask for possible inclusion of such a patch or similar thing in XenServer/XCP. ...

Your solution - and the (same) way documented in XenServer is allright for your needs , but nevermind, not at all for mine as it seems to me right now.

Cheers
Andreas


Am Montag, 05. Nov. 2012 17h:38m CET, "Andreas Balg" <a.balg@xxxxxxxx> schrieb:

Hello everybody,

I just tried to get a hands off auto-installation-template up and running on XCP 1.6(still beta1)  - But I'm wondering how I might pass those basic extra arguments to the installer-image using eliloader

e.g. in pxeconf I'd say something like:

        KERNEL installer/centos/6/i386/vmlinuz
        APPEND initrd=installer/centos/6/i386/initrd.img ip=dhcp ksdevice=eth0 noipv6 ks=http://mirror.ournet.com/clavis/kickstart/centos/6./i386/basesystem.cfg

I tried to stuff the Kickstart-parameters "ip=dhcp ksdevice=eth0 noipv6 ks=http://mirror.ournet.com/kickstart/centos/6.3/i386/basesystem.cfg" in PV-args of the Template - but as expected, for the first time the installer runs eliloader.py It does not seem to take those into account but replace it with it's autogenerated stuff.

Is there another way I do not understand how I am supposed to do this in XCP 1.6 or would I have to make something like the patch for eliloader.py below
introducing yet another "other-config" as I did in the experimenetal patch below (which works for me - but I'd rather prefer not to patch the hypervisor-scripts for my needs ...)

*** /opt/xensource/libexec/eliloader.py.orig    2012-09-14 20:37:37.000000000 +0200
--- /opt/xensource/libexec/eliloader.py 2012-11-05 17:08:56.000000000 +0100
***************
*** 350,355 ****
--- 350,356 ----
             'install-distro':     collect(other_config, 'install-distro', 'rhlike'),
             'install-round':      collect(other_config, 'install-round', '1'),
             'install-arch':       collect(other_config, 'install-arch', 'i386'),
+            'install-args':       collect(other_config, 'install-args', None),
             'install-kernel':     collect(other_config, 'install-kernel', None),
             'install-ramdisk':    collect(other_config, 'install-ramdisk', None),
             'install-proxy':      collect(other_config, 'install-proxy', None),
***************
*** 785,795 ****
--- 786,801 ----

      # Put it all together
      args += " " + extra_args
      if vnc:
          args += " vnc"
      if vncpasswd:
          args += " vncpassword=%s" % vncpasswd

+     # Or set user defined options if available
+     if other_config.has_key('install-args'):
+       args = other_config['install-args']
+
      if ramdisk is not None:
          print 'linux (kernel %s)(ramdisk %s)(args "%s")' % (kernel, ramdisk, args)
      else:

Cheers,
Andreas

--
XiNCS GmbH
Schmidshaus 118
9064 Hundwil

Tel.: +41 71 544 47 10
Fax: +41 71 544 47 11

HR-Ar: CH-300.4.015.621-9
MwSt.: CHE-114.002.95


_______________________________________________
Xen-api mailing list
Xen-api@xxxxxxxxxxxxx
http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api

 


Rackspace

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