From 50846738b6e77db59e549ce792e9d696e8889b82 Mon Sep 17 00:00:00 2001 From: David Kirwan Date: Tue, 28 Sep 2021 14:04:13 +0900 Subject: [PATCH] metrics-for-apps: SOP Configure Openshift Virtualization Operator Signed-off-by: David Kirwan --- ...ure_openshift_virtualization_operator.adoc | 56 +++++++++++++++++++ modules/ocp4/pages/sops.adoc | 1 + 2 files changed, 57 insertions(+) create mode 100644 modules/ocp4/pages/sop_configure_openshift_virtualization_operator.adoc diff --git a/modules/ocp4/pages/sop_configure_openshift_virtualization_operator.adoc b/modules/ocp4/pages/sop_configure_openshift_virtualization_operator.adoc new file mode 100644 index 0000000..97d058f --- /dev/null +++ b/modules/ocp4/pages/sop_configure_openshift_virtualization_operator.adoc @@ -0,0 +1,56 @@ +== Installation of the Openshift Virtualisation Operator + +=== Resources +- [1] https://alt.fedoraproject.org/cloud/[Fedora Images] +- [2] https://github.com/kubevirt/kubevirt/blob/main/docs/container-register-disks.md[Kubevirt Importing Containers of VMI Images] + + +=== Installation +From the web console, choose the `Operators` menu, and choose `OperatorHub`. + +Search for `Openshift Virtualization` + +Click install. + +When the installation of the Operator is completed, create a `HyperConverged` object and follow the wizard, the default options should be fine, click next through the menus. + +Next create a `HostPathProvisioner` object the default options should be fine, click next through the menus. + + +=== Verification +To verify that the installation of the Operator is successful, we can attempt to create a VM. + +From the [1] location download the Fedora34 `Cloud Base image for Openstack` image with the `qcow2` format locally. + +Create a `Dockerfile` with the following contents: + +---- +FROM scratch +ADD fedora34.qcow2 /disk/ +---- + +Build the contianer: + +---- +podman build -t fedora34:latest . +---- + +Push the container to your username at quay.io. + +---- +podman push quay.io//fedora34:latest +---- + +In the web console, visit the Workloads, then Virtualization menu. + +Create a VirtualMachine with Wizard + +Choose Fedora and click next + +From the boot source dropdown menu, select import via Registry + +In the container image, you can add the one prepared earlier. eg `quay.io/dkirwan/fedora34` + +Click the `Advanced Storage settings`, change the storageclass to `oc-storagecluster-ceph-rbd` and click next and done. + +Once the VM is created and booted, the console is available from the top right drop down menu. diff --git a/modules/ocp4/pages/sops.adoc b/modules/ocp4/pages/sops.adoc index cb2bd29..292d40a 100644 --- a/modules/ocp4/pages/sops.adoc +++ b/modules/ocp4/pages/sops.adoc @@ -15,3 +15,4 @@ - xref:sop_retrieve_ocp4_cacert.adoc[SOP Retrieve OCP4 CACERT] - xref:sop_upgrade.adoc[SOP Upgrade OCP4 Cluster] - xref:sop_etcd_backup.adoc[SOP Create etcd backup] +- xref:sop_configure_openshift_virtualization_operator.adoc[SOP Configure the Openshift Virtualization Operator]