Red Hat OpenShift Virtualization
Available from
9.2.37.
Red Hat OpenShift Virtualization is one of the virtualization
technologies supported by License Metric Tool.
Purpose
Red Hat OpenShift Virtualization, a feature included with Red Hat OpenShift, provides a platform for running and deploying virtual machine (VM) workloads.
Collecting capacity data
- virtualmachineinstances
- nodes
- Configure Red Hat Open Shift cluster.
- To create a ServiceAccount for License Metric Tool server, use the following YAML configuration. Apply it through the
+ button in the Open Shift Web Console or with the oc
apply command.
apiVersion: v1 kind: ServiceAccount metadata: name: <SERVICE_ACCOUNT_NAME> namespace: <SERVICE_ACCOUNT_NAMESPACE>
- To create a token for the newly created ServiceAccount, use the following YAML
configuration.
apiVersion: v1 kind: Secret metadata: name: ilmt-service-account-token namespace: <SERVICE_ACCOUNT_NAMESPACE> annotations: kubernetes.io/service-account.name: <SERVICE_ACCOUNT_NAME> type: kubernetes.io/service-account-token
- To assign the necessary permissions to the previously created ServiceAccount, use the following
YAML configuration. Replace <SERVICE_ACCOUNT_NAME> with the name of your
service account and <SERVICE_ACCOUNT_NAMESPACE> with the namespace in which
the service account is created.
kind: ClusterRole apiVersion: rbac.authorization.k8s.io/v1 metadata: name: ilmt-cluster-nodes-list rules: - verbs: - list apiGroups: - '' resources: - nodes --- kind: ClusterRoleBinding apiVersion: rbac.authorization.k8s.io/v1 metadata: name: ilmt-cluster-nodes-list subjects: - kind: ServiceAccount name: <SERVICE_ACCOUNT_NAME> namespace: <SERVICE_ACCOUNT_NAMESPACE> roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole name: ilmt-cluster-nodes-list --- kind: ClusterRole apiVersion: rbac.authorization.k8s.io/v1 metadata: name: ilmt-cluster-virtualmachineinstance-list rules: - verbs: - list apiGroups: - kubevirt.io resources: - virtualmachineinstances --- kind: ClusterRoleBinding apiVersion: rbac.authorization.k8s.io/v1 metadata: name: ilmt-cluster-virtualmachineinstance-list subjects: - kind: ServiceAccount name: <SERVICE_ACCOUNT_NAME> namespace: <SERVICE_ACCOUNT_NAMESPACE> roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole name: ilmt-cluster-virtualmachineinstance-list
-
Because it is not possible to retrieve all the information required for subcapacity license calculation, such as processor type or the number of worker node sockets, it is necessary to perform one of the following actions:
- Define a pair of custom node labels in each node that is a virtual machine's hypervisor:
ibm.ilmt.sockets_count
- containing the number of socketsibm.ilmt.cpu-model.vendor_id
- with possible values of AMD/Intel.
- Install and configure a Node Feature Discovery (Red Hat provided, and not Community
Edition) add-on to your cluster to automatically add the following node labels to all your nodes:
feature.node.kubernetes.io/cpu-model.vendor_id
This label is added automatically without any additional configuration of this add-on, immediately after you install the 'NodeFeatureDiscovery' operand from the 'Node Feature Discovery' operator.
feature.node.kubernetes.io/ibm.ilmt.socket_count
To add this label, you need to add a custom resource of the NodeFeatureRule type. To do so, use the following YAML configuration:apiVersion: nfd.openshift.io/v1alpha1 kind: NodeFeatureRule metadata: name: ibm.ilmt.capacity-sockets namespace: openshift-nfd spec: rules: - name: "ibm.ilmt.capacity-sockets" labelsTemplate: | {{ range .cpu.topology }}ibm.ilmt.{{ .Name }}={{ .Value }} {{ end }} matchFeatures: - feature: cpu.topology matchExpressions: socket_count: {op: Exists}
If the processor type or the number of sockets on a worker node cannot be detected, a default value of 120 PVUs per core is used to calculate the PVU license consumption for applications installed on virtual machines running on that node.
- Define a pair of custom node labels in each node that is a virtual machine's hypervisor:
To obtain the Service Account Token, perform the following steps.- Go to and find ilmt-service-account-token.
- In the Secret details, locate the token in the Data section and copy it from there.
Note: Do not copy the token from the YAML tab, as this token is encoded in Base64 and it will not work.To obtain the Cluster API address, perform the following step.:- Go to .
- In the Details widget, find Cluster API address. For example: https://api.test.ibm.com:6443.
- To create a ServiceAccount for License Metric Tool server, use the following YAML configuration. Apply it through the
+ button in the Open Shift Web Console or with the oc
apply command.
- Configure the License Metric Tool server.
- For the central and local VM Manager Tool, see: Adding VM managers in local and central mode.
- For distributed and disconnected VM Manager Tool, see: Adding and editing VM managers in distributed and disconnected mode
Supported versions
For information about supported versions, go to IBM® License Metric Tool 9.2 - Supported Operating Systems and click Supported Hypervisor.