Stuck with Centos 7 provisioning on oVirt

**Problem: can’t kickstart CentOS 7 installation

**Foreman and Proxy versions: 3.0.1

**Foreman and Proxy plugin versions: Puppet 1.0.5

Using provisioning template “Kickstart default” the OS can’t continue the boot and show this messages:

curl (7) failed to connect to Network is unreachable

Warning: Downloading ‘http://mirror.centos.org/centos/7.9.2009/os/x86_64/LiveOS/squashfs.img’ failed!

Warning: Anaconda failed to fetch stage2 from CentOS Mirror

How can I solve this problem? I can’t find any solution anymore and no clues.

Thank you very much in advance!

Hi,

like the error shows, the VM you are trying to provision fails to connect to mirror.centos.org.
This can have many reasons, most (if not all) probably related to your local network.
The things that come to my mind are:

  1. Does your DHCP offer a valid DNS Server that can provide the address for mirror.centos.org?
  2. Do you have a Firewall blocking access to the internet?
  3. Are you using a proxy to access the internet?

These 3 are the most common causes of the error you are encountering. If I remember correctly, anaconda should drop you into an emergency shell after that error where you can poke around at the error.

Hi Areyus,
thank you for reply!
For the 1. and 2. question the settings are ok and firewall was temporary disabled.
For the 3. question I have modified the kickstart default with my proxy but network is always unreachable.

Please anyone can help me?

Hi,

remote diagnosis of network related problems is kinda hard, but I will try to help.
First of, does dracut drop you into an emergency shell after it failed to download the image?
If so, the first steps you should take are:

  1. Try if you can ping the gateway of your network
  2. Try if you can ping your proxy

If any of those failes, you have a problem on your local network that needs to be fixed.

  1. If those succeed, try to curl/wget (whatever is present in your installer image) anything from the internet (google, theforeman.org, whatever). If this failes, you likely have a problem with your proxy.

If you are not dropped to an emergency shell, you can try and boot the system from a Live ISO yourself and perform these steps from there.

Hi Areyus,

thank you for reply.

I confirm that I have a dracut emergency shell after failed connection. I will try to fix network problems.

After checking my network I confirm that I haven’t a proxy connection between foreman and provisioning VM. I also fill the proxy parameters in kickstart but not work.
How can I force the proxy?

Hi,

fromthe kickstart documentation (Section B 2.21), you need to add the --proxy= parameter with your proxy’s connection details to the url command in your kickstart provisioning template.
From the error message you posted earlier, it looks like the connection to Foreman works fine (otherwise the VM could not have loaded the kickstart or the installer), but needs the proxy information to access the installer Image from the internet.

1 Like

Hi,

From Appendix B of the linked guide I have
url --url=http://server/path

But in the kickstart I have
url --url http://server/path --proxy=http://myproxy:port

I think that kickstart defaut can’t add the = symbol

This is what should work in my opinion. Do you still get the same error when you inculde the proxy parameter in Kickstart default?

If you do not manage to get it to work with the upstream image, you always have the option to download the install image from centos and host it yourself on a local webserver. You will have to update that image manually in that case if it changes upstream, though (or write a script that automates this, obviously). If you want to do that, you need to change the URL of the medium in Foreman under “Hosts” → “Installation Media” → → Path to point to your local copy.

Yes, the VM can’t kickstart.
I will try with local image but I want to solve this issue before.
Thank you again!

I have modified the PXELinux template adding my proxy and this is the result.

I’ve never before seen those errors, sorry :-/

From what it looks like, I guess anaconda is trying to download the whole squashfs.img and runs out of space “somewhere” (maybe in RAM?)
How much RAM does you VM have? An installation of current CentOS/RHEL 7 requires the system to have somewhere around 1,5-2 GB of RAM. If you assigned less RAM, try setting it to at least 2 GB of RAM and try again.

1 Like

I Confirm that it was a RAM issue, now the configuration is working fine!

My configuration of PXELinux Template (trying with CentOS 8) in an oVirt environment is:

DEFAULT rhvh

LABEL rhvh
KERNEL boot/centos-8-mirror-xxxxxxxxx-vmlinuz
APPEND proxy=http://PROXY:PORT initrd=boot/centos-8-mirror-ejPIbtG4jFDG-initrd.img inst.ks=http://MYSRV/unattended/provision inst.stage2=http://mirror.centos.org/centos/8/BaseOS/x86_64/kickstart local_boot_trigger=http://MYSRV/unattended/built intel_iommu=on
IPAPPEND 2

Thank you very much for your attention and precious help!

Glad to hear you got it working :slight_smile:
If this issue is solved, could you please mark the solution, so the thread is marked as “solved” an others know this is sorted out? There should be a checkbox with the text “solution” next to it to mark a post as solution.