diff --git a/pkg/harvester/dialog/HarvesterMigrationDialog.vue b/pkg/harvester/dialog/HarvesterMigrationDialog.vue index e50ac071..c65521c4 100644 --- a/pkg/harvester/dialog/HarvesterMigrationDialog.vue +++ b/pkg/harvester/dialog/HarvesterMigrationDialog.vue @@ -70,13 +70,17 @@ export default { return resource; }, + cpuPinningAlertMessage() { + return this.t('harvester.virtualMachine.cpuPinning.migrationMessage'); + }, + nodeNameList() { const nodes = this.$store.getters['harvester/all'](NODE); return nodes.filter((n) => { const isNotSelfNode = !!this.availableNodes.includes(n.id); const isNotWitnessNode = n.isEtcd !== 'true'; // do not allow to migrate to self node and witness node - const isCpuPinning = this.actionResource?.spec?.template?.spec?.domain?.cpu?.dedicatedCpuPlacement; + const isCpuPinning = this.actionResource?.isCpuPinning; const matchingCpuManagerConfig = !isCpuPinning || n.isCPUManagerEnabled; // If cpu-pinning is enabled, filter-out non-enabled CPU manager nodes. return isNotSelfNode && isNotWitnessNode && matchingCpuManagerConfig; @@ -146,6 +150,7 @@ export default { diff --git a/pkg/harvester/l10n/en-us.yaml b/pkg/harvester/l10n/en-us.yaml index ba6575ba..6d87e340 100644 --- a/pkg/harvester/l10n/en-us.yaml +++ b/pkg/harvester/l10n/en-us.yaml @@ -561,6 +561,7 @@ harvester: label: Enable CPU Pinning tooltip: Enable CPU Pinning brings better performance and reduce latency for the virtual machine restartVMMessage: Changing the CPU Pinning setting requires a virtual machine reboot for the change to take effect + migrationMessage: This virtual machine can only be migrated to a target node that has CPU Manager enabled, as CPU Pinning is configured. restartNow: |- {restart, select, true {Restart} diff --git a/pkg/harvester/models/kubevirt.io.virtualmachine.js b/pkg/harvester/models/kubevirt.io.virtualmachine.js index ee2ebe76..61bd5527 100644 --- a/pkg/harvester/models/kubevirt.io.virtualmachine.js +++ b/pkg/harvester/models/kubevirt.io.virtualmachine.js @@ -459,6 +459,10 @@ export default class VirtVm extends HarvesterResource { return null; } + get isCpuPinning() { + return this.spec?.template?.spec?.domain?.cpu?.dedicatedCpuPlacement === true; + } + get isVMExpectedRunning() { if (!this?.spec) { return false;