// Module included in the following assemblies:
//
// * hosted_control_planes/hcp-deploy-virt.adoc

:_mod-docs-content-type: CONCEPT
[id="hcp-virt-prereqs_{context}"]
= Prerequisites to deploy {hcp} on {VirtProductName}

[role="_abstract"]
To create an {product-title} cluster on {VirtProductName}, you must meet several prerequisites.

* You have administrator access to an {product-title} cluster, version 4.14 or later, specified in the `KUBECONFIG` environment variable.

* The {product-title} management cluster must have wildcard DNS routes enabled, as shown in the following command:
+
[source,terminal]
----
$ oc patch ingresscontroller -n openshift-ingress-operator default \
  --type=json \
  -p '[{ "op": "add", "path": "/spec/routeAdmission", "value": {wildcardPolicy: "WildcardsAllowed"}}]'
----

* The {product-title} management cluster has {VirtProductName}, version 4.14 or later, installed on it. For more information, see "Installing OpenShift Virtualization using the web console".

* The {product-title} management cluster is on-premise bare metal.

* The {product-title} management cluster must be configured with `OVNKubernetes` as the default pod network Container Network Interface (CNI). Live migration is supported for nodes only if the CNI is OVN-Kubernetes.

* The {product-title} management cluster has a default storage class. For more information, see "Postinstallation storage configuration". The following example shows how to set a default storage class:
+
[source,terminal]
----
$ oc patch storageclass ocs-storagecluster-ceph-rbd \
  -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'
----

* When you configure storage for {hcp}, consider the recommended etcd practices. To ensure that you meet the latency requirements, dedicate a fast storage device to all hosted control plane etcd instances that run on each control-plane node. You can use LVM storage to configure a local storage class for hosted etcd pods. For more information, see "Recommended etcd practices" and "Persistent storage using Logical Volume Manager storage".

* On the {product-title} cluster that hosts the {VirtProductName} virtual machines, you must use a `ReadWriteMany` (RWX) storage class so that live migration can be enabled.

* You have a valid pull secret file for the `quay.io/openshift-release-dev` repository. For more information, see "Install OpenShift on any x86_64 platform with user-provisioned infrastructure".

* You have installed the hosted control plane command-line interface.

* You have configured a load balancer. For more information, see "Configuring MetalLB".

* For optimal network performance, you are using a network maximum transmission unit (MTU) of 9000 or greater on the {product-title} cluster that hosts the KubeVirt virtual machines. If you use a lower MTU setting, network latency and the throughput of the hosted pods are affected. Enable multiqueue on node pools only when the MTU is 9000 or greater.
+
[IMPORTANT]
====
You cannot change the MTU value for your cluster as a postinstallation task.
====

* The {mce-short} has at least one managed {product-title} cluster. The `local-cluster` is automatically imported. For more information about the `local-cluster`, see "Advanced configuration" in the {mce-short} documentation. You can check the status of your hub cluster by running the following command:
+
[source,terminal]
----
$ oc get managedclusters local-cluster
----

* Ensure each hosted cluster has a cluster-wide unique name.

* Do not use `clusters` as a hosted cluster name.

* Do not create a hosted cluster in the namespace of a {mce-short} managed cluster.