0

Update : Managed to bypass 1. docker error, currently working on the #2 "Storage Configuration failed: Unable to allocate requested partition scheme" message

Junior engineer here and at my company we build up a RHEL OVF from ISO with a Kickstart file. We are picking up a new version of RHEL, and the current script we have is failing when attempting to do the automated install with Kickstart installation. We also user Packer, and Docker container to run some of these installation scripts.

We use VMware ESXi to import the VM (RHEL OS) and start configuring/installing it. Then, once it's done, we shut it down, and create a OVF from that VM.

#1. What's happening now, when I monitor the VM and RHEL installation, it starts saying Docker is not installed: Solved


Question
You have specified that the package 'docker' should be installed. This package does not exist. Would you like to ignore this package and continue with the installation?

  1. Then it tells me Storage Configuration failed: Unable to allocate requested partition scheme:

enter image description here

So basically , I just need to figure out how to answer these questions programmatically, so there is no prompt that messes up the automated install on the VMware ESXi.

Although, I will say I manually answered these questions just a minute ago as a test, and the VM never shut off (which its supposed to) , so it timed out, so that's going to be another problem.

Can anyone please guide me in the right direction? I'm not that much of a Linux master and new to this whole "automated" kickstart thing for RHEL.

@telcoM I will response to your comments here line-by-line

  1. I don't see any repo keyword.(Upon review, I found the repo's were being generated during the packer installation). I do have a %post declaration with some packages listed, but docker was actually already commented out. I removed the comment, and tried building again but it still brought up the same message. I then tried -docker to exclude it also, but same message asking for docker package. Here is what is listed under %post (There were some more firmware packages here but I removed them for clarity):
    %packages --nobase
    @core
    authconfig
    system-config-firewall-base
    tmpwatch
    bzip2
    eject
    time
    unzip
    zip
    which
    sos
    java
    bind
    bind-chroot
    #vim
    #dos2unix
    #sudo
    -docker
    open-vm-tools
    -postfix
    -rhnsd
    -yum-rhn-plugin
    -subscription-manager
    -chrony
    %end

We do have some custom repos we make that pull from our Jfrog Artifactory, right under the %packages declaration in the kickstart file:

%post --log=/root/kickstart-post.log
set -x
cat > /etc/yum.repos.d/test.repo <<'CAT'
[test1]
name=test1
username=
password=
baseurl=https://artifactory.MyWebsite.com/artifactory/MyUrl
gpgcheck=0
enabled=1

[test2]
name=test2
baseurl=http://127.0.0.1:8080/__RHEL_VER__
gpgcheck=0
enabled=1

[test3]
name=test3
username=
password=
baseurl=https://artifactory.MyWebsite.com/artifactory/MyURL
gpgcheck=0
enabled=1
CAT

yum install -y A-Huge-List-Of-Apps-And-Libs-Here

yum install -y http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
  1. Regarding the partitioning and storage, this is more straight forward:
bootloader --location=mbr --driveorder=sda --append="fips=1 crashkernel=auto rhgb quiet" --password=

zerombr
clearpart --all --initlabel --drives=sda,sdb

part /boot --fstype=ext4 --size=512
part pv.01 --size=36000 --grow --ondrive=sda
part pv.02 --size=1000 --grow --ondrive=sdb

volgroup vg_root pv.01
volgroup vg_perstore pv.02

logvol / --fstype=xfs --name=lv_root --vgname=vg_root --size=7000 --grow
logvol /export/home --fstype=xfs --name=lv_home --vgname=vg_root --size=1000
logvol /opt --fstype=xfs --name=lv_opt --vgname=vg_root --size=4096
logvol /tmp --fstype=xfs --name=lv_tmp --vgname=vg_root --size=2048
logvol /var --fstype=xfs --name=lv_var --vgname=vg_root --size=2048
logvol /var/core --fstype=xfs --name=lv_core --vgname=vg_root --size=128
logvol /var/crash --fstype=xfs --name=lv_crash --vgname=vg_root --size=1000
logvol /var/getlogs --fstype=xfs --name=lv_getlogs --vgname=vg_root --size=2000
logvol /var/viewlogs --fstype=xfs --name=lv_viewlogs --vgname=vg_root --size=1000
logvol /var/log --fstype=xfs --name=lv_log --vgname=vg_root --size=1000
logvol /var/log/audit --fstype=xfs --name=lv_audit --vgname=vg_root --size=725
logvol /var/log/logins --fstype=xfs --name=lv_logins --vgname=vg_root --size=96
logvol /var/log/root_logins --fstype=xfs --name=lv_root_logins --vgname=vg_root --size=32
logvol /var/cache/yum --fstype=xfs --name=lv_repo --vgname=vg_root --size=1000
logvol /var/opt/BurgerKing --fstype=xfs --name=lv_varopt --vgname=vg_root --size=20000
logvol swap --name=lv_swap --vgname=vg_root --size=4096
logvol /var/opt/perstore --fstype=xfs --name=lv_perstore --vgname=vg_perstore --size=500 --grow

%addon com_redhat_kdump --disable
%end

Is there anything else I should be looking for here?

5
  • Screenshots are not necessary and slow everything. You can simply copy and paste the output of the terminal.
    – user413007
    Jun 22, 2020 at 6:33
  • 2
    @Loic Reynier These screenshots are from RHEL installer in Kickstart mode running in a VMware console window, not a regular terminal, so copy/pasting text from it is not trivial for a self-admitted newbie. (Might require configuring a virtual serial console or a VNC or SSH connection to the installer to allow copy/pasting.) But it should not have been too difficult to type up the relevant error messages for the question - I did that in my answer :-)
    – telcoM
    Jun 22, 2020 at 7:17
  • 1
    @LoicReynier Since most modern Linux installers tend to use a framebuffer console mode, whatever is on the VM's console screen is effectively a picture as far as the virtualization host is concerned; to get text out of the screen content for easy copy/pasting, the host would have to run it through an OCR process unless it gets help from inside the VM - and helpers like VMware Tools tend to be effective for copy/paste support only within X11, not on the text-mode console.
    – telcoM
    Jun 22, 2020 at 7:30
  • Thanks for letting me know, I did not realize that but indeed, typing up the messages would not have been difficult.
    – user413007
    Jun 22, 2020 at 7:33
  • thank you for the comments. I will comment the output in the future.
    – ennth
    Jun 22, 2020 at 15:41

1 Answer 1

2

The first error in your screenshots was:

You have specified that the package 'docker' should be installed. This package
does not exist.  Would you like to ignore this package and continue with
installation?

The RHEL 7.x installation media includes no package named docker. If you want to install it, then in the kickstart file, there should be one or more package repositories configured, using the repo keyword.

You might add --ignoremissing to the %packages section header line to see if the installation can proceed successfully without Docker. Whatever ends up missing or broken should indicate what is depending on Docker.

In your second picture, you seem to have missed this line:

storage configuration failed: Unable to allocate requested partition scheme.

This means the storage configuration specified in the Kickstart file apparently did not quite match up with the virtual disks configured to the VM. It may have caused the second message you noted:

Not enough space in file systems for the current software selection. An additional 1233.25 MiB is needed.

As the installer was not able to apply the requested partitioning, the installer effectively has no space at all available for software packages until you supply it with a valid storage configuration manually, so this also causes the last error message you asked about:

No disks selected: please select at least one disk to install to.
Unable to allocate requested partition scheme.

You'll want to have the Kickstart syntax reference at hand, and start reading the actual Kickstart file used.

The message just before the last error indicates that the virtual disks are sized 46.88 GiB and 2000 MiB. Note that the GiB means binary-based units, so 46.88 GiB = 46.88 * (1024^3) bytes = about 50 337 016 710 bytes. This may be the result of specifying the desired virtual disk size as 50 GB = 50 000 000 000 bytes and the value getting rounded upwards to nearest higher value appropriate for VMware, plus some rounding errors in conversions between the number of bytes and higher units.

The sum of the minimum sizes of your vg_root logical volumes is 47269, so the minimum size of your part pv.01 should be at least that much. Also, as the partition sizes may be adjusted slightly upwards to match various requirements (data alignment and others), it might push the actual minimum capacity requirement of the pv.01 + the /boot partition above the 46.88 GiB capacity of your disk. If you want to keep these Kickstart settings, increase the size of the disk allocated to the VM a bit, then fine-tune it downwards after you get the Kickstart working.

The RHEL 7.x Kickstart documentation does not include the --nobase option for the %packages section. It seems to be a deprecated option that was removed from documentation after a bug report.

Your "some custom repos" look like a post-install script, which should be in a %post section, not right under %packages. There should be %end to terminate the %packages section, then the %post section header, your post-install script, and another %end to terminate it. If the script is not in the proper section, the installer is going to try and interpret the script commands as names of packages to install, and since they are not properly formatted package names, you might end up trying to install a random assortment of packages and their dependencies. This might explain the attempts to install docker.

For the VM to automatically shut off after the installation is complete, there should be a line with the poweroff keyword in the main part of the kickstart configuration file. But the missing automatic shut-off may also be the result of the installation going "off the rails" and requiring manual input.

3
  • I updated my original question with more information now. I tried adding docker to the %packages and excluding, but it still comes up with that message. Do you know anything else I could try based on the information I gave you?
    – ennth
    Jun 22, 2020 at 20:28
  • hey there can you help me out please...? @telcoM telcoM
    – ennth
    Jun 23, 2020 at 7:00
  • thanks @telcoM I managed to fix the docker issue with your help. I'm currently investigating the "Storage Configuration failed: Unable to allocate requested partition scheme" message, but I kind of better understand what's going on now. I will re-read what you wrote and see if I can fix tomorrow. Thank you for your input thus far, I am forever grateful.
    – ennth
    Jun 23, 2020 at 9:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .