Build Machine Image failed for RHEL8 and RHEL9 in TKGm v2.5.4 - "TASK [setup : RHEL subscription]"
search cancel

Build Machine Image failed for RHEL8 and RHEL9 in TKGm v2.5.4 - "TASK [setup : RHEL subscription]"

book

Article ID: 414527

calendar_today

Updated On:

Products

VMware Tanzu Kubernetes Grid Management

Issue/Introduction

The image build process failed when performing an image build for RHEL 8 or RHEL 9 in a proxy environment.

Official Document - Linux Custom Machine Images

vsphere-iso.vsphere: TASK [setup : RHEL subscription] ***********************************************
vsphere-iso.vsphere: fatal: [default]: FAILED! => {"changed": false, "msg": "Failed to register with 'None': com.redhat.RHSM1.Error: {\"exception\": \"TimeoutError\", \"severity\": \"error\", \"message\": \"[Errno 110] Connection timed out\"}"}
vsphere-iso.vsphere:
vsphere-iso.vsphere: PLAY RECAP *********************************************************************
vsphere-iso.vsphere: default                    : ok=1    changed=0    unreachable=0    failed=1    skipped=180  rescued=0    ignored=0

Environment

Tanzu Kubernetes Grid v2.5.4

Cause

The image-builder container version v0.1.40+vmware.3 does not handle the “http_proxy” and “https_proxy” settings correctly, preventing the target RHEL image-build VM from accessing the Red Hat Subscription Server on the internet through the proxy.

Resolution

To avoid issues related to proxy configuration, perform the image build in an environment with direct internet access.