Chapter 12. Provisioning Virtual Machines on OpenShift Virtualization
OpenShift Virtualization addresses the needs of development teams that have adopted or want to adopt Kubernetes but possess existing virtual machine (VM)-based workloads that cannot be easily containerized. This technology provides a unified development platform where developers can build, modify, and deploy applications residing in application containers and VMs in a shared environment. These capabilities support rapid application modernization across the open hybrid cloud.
With Satellite, you can create a compute resource for OpenShift Virtualization so that you can provision and manage Kubernetes virtual machines using Satellite.
Note that template provisioning is not supported for this release.
The OpenShift Virtualization compute resource 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 https://access.redhat.com/support/offerings/techpreview/.
Prerequisites
- You can use synchronized content repositories for Red Hat Enterprise Linux. For more information, see Syncing Repositories in Managing Content.
- Provide an activation key for host registration. For more information, see Creating An Activation Key in Managing Content.
-
A OpenShift Virtualization user that has the
cluster-admin
permissions for the Openshift Container Platform virtual cluster. For more information, see Using RBAC to Define and Apply Permissions in the Authentication guide of the Openshift Container Platform documentation. - A Capsule Server managing a network on the OpenShift Virtualization server. Ensure that no other DHCP services run on this network to avoid conflicts with Capsule Server. For more information about network service configuration for Capsule Servers, see Configuring Networking in Provisioning Hosts.
Additional resources
- For a list of permissions a non-admin user requires to provision hosts, see Appendix E, Permissions Required to Provision Hosts.
12.1. Adding a OpenShift Virtualization Connection to Satellite Server
Use this procedure to add OpenShift Virtualization as a compute resource in Satellite.
Procedure
Enter the following
satellite-installer
command to enable the OpenShift Virtualization plugin for Satellite:# satellite-installer --enable-foreman-plugin-kubevirt
Generate a bearer token to use for HTTP and HTTPs authentication. On the OpenShift Virtualization server, list the secrets that contain tokens:
# kubectl get secrets
List the token for your secret:
# kubectl get secrets YOUR_SECRET -o jsonpath='{.data.token}' | base64 -d | xargs
Make a note of this token to use later in this procedure.
- In the Satellite web UI, navigate to Infrastructure > Compute Resources, and click Create Compute Resource.
- In the Name field, enter a name for the new compute resource.
- From the Provider list, select OpenShift Virtualization.
- In the Description field, enter a description for the compute resource.
- In the Hostname field, enter the FQDN, hostname, or IP address of the OpenShift Virtualization server that you want to use.
- In the API Port field, enter the port number that you want to use for provisioning requests from Satellite to OpenShift Virtualization.
- In the Namespace field, enter the user name of the OpenShift Virtualization virtual cluster that you want to use.
- In the Token field, enter the bearer token for HTTP and HTTPs authentication.
- Optional: In the X509 Certification Authorities field, enter a certificate to enable client certificate authentication for API server calls.