Chapter 3. Running the bootc image in a virtual machine
Use the bootable container image as an installation source to set up a Red Hat Enterprise Linux (RHEL) virtual machine.
Image mode for RHEL is a Technology Preview feature only. Technology Preview features are not supported with Red Hat production service level agreements (SLAs) and might not be functionally complete. Red Hat does not recommend using them in production. These features provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process.
For more information about the support scope of Red Hat Technology Preview features, see Technology Preview Features Support Scope.
3.1. Creating the Kickstart file Copy linkLink copied to clipboard!
You must create the Kickstart file to use during installation.
Prerequisites
- You have root-user access.
- You are logged in to the physical hypervisor host.
Procedure
Set the
AUTH_CONFIG
environment variable to reference the secret file in thekickstart.ks
file to authenticate private container registry access by running the following command:AUTH_CONFIG=~/.quay-auth.json
$ AUTH_CONFIG=~/.quay-auth.json
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Set the
PULL_SECRET
environment variable to reference the secret files in thekickstart.ks
file to authenticate the OpenShift Container Platform registry access by running the following command:PULL_SECRET=~/.pull-secret.json
$ PULL_SECRET=~/.pull-secret.json
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Set the
IMAGE_REF
environment variable to reference the image mode for your container image to use during installation by running the following command:IMAGE_REF="quay.io/<myorg>/<mypath>/microshift-4.18-bootc"
$ IMAGE_REF="quay.io/<myorg>/<mypath>/microshift-4.18-bootc"
1 Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 1
- Replace <myorg/<mypath> with your remote registry organization name and path.
Create the
kickstart.ks
file to use during installation by running the following script:Copy to Clipboard Copied! Toggle word wrap Toggle overflow
3.2. Creating a virtual machine Copy linkLink copied to clipboard!
You can create a virtual machine by using the Red Hat Enterprise Linux (RHEL) boot ISO image.
Prerequisites
- You created the Kickstart file.
-
You installed the OpenShift CLI (
oc
). -
You have
redhat
credentials.
Procedure
- Download the Red Hat Enterprise Linux (RHEL) boot ISO image from the Download Red Hat Enterprise Linux.
-
Copy the downloaded file to the
/var/lib/libvirt/images
directory. Configure the VMNAME environment variable with your value by running the following command:
VMNAME=microshift-4.18-bootc
$ VMNAME=microshift-4.18-bootc
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Configure the NETNAME environment variable with your value by running the following command:
NETNAME=default
$ NETNAME=default
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create a Red Hat Enterprise Linux (RHEL) virtual machine with 2 cores, 2GB of RAM and 20GB of storage by running the following command:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow NoteThe
sudo virt-install
command uses the Kickstart file to pull a bootc image from the remote registry and install the RHEL operating system.-
Log in to the virtual machine by using your
redhat
credentials.
Verification
Verify that all of the MicroShift pods are running without error by entering the following command:
watch sudo oc get pods -A \ --kubeconfig /var/lib/microshift/resources/kubeadmin/kubeconfig
$ watch sudo oc get pods -A \ --kubeconfig /var/lib/microshift/resources/kubeadmin/kubeconfig
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
Copy to Clipboard Copied! Toggle word wrap Toggle overflow