Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

cobbler 2.2.3 import VMware ESXI5.0 ERROR!!! #364

Closed
wandk000 opened this Issue · 24 comments

5 participants

@wandk000

official released cobbler2.2.3 BETA support for ESXi5 .But i import it error:

Sat Nov 24 02:50:50 2012 - DEBUG | received on stderr:
Sat Nov 24 02:50:50 2012 - INFO | running import manager: import/vmware
Sat Nov 24 02:50:50 2012 - INFO | trying hardlink /var/www/cobbler/ks_mirror/VMware-ESXI5.0-x86_64/mboot.c32 -> /var/www/cobbler/images/VMware-ESXI5.0-x86_64/mboot.c32
Sat Nov 24 02:50:50 2012 - INFO | trying hardlink /var/www/cobbler/ks_mirror/VMware-ESXI5.0-x86_64/s.v00 -> /var/www/cobbler/images/VMware-ESXI5.0-x86_64/s.v00
Sat Nov 24 02:50:50 2012 - INFO | trying hardlink /var/www/cobbler/ks_mirror/VMware-ESXI5.0-x86_64/mboot.c32 -> /var/lib/tftpboot/images/VMware-ESXI5.0-x86_64/mboot.c32
Sat Nov 24 02:50:50 2012 - INFO | trying hardlink /var/www/cobbler/ks_mirror/VMware-ESXI5.0-x86_64/s.v00 -> /var/lib/tftpboot/images/VMware-ESXI5.0-x86_64/s.v00
Sat Nov 24 02:51:00 2012 - ERROR | failed to copy file /var/www/cobbler/ks_mirror/VMware-ESXI5.0-x86_64/. to /var/lib/tftpboot/images/VMware-ESXI5.0-x86_64/ for VMware-ESXcp I5.0-x86_64

@jimi-c
Owner

If this is a new cobbler system, and if you're not running production on it, I'd highly recommend you use the 2.4.0 beta currently available in epel-testing:

$ cobbler version
Cobbler 2.4.0
  source: aadd4ef, Sun Nov 18 10:08:15 2012 -0600
  build time: Sun Nov 25 11:45:24 2012
$ mount /data/isos/VMware-VMvisor-Installer-5.0.0-469512.x86_64.iso /mnt
$ cobbler import --name=vmware-esxi5 --path=/mnt
task started: 2012-11-26_002009_import
task started (id=Media import, time=Mon Nov 26 00:20:09 2012)
Found a candidate signature: breed=vmware, version=esxi5
running: /usr/bin/file /var/www/cobbler/ks_mirror/vmware-esxi5/s.v00
received on stdout: /var/www/cobbler/ks_mirror/vmware-esxi5/s.v00: gzip compressed data, was "vmvisor-sys.tar.vtar", from Unix, last modified: Thu Aug 18 20:59:05 2011

received on stderr: 
Found a matching signature: breed=vmware, version=esxi5
Adding distros from path /var/www/cobbler/ks_mirror/vmware-esxi5:
running: /usr/bin/file /var/www/cobbler/ks_mirror/vmware-esxi5/tools.t00
received on stdout: /var/www/cobbler/ks_mirror/vmware-esxi5/tools.t00: gzip compressed data, was "tools-light.tgz.temptar", from Unix, last modified: Thu Aug 18 20:58:15 2011

received on stderr: 
creating new distro: vmware-esxi5-x86_64
creating new profile: vmware-esxi5-x86_64
associating repos
*** TASK COMPLETE ***

Note the above was done with the current release24 branch available on github, not the EPEL version (yet). I should be pushing a new beta 3 RPM to EPEL soon that includes the above code.

Even then, testing with esxi5 has been somewhat limited so expect your results to vary, since it has not been tested much beyond import.

@wandk000
@jimi-c
Owner

You get it right here, on github. Install git on your system and use the following commands:

git clone https://github.com/cobbler/cobbler.git
cd cobbler
git checkout release24
make rpms

The easier way would just be to install the RPM from EPEL's testing branch.

@wandk000

Catch it ,thank u !

@haebler

Actually, I tried the latest GitHub release24 branch and I ended up with two issues on import and a subsequent sync.

  1. The files copied to the TFTP server had their file names messed up. If Foo was the name of the original file, It ended up being FooFoo under the TFTP server.
  2. Generating the distro took in the order of 15min. The server I tried this on does not have Internet. My guess is, this issue is related to that. 2.2.3 from EPEL was done in a couple of seconds but had other issues.

Also, ESXi5 pulls a boot.cfg file from the TFTP server. The current ESXi template does not account for that and ESXi5 booting fails. But that should probably be a separate issue.

@wandk000

I test it with cobbler-2.4.0,The issue is still in there:
[root@cobbler24 ~]# mount -t auto -o loop /root/VMware-VMvisor-Installer-5.0.0.update01-623860.x86_64.iso /mnt
[root@cobbler24 ~]# cobbler import --path=/mnt --name=VMware-ESXI5.0
task started: 2012-11-29_145511_import
task started (id=Media import, time=Thu Nov 29 14:55:11 2012)
Found a vmware compatible signature: tboot.b00
adding distros
creating new distro: VMware-ESXI5.0-x86_64
creating new profile: VMware-ESXI5.0-x86_64
associating kickstarts
This is an ESXi5 distro - copying all files to boot-files list
*** TASK COMPLETE ***
[root@cobbler24 ~]# cobbler version
Cobbler 2.4.0

and log :
Thu Nov 29 14:55:14 2012 - DEBUG | received on stderr:
Thu Nov 29 14:55:14 2012 - INFO | running import manager: import/vmware
Thu Nov 29 14:55:14 2012 - INFO | trying hardlink /var/www/cobbler/ks_mirror/VMware-ESXI5.0/mboot.c32 -> /var/www/cobbler/images/VMware-ESXI5.0-x86_64/mboot.c32
Thu Nov 29 14:55:14 2012 - INFO | trying hardlink /var/www/cobbler/ks_mirror/VMware-ESXI5.0/s.v00 -> /var/www/cobbler/images/VMware-ESXI5.0-x86_64/s.v00
Thu Nov 29 14:55:14 2012 - INFO | trying hardlink /var/www/cobbler/ks_mirror/VMware-ESXI5.0/mboot.c32 -> /var/lib/tftpboot/images/VMware-ESXI5.0-x86_64/mboot.c32
Thu Nov 29 14:55:14 2012 - INFO | trying hardlink /var/www/cobbler/ks_mirror/VMware-ESXI5.0/s.v00 -> /var/lib/tftpboot/images/VMware-ESXI5.0-x86_64/s.v00
Thu Nov 29 14:55:23 2012 - ERROR | failed to copy file /var/www/cobbler/ks_mirror/VMware-ESXI5.0/. to /var/lib/tftpboot/images/VMware-ESXI5.0-x86_64/ for VMware-ESXI5.0-x86_64

@haebler

I got past that issue with when I installed the 2.4 version of cobbler.

This patch 3c53042 should actually fix that issue. It looks like it is in the release24 branch. Check on your disk and see if you have an installed manage_in_tftpd.py that looks like this: manage_in_tftpd.py

@jimi-c
Owner

Yes, that patch may not be in the beta RPM that's available yet, I recently merged more patches into release24. I've been working on documentation recently for the 2.4 release, but I'll try and get that 2.4.0-beta3 RPM out soon.

@wandk000

I found the manage_in_tftpd.py , and update the code, but did not change anything. It seems that I need the latest patch

@kevinverma

I could test with release24 rpm build and it works, the trick is to slightly modify the esxi pxe templates to append a boot.cfg (boot.cfg is also required to be modified to have proper $img_path prefix to each of files listed within).

I could have success to boot the following to ISO imports with release:
VMware-VMvisor-Installer-5.0.0-469512.x86_64.iso
VMware-VMvisor-Installer-5.0.0.update01-623860.x86_64.iso

However release24 fails to import "VMware-VMvisor-Installer-5.1.0-799733.x86_64.iso" with following error:

cobbler import --path="/tmp/vmware/vms.esxi.5.1.0-799733.x86_64" --name="vms.esxi.5.1.0-799733.x86_64-test2" --arch=x86_64

task started: 2012-12-07_225804_import
task started (id=Media import, time=Fri Dec 7 22:58:04 2012)
Found a candidate signature: breed=vmware, version=esxi5
running: /usr/bin/file /var/www/cobbler/ks_mirror/vms.esxi.5.1.0-799733.x86_64-test2-x86_64/s.v00
received on stdout: /var/www/cobbler/ks_mirror/vms.esxi.5.1.0-799733.x86_64-test2-x86_64/s.v00: gzip compressed data, was "vmvisor-sys.tar.vtar", from Unix, last modified: Thu Aug 2 09:18:45 2012

received on stderr:
No signature matched in /var/www/cobbler/ks_mirror/vms.esxi.5.1.0-799733.x86_64-test2-x86_64
!!! TASK FAILED !!!

Any suggestions ?

@kevinverma

My pxe template contents are:

--snip pxeprofile_esxi.template ---
LABEL $profile_name
kernel $kernel_path
APPEND -c $img_path/boot.cfg
$menu_label
ipappend 2
append $img_path/vmkboot.gz $append_line --- $img_path/vmkernel.gz --- $img_path/sys.vgz --- $img_path/cim.vgz --- $img_path/ienviron.vgz --- $img_path/install.vgz

--snip--

--snip pxesystem_esxi.template --
default linux
prompt 0
timeout 1
label linux
kernel $kernel_path
APPEND -c $img_path/boot.cfg
ipappend 2
append $img_path/vmkboot.gz $append_line --- $img_path/vmkernel.gz --- $img_path/sys.vgz --- $img_path/cim.vgz --- $img_path/ienviron.vgz --- $img_path/install.vgz

--snip--

@kevinverma

Meanwhile to continue to feedback, it appears that the apparently new jason distro signature verification in release24 is servely broken, it at-least fails to recognize previously working esxi5.1 and oracle-vm-x86-3.1.1 imports.

@jimi-c
Owner

Yes I noticed that, not sure what I broke. Now that I'm getting hardware I should be able to test ESXi much better, before I was limited to testing it inside a VM, which obviously never completed an install.

@kevinverma

Jimi, is there anyway for one to help correcting the distro signatures and send in the patches ? I might not be a good help on that front, but who knows ? at-least it won't hurt to know :)

@jimi-c
Owner
@haebler

@jimi1283 On testing in a VM. I can install ESXi fine in a VMware Fusion VM. I have also seen people claiming that it works in Vbox - e.g. this one.
IMHO for development a VM is much better than one of those ESXi supported Enterprise class servers that needs 2min to get through the HW initialization before it starts booting from the network. Yes, eventually you would want to test on one of those but only as a last step.

@kevinverma

@jimi1283 I think with new json signature model whats broke or lets best say is left out is as following:

  1. for ESXI5, signature file only expecting an ISO of 5.0x as per -> https://github.com/cobbler/cobbler/blob/master/config/distro_signatures.json#L287

  2. for Xen powered OracleVM 3.x x86/64 imports, which appears to be a RHEL5 derivative cobbler needs to account to expect ovs-releaase.rpm and oracle-release.rpm on https://github.com/cobbler/cobbler/blob/master/config/distro_signatures.json#L22

For OracleVM support you may explore its release tree at http://public-yum.oracle.com/repo/OracleVM/OVM3/latest/x86_64/

Please let me know if this looks trivial to fix for you and if I should open some ticket for both issues ?

@jimi-c
Owner

Have you tried the most recent master/release24 branch? I was able to import VMware-VMvisor-Installer-5.0.0-469512.x86_64.iso with no issue:

$ cobbler distro report --name=vmware-esxi5-x86_64
Name                           : vmware-esxi5-x86_64
Architecture                   : x86_64
TFTP Boot Files                : {'$img_path/block-cc.v00': '/var/www/cobbler/ks_mirror/vmware-esxi5/block-cc.v00', ... }
Breed                          : generic
Comment                        : 
Fetchable Files                : {}
Initrd                         : /var/www/cobbler/ks_mirror/vmware-esxi5/imgpayld.tgz
Kernel                         : /var/www/cobbler/ks_mirror/vmware-esxi5/mboot.c32
Kernel Options                 : {}
Kernel Options (Post Install)  : {}
Kickstart Metadata             : {'tree': 'http://@@http_server@@/cblr/links/vmware-esxi5-x86_64'}
Management Classes             : []
OS Version                     : generic26
Owners                         : ['admin']
Red Hat Management Key         : <>
Red Hat Management Server      : <>
Template Files                 : {}
@kevinverma

@jimi1283 yes I think I have tried latest release24, let me be clear the esxi5.0 import works but 5.1 fails because perhaps the regex of following line only looks for 5.0

does this makes sense ? or do you think I am doing something wrong maybe ?

@kevinverma

@jimi1283 is there also any guidance on howto add a new distro support to cobbler ? because I think OVM3.x may need to be considered as a different distro, I hope you'll hold the same opinion when you are on that work.

@jimi-c
Owner

Ahh, I see, the title says 5.0 so I missed the issue being 5.1. In that case like you noted we just need to add a new entry for 5.1 (would that be esxi6 or esxi51?) if the distribution structure has changed significantly (and knowing VMware, it has).

There's no real guidance, since this is all pretty new, but I'll go through what each field in the JSON is used for.

signatures: these are directories or files that are unique to the distribution (or series of distros). These alone are not enough to definitively ID a distro release.

version_file: this is used to specify the file that definitively ID's the distro version.

version_regex: this is an optional regex string to look for inside the version_file, since for some distros it's the contents of the file that change rather than the name.

kernel_arch: this is the file name/pattern used to identify the architecture of the system.

kernel_arch_regex: same as version_regex, but used for the kernel_arch.

supported_arches: the list of valid arches for this breed/os-version

supported_repo_breeds: the list of valid repo types for this breed/os-version

kernel_file: the name/pattern of the file that will be associated with the distro. Patterns can be used to allow for multiple distros like xen, etc.

initrd_file: the name/pattern of the initrd that will be associated with the distro.

isolinux_ok: A boolean flag that indicates the isolinux directory can be used as the source of the kernel/initrd. Currently this is only used for FreeBSD, most distros should leave it as false.

default_kickstart: the kickstart/preseed/etc. file that should be used by default for newly imported distros of this breed/os-version.

kernel_options: extra options that will be inserted into kopts for the newly imported distro(s) automatically.

kernel_options_post: extra options that will be inserted into kopts-post for the newly imported distro(s) automatically.

boot_files: a list of files that will be added to the boot_files property of the distro.

@ouranos

I have the same problem as @haebler where the filename in the tftp root are messed up (ie boot.cfgboot.cfg instead of boot.cfg)

It seems to come from this commit 3c53042 (L90)

@jimi-c jimi-c was assigned
@jimi-c jimi-c referenced this issue from a commit
@jimi-c jimi-c BUGFIX - globbed --boot-files are not copied properly
Referenced in Issue #364, where a --boot-file named Foo would be
copied into the tftproot/images/distro directory as FooFoo. As
noted in that issue, this was caused by commit 3c53042 which seems
to assume that all boot files will be globs.
d417725
@jimi-c
Owner

Sorry it has taken me a while to get back to this. Between the two pull requests above, I believe I've gotten esxi 5+ support to a pretty acceptable level, if anyone else would like to give them a test. These are only in the master branch right now though.

@jimi-c
Owner

Along with e506ad7, I've done a complete esxi5.1 scripted installation via gPXE, so this issue should be resolved.

@jimi-c jimi-c referenced this issue from a commit
@jimi-c jimi-c BUGFIX - globbed --boot-files are not copied properly
Referenced in Issue #364, where a --boot-file named Foo would be
copied into the tftproot/images/distro directory as FooFoo. As
noted in that issue, this was caused by commit 3c53042 which seems
to assume that all boot files will be globs.
f49a110
@jimi-c jimi-c closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.