Hi Jörgen,

 

I’ve been working on getting ESXi 5.x ISOs imported into Cobbler and this seems to work well.  However, this doesn’t work well for those cases where new or updated drivers or software has been injected into the ISO via VMware’s PowerCLI mechanism for this.  The reason for this is that the bootcfg*.template files have a hard-coded list of modules that are used to create the cobbler-boot.cfg file.  This list of modules should instead be scraped from the real boot.cfg that’s part of the ISO in order to cover the case where things have been injected into the stock ISO.

 

The only place this appears to be handled is by the “generate_bootcfg” method in pxegen.py … but, I’m having some trouble getting this functionality to work.

 

I added this little bit of code to “generate_bootcfg” in pxegen.py …

 

       realbootcfg = open(os.path.join(os.path.dirname(distro.kernel),'boot.cfg')).read()

       bootmodules = re.findall(r'modules=(.*)',realbootcfg)

       for modules in bootmodules:

         blended['esx_modules'] = modules.replace('/','')

 

And replaced the hard-coded modules in /etc/cobbler/pxe/bootcfg_esxi55.template with $esx_modules

 

But… something’s not quite right, it’s not seeing that I set blended['esx_modules'] … so, perhaps the generate_bootcfg method isn’t where this work is done…

 

Could you offer some insight, please?

 

Thanks,

 

Andy Speagle