Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESXI Support #2337

Closed
DwayneGit opened this issue May 1, 2020 · 10 comments · Fixed by #3201
Closed

ESXI Support #2337

DwayneGit opened this issue May 1, 2020 · 10 comments · Fixed by #3201
Assignees
Labels
enhancement New feature or request

Comments

@DwayneGit
Copy link

Just noting some changes I made and asking some questions.

  1. I change the import_rsync_whitelist to allow file for verifying esxi:
#-----------------------------------------------
## VMWare
##-----------------------------------------------
+ b.b00
+ vmware-esx-base-osl.txt
+ boot.cfg
+ mboot.c32
+ imgpayld.tgz
+ efi/
+ efi/boot/
+ efi/boot/*

these are for 6.7 looks like more needs to be added for other versions

  1. i get "UTF-8 Unicode text, with very long lines, with CRLF line terminators"
    followed by "'ascii' codec can't decode byte 0xc2 in position 6623: ordinal not in range(128)"

this is coming from import_signatures.py while trying to open "vmware-esx-base-osl.txt"

        elif ftype.find("text") != -1:
            f = open(filename, 'r')
            lines = f.readlines()
            f.close()

I don't get this error while running python in the terminal so i don't know why cobbler is giving this error. for now i told open to ignore errors.

does anyone else have this problem?

@DwayneGit DwayneGit added the enhancement New feature or request label May 1, 2020
@SchoolGuy SchoolGuy added this to Inbox in Backlog via automation May 2, 2020
@SchoolGuy SchoolGuy moved this from Inbox to Feature Requests in Backlog May 2, 2020
@SchoolGuy
Copy link
Member

This looks very much like a file we are trying to read is not properly handled. I would group this into the section of handling errors more transparently, as well as logging them better.

Also is ESXI available for everyone, so I could try to run Cobbler on it for testing purposes?

@DwayneGit
Copy link
Author

Sorry for the late response was focusing on booting issue. I have notice a few things that need to be changed or document in regards to esxi and booting from gpxe/ipxe. Should i post them here?

I don't know if esxi is available for everyone, i think it may.

@SchoolGuy
Copy link
Member

@DwayneGit Yeah no problem. I am also deep down the road currently. Just post your ideas and suggestions here and I will see what I can document where.

Also I looked it up and I can get it esxi for free with some limitations from vmware. Possibly I think I need to set it up to test if you didn't skip anything which you thought was self explanatory (I do that at least sometimes...).

@DwayneGit
Copy link
Author

DwayneGit commented May 6, 2020

@SchoolGuy these are some of my notes while working out issues with esxi and using remote image store "available-as".

ESXI Issues

  • the template files in /etc/cobbler/boot_loader_conf are miss configured.
    - cobbler is looking for /etc/cobbler/boot_loader_conf/bootcfg_system_esxi67.template (old) but the new is bootcfg_esxi67.template. this is also addressed below
    • generating the boot cfg template is looking for esx_module but can’t find it. this is also addressed below
	error: [{‘code': 'VFFSL(SL,"esx_modules",True)',
  		'exc_val': NotFound("cannot find 'esx_modules'",),
  		'lineCol': (12, 9),
  		'rawCode': '$esx_modules',
  		'time': 'Tue May  5 05:58:59 2020'}]
  • in tftpgen.py in cobbler source code line 973 uses string library for join but join doesn’t exist
    distro_mirror_name = string.join(distro.kernel.split('/')[-2:-1], ‘’)
    —— change to ——
    distro_mirror_name = ''.join(distro.kernel.split(‘/‘)[-2:-1])

  • ipxe needs to be compiled with comboot for esxi

  • The following code snippet is added to generate_bootcfg in tftpgen.py so the bootcfg templates can get the modules esx_modules. It is copied from above were it is used “I think” to build cobbler-boot.cfg

            if re.search("esxi[567]", blended['os_version']) is not None:
                realbootcfg = open(os.path.join(os.path.dirname(blended['kernel']), 'boot.cfg')).read()
                bootmodules = re.findall(r'modules=(.*)', realbootcfg)
                for modules in bootmodules:
                    blended['esx_modules'] = modules.replace('/', '')
  • in tftgen.py: the boot loader config path is looking for a system or profile in the image name "bootcfg_system|profile_esx6" i remove this requirement. the provided templates don't account for this either.
template = os.path.join(self.settings.boot_loader_conf_template_dir, "bootcfg_%s_%s.template" % (what.xxxx ,distro.os_version))
template = os.path.join(self.settings.boot_loader_conf_template_dir, "bootcfg_%s.template" % (distro.os_version))

— Helpful links

@SchoolGuy
Copy link
Member

@DwayneGit This is indeed very helpful. I think at some point we need to rework the code to remove the need of hacking the code to enable esxi users to use this. It will take me a while until I will be able to work through all of this. I will leave that open until I fixed this properly and documented everything.

@SchoolGuy SchoolGuy self-assigned this May 6, 2020
@thiller2018
Copy link
Contributor

see also #2277 issue for efi boot.

@SchoolGuy
Copy link
Member

Helpful comment with points to takle: #2541 (comment)

@nodeg nodeg removed this from the v3.3.0 milestone Jul 9, 2021
@SchoolGuy
Copy link
Member

Another helpful comment: #3078 (comment)

@SchoolGuy
Copy link
Member

Fixed via #3201

@esasrir
Copy link

esasrir commented Jul 14, 2023

i am getting could not find kernel image : /images/ESXi8.0-x86_64

can someone please help on this error?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

5 participants