Skip to content

Configuration#

This section describes how to fine-tune Mirantis k0rdent Virtualization by modifying the HyperConverged (HCO) custom resource, which is the central configuration point for Mirantis k0rdent Virtualization (KubeVirt) and its related components. By updating this resource, administrators can adjust certificate management, live migration behavior, resource allocation, and various operational strategies.

HCO Custom Resource#

Note: Starting with HCO 1.18.0-mira, the HCO API has been updated from hco.kubevirt.io/v1beta1 to hco.kubevirt.io/v1. Existing HyperConverged resources are automatically converted to the new API version. However, Sidecar and Root feature gate settings from v1beta1 are not migrated automatically in 1.18.2-mira. See Sidecar and Root feature gates are not converted from v1beta1 to v1 in HCO 1.18.2-mira.

Administrators can adjust the configuration of Mirantis k0rdent Virtualization by updating the HyperConverged custom resource. In v1, configuration fields are grouped under top-level spec sections. The default configuration includes:

spec.featureGates#

A list of feature gate objects for experimental or optional functionality. Each entry has:

  • name (required): The feature gate name in camelCase (for example, downwardMetrics).
  • state (optional): Enabled or Disabled. If omitted, defaults to Enabled.

Add a feature gate to the list to override its default behavior: enable an alpha-phase gate (disabled by default), or disable a beta-phase gate (enabled by default). Common examples:

  • downwardMetrics: Exposes a limited set of host metrics to virtual machine guests. Phase: alpha (disabled by default).
  • decentralizedLiveMigration: Enables decentralized live migration. Phase: beta (enabled by default).
  • videoConfig: Allows configuring video device types for VMs. Phase: beta (enabled by default).

spec.virtualization#

  • evictionStrategy: Specifies how VirtualMachineInstance objects (VMIs) should behave during node drains. Allowed values: None, LiveMigrate, LiveMigrateIfPossible, External. Defaults to LiveMigrate on multi-worker clusters and None on single-worker clusters.
  • higherWorkloadDensity.memoryOvercommitPercentage: Ratio of virtual machine memory allocation relative to the physical memory assigned to the hosting pod (virt-launcher). Default: 100.
  • liveMigrationConfig: Sets parameters for live migration operations:
    • parallelMigrationsPerCluster: Maximum number of concurrent live migrations across the cluster. Default: 5.
    • parallelOutboundMigrationsPerNode: Maximum number of migrations leaving a single node simultaneously. Default: 2.
    • completionTimeoutPerGiB: Timeout for migration completion based on guest resource size (RAM and disk). Default: 150.
    • progressTimeout: Timeout in seconds if no progress is observed during memory copying. Default: 150.
  • vmiCPUAllocationRatio: Fraction of a physical CPU thread requested per vCPU. Default: 10.
  • workloadUpdateStrategy: Specifies how to handle disruptions during automated workload updates:
    • workloadUpdateMethods: Default: ["LiveMigrate"].
    • batchEvictionInterval: Time interval to wait before issuing the next batch of shutdowns. Default: 1m0s.
    • batchEvictionSize: Number of VMIs that can be forcefully updated per batch. Default: 10.
  • platform: Platform identifier for the cluster (for example, k0s).

spec.security.certConfig#

Rotation policy for internal, self-signed certificates:

  • ca:
    • duration: Lifespan of the CA certificate, such as 48h0m0s.
    • renewBefore: When the CA certificate should be renewed prior to expiration, for example, 24h0m0s.
  • server:
    • duration: Validity period for server certificates, such as 24h0m0s.
    • renewBefore: How early a server certificate is renewed before it expires, such as 12h0m0s.

spec.deployment#

  • nodePlacements: Node scheduling preferences and constraints for infrastructure and workload components:
    • infra: Scheduling configuration for infrastructure entities (for example, operators).
    • workload: Scheduling configuration for workload entities (for example, VM pods).
  • uninstallStrategy: Defines how to proceed on uninstall when workloads (VirtualMachine, DataVolume, and so on) still exist. Default: BlockUninstallIfWorkloadsExist.

spec.workloadSources#

  • enableCommonBootImageImport: Opt-in to automatic delivery and updates of common data import cron templates. Default: true. In v1, this field replaces the deprecated enableCommonBootImageImport feature gate.

Example v1 configuration:

apiVersion: hco.kubevirt.io/v1
kind: HyperConverged
metadata:
  name: kubevirt-hyperconverged
  namespace: kubevirt
spec:
  featureGates:
    - name: downwardMetrics
  virtualization:
    evictionStrategy: LiveMigrate
    platform: k0s
    liveMigrationConfig:
      parallelMigrationsPerCluster: 5
    vmiCPUAllocationRatio: 10
  security:
    certConfig:
      ca:
        duration: 48h0m0s
        renewBefore: 24h0m0s
  deployment:
    nodePlacements:
      infra:
        nodeSelector:
          kubernetes.io/os: linux
    uninstallStrategy: BlockUninstallIfWorkloadsExist
  workloadSources:
    enableCommonBootImageImport: true

Integration with Ceph#

Integration with Ceph allows you to seamlessly configure storage backends for your virtual machine workloads. Specific details such as storage class configuration, block or filesystem options, and persistent volume claims can be customized as needed to match your environment's requirements. This integration is designed to ensure that your virtual machines have access to robust, scalable storage solutions managed by Ceph, while remaining within the Kubernetes ecosystem. Details for integrating with Ceph can be configured as needed.

Integration with KOF#

k0rdent Enterprise Observability & FinOps (KOF) integration provides advanced monitoring and logging capabilities for your virtualized workloads. This integration allows you to capture detailed performance metrics and logs, aiding in both troubleshooting and capacity planning. By integrating with KOF, administrators can gain deeper insights into the behavior of virtual machines and the underlying infrastructure, facilitating proactive management and optimization.

For step-by-step instructions on installing and configuring monitoring for Mirantis k0rdent Virtualization with KOF, see the Virtualization Monitoring Installation Guide.