RHEL VM images require a valid Red Hat pull secret. OpenShift Virtualization imports boot sources automatically into openshift-virtualization-os-images. An SSH key pair is also created and stored as an OpenShift Secret so VMs can be accessed with virtctl ssh.
1Check pull secret:
oc get secret pull-secret -n openshift-config (must include registry.redhat.io)2If missing: console.redhat.com → Downloads → download pull secret
oc set data secret/pull-secret -n openshift-config --from-file=.dockerconfigjson=~/pull-secret.json3If already present (normal — every OCP install requires one): export locally instead of re-downloading. Needed later for
hcp create cluster --pull-secret ~/pull-secret.json (TC-HCP-002)oc get secret/pull-secret -n openshift-config -o jsonpath='{.data.\.dockerconfigjson}' | base64 -d > ~/pull-secret.json4Check namespace
openshift-virtualization-os-images and automatic boot-source importswatch oc get dv -n openshift-virtualization-os-images (wait until all Succeeded)5If RHEL9 is not imported: create DataVolume manually (Commands/YAML tab)
6Create SSH key pair:
ssh-keygen -t ed25519 -f ~/.ssh/ocp-vm-key -N ''7Create namespace
vmtest if it does not exist: oc new-project vmtest (namespace and NADs are fully configured in PRE-08)8Store SSH key as OpenShift Secret (key name must be
key — UI only shows secrets with key name key):oc create secret generic vm-ssh-key -n vmtest --from-file=key=$HOME/.ssh/ocp-vm-key.pub9Note: VLAN tests use static IPs in VMs — no DHCP server needed in VLAN 10/20