[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


  • To: xen-api@xxxxxxxxxxxxx
  • From: Burnie <burnie@xxxxxx>
  • Date: Fri, 09 Nov 2012 13:07:13 +0100
  • Delivery-date: Fri, 09 Nov 2012 12:07:25 +0000
  • List-id: User and development list for XCP and XAPI <xen-api.lists.xen.org>

On 11/09/2012 11:57 AM, Andreas Balg wrote:
Hello Burnie, Hi Grant, and everybody else reading as well of course,

I'll just pretend you posted this to the list  :-)


thanks a lot for your continued support in this issue - at first I
wanted to make sure I do not misunderstand some concept and making it
more complicated as it should be but I just tried the way Burnie
outlined from within XC (XC 6.1, XCP 1.1 and XCP 1.6b1) and it also did
not work the way it should.


I haven't tried this in XCP 1.1, but it works here in both 1.4.90 and 1.6.06...

I really don't see your problem.


If I try a "quick create", I find this in the xensource.log:

[20121109T11:41:38.079Z|debug|xcp-10|10471|Async.VM.start R:c23fa9ee5de8|bootloader] Bootloader commandline: /usr/bin/eliloader -q --default_args= --extra_args=ks=http://192.168.1.100/kickstart-minimal6-i386.cfg ksdevice=eth0 --vm=198b81d5-caf0-7a03-34dc-7db8a07bcdd2 /dev/xvda [20121109T11:41:52.152Z|debug|xcp-10|10471|Async.VM.start R:c23fa9ee5de8|xapi] build linux "/var/run/xend/boot/vmlinuz-6r20ll" "ks=http://192.168.1.100/kickstart-minimal6-i386.cfg ksdevice=eth0 method=http://mirror.centos.org/centos/6/os/i386"; vcpus:1 mem_max:1048576 mem_target:1048576 [20121109T11:41:52.153Z|debug|xcp-10|10471|Async.VM.start R:c23fa9ee5de8|xenguesthelper] connect: args = [ -mode linux_build -domid 7 -mem_max_mib 1024 -mem_start_mib 1024 -image /var/run/xend/boot/vmlinuz-6r20ll -ramdisk /var/run/xend/boot/ramdisk-QmbQpZ -cmdline ks=http://192.168.1.100/kickstart-minimal6-i386.cfg ksdevice=eth0 method=http://mirror.centos.org/centos/6/os/i386 -features -flags 0 -store_port 1 -console_port 2 -fork true ]


If I do a Wizard create of the same template, the boot args are gone:

[20121109T11:51:58.861Z|debug|xcp-11|1453 inet-RPC|Async.VM.start R:1b8958a8b66e|bootloader] Bootloader commandline: /usr/bin/eliloader -q --default_args= --extra_args= --vm=70f399d2-3339-2563-34d3-a589cad4fde0 /dev/xvda [20121109T11:52:16.025Z|debug|xcp-11|1453 inet-RPC|Async.VM.start R:1b8958a8b66e|xapi] build linux "/var/run/xend/boot/vmlinuz-5O6uuP" " method=http://mirror.centos.org/centos/6/os/i386"; vcpus:1 mem_max:1048576 mem_target:1048576 [20121109T11:52:16.026Z|debug|xcp-11|1453 inet-RPC|Async.VM.start R:1b8958a8b66e|xenguesthelper] connect: args = [ -mode linux_build -domid 8 -mem_max_mib 1024 -mem_start_mib 1024 -image /var/run/xend/boot/vmlinuz-5O6uuP -ramdisk /var/run/xend/boot/ramdisk-xJzUd7 -cmdline method=http://mirror.centos.org/centos/6/os/i386/ -features -flags 0 -store_port 1 -console_port 2 -fork true ]

(both are 1.4.90)



Once again if you want to do a networked installation the boot-options
for the very first time the VM starts in order to install (there is no
difference here using quick create or the full wizard ) are substituted
by what eliloader thinks it needs to get it up.

Yes - the boot options you enter for a VM created using the network
installation method are stored in PV-args and remain there as they are
expected, but eliloader does not care at all about them (this as also
what I found looking at eliloader code so far) for the first start. For
the first start eliloader himself downloads the kernel and installer
images and boots them with his autogenerated parameters to have your VM
installed - Basta. So you end up in an interactive network installation
again no matter what you enter as boot-options. Those options are taken
into account after the network-installation at first Local-Boot where
the image is supposed to boot from disk already - Of course now you
don't want them any more.

This is true for the network installation only - if you use cd images or
other installmedia it works as expected ...

Still the patch is the only way so far to get this setup working as
expected here to have eliloader override its autogenerated stuff and use
what I tell it for me!

Cheers
Andreas

On 11/07/2012 05:21 PM, Andreas Balg wrote:

> The GUI makes the difference - If you doubleclick on the template you
> CAN supply all the parameters you need for kickstarting but you cannot
> have them prefilled - and even worse: this won't be used for the first
> boot - you'll always find "graphic utf8" preloaded (this is what is in
> PV-args later on) - This is of course useless for kickstarting


If you are using XC, then the "New VM Wizard" (doubleclick) seems to
remove the boot options, yes.
But you can use the "quick create", and then the ks boot options
still remains.

These commands will quickly generate a template with "quick create"
enabled:
(only the last two commands differs from Grants tutorials)

NETUUID=$(xe network-list bridge=xenbr0 --minimal)
TMPLUUID=$(xe template-list | grep -B1 'name-label.*Red Hat.* 6.*64-bit'
| awk -F: '/uuid/{print $2}'| tr -d " ")
VMUUID=$(xe vm-install new-name-label="CentOS6-64bit"
template=${TMPLUUID})
xe vif-create vm-uuid=$VMUUID network-uuid=$NETUUID mac=random device=0
xe vm-param-set uuid=$VMUUID
other-config:install-repository=http://mirror.centos.org/centos/6/os/x86_64
xe vm-param-set uuid=$VMUUID
PV-args="ks=http://grantmcwilliams.com/files/kickstart-minimal6-x86_64.cfg
ksdevice=eth0"
xe vm-param-set uuid=${VMUUID} other-config:disable_pv_vnc=1
other-config:instant=true
xe vm-param-set uuid=${VMUUID} is-a-template=true


Or you could do the same from within XC:
- create a vm from the standard template, add install from url
and add boot params "ks=... ksdevice=..."
- uncheck "Start the new VM automatically" on the last wizard page
- convert the vm to template

Then create a new VM from the template by right-clicking the new
template and select "Quick Create"

(Tested in XC 6.1, don't know if this works in older versions)

--
Bernt 'Burnie' Pettersen /// DoD#2345
///
- Creative brains need creative workhours! -

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




--
Bernt  'Burnie'  Pettersen  ///  DoD#2345
<E-mail:burnie@xxxxxx>     ///  <URL:http://burnie.sh/>
       - Creative brains need creative workhours! -

_______________________________________________
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®.