Sunday, July 01, 2012

Updating Cobbler on RHEL5 to Import ESXi5 for PXE Install

So you want to play with ESXi5, but on RHEL5, today, the latest version of cobbler (2.2.1?) doesn't yet support it.  Cobbler 2.2.3 does, though, but it's not available at all yet.  Nooooooo.

Here's what you do:
  1. install an RPMbuild of cobbler 2.2.3 .  Normally this is laughable-stupid, but we know the official one's coming eventually and we'll get the update from the official channels automatically.
    1. From the cobbler release_22 branch, go get the TGZ file for the latest 2.2 release:
      https://github.com/cobbler/cobbler/tarball/release22
    2. unpack that
      tar -C /tmp -xf cobbler-cobbler-cobbler-2.2.3-2-0-g80d646a.tar.gz(or just do it all in one go:
        wget -qO- 
      https://github.com/cobbler/cobbler/tarball/release22 | tar -C /tmp -xzf - )
    3. change and build it
      make -C /tmp/cobbler-cobbler-80d646a  rpms
    4. if you're me, you'll then remake it just to get the right apt repo, but hey.  People like to make things inside-out, and forget that the packaging is on the outside of the build.  Be nice to them, though, as they may be amateurs, and it's easy like rolling a stop-sign.
    5. install cobbler over what you have:
      rpm -Uvh  /tmp/cobbler-cobbler-80d646a/rpm-build/cobbler-2.2.3-2.noarch.rpm
    6. watch it fail when you do a cobbler check due to a missing and unreported dependency:
      cobbler check
    7. install said dependency, re-run cobbler check, think disapproving thoughts of the packagers:
      yum -y install python-ctypes
      cobbler check
  2. grab your ESXi5 ISO
  3. import that
    mount -o loop VMware-VMvisor-Installer-5.0.0.update01-623860.x86_64.iso /mnt/cdrom
    cobbler import -name esxi5 --path /mnt/cdrom/
  4. rejoice
    more beer
It really is that easy, once you have a cheat-sheet.  Now go hack up a decent esxi5 KS and start installing like a boss.


Labels: , , , , , ,

2 Comments:

Anonymous Anonymous said...

The rumours of this no longer working properly appear to be sadly true.

I'll post a workaround as soon as I get the free time. It's a by-hand deal, and I'll bet the most common google link will work.

11:18 PM  
Anonymous Anonymous said...

cobbler 2.2.3 (RPM) appears to survive the process of importing ESXi 510u1 without barfing. This is encouraging.

cobbler import --name ESXi5101 --arch=x86_64 --path /mnt/cdrom/ --rsync-flags=--quiet
task started: 2013-05-25_194214_import
task started (id=Media import, time=Sat May 25 19:42:14 2013)
Found a vmware compatible signature: tboot.b00
adding distros
creating new distro: ESXi5101-x86_64
creating new profile: ESXi5101-x86_64
associating kickstarts
This is an ESXi5 distro - copying all files to boot-files list
*** TASK COMPLETE ***

7:45 PM  

Post a Comment

<< Home