9.2. 实时迁移限制和超时
应用实时迁移限制和超时,以防迁移过程使集群不堪重负。通过编辑 kubevirt-config
配置文件来配置这些设置。
9.2.1. 配置实时迁移限制和超时
通过向 kubevirt-config
配置文件添加更新的 key:value 字段来为集群配置实时迁移限制和超时,该文件位于 openshift-cnv
命名空间中。
流程
编辑
kubevirt-config
配置文件并添加必要的实时迁移参数。以下示例显示默认值:$ oc edit configmap kubevirt-config -n openshift-cnv
配置文件示例
apiVersion: v1 data: default-network-interface: masquerade feature-gates: DataVolumes,SRIOV,LiveMigration,CPUManager,CPUNodeDiscovery,Sidecar,Snapshot migrations: |- parallelMigrationsPerCluster: "5" parallelOutboundMigrationsPerNode: "2" bandwidthPerMigration: "64Mi" completionTimeoutPerGiB: "800" progressTimeout: "150" machine-type: pc-q35-rhel8.3.0 selinuxLauncherType: virt_launcher.process smbios: |- Family: Red Hat Product: Container-native virtualization Manufacturer: Red Hat Sku: 2.6.0 Version: 2.6.0 kind: ConfigMap metadata: creationTimestamp: "2021-03-26T18:01:04Z" labels: app: kubevirt-hyperconverged name: kubevirt-config namespace: openshift-cnv resourceVersion: "15371295" selfLink: /api/v1/namespaces/openshift-cnv/configmaps/kubevirt-config uid: <uuid>