From 56d97260c40f0654d1e74664b1fb0896a64c3b7a Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 2 Jan 2026 18:13:35 +0800 Subject: [PATCH] fix: drop mac-address annotation from vm template to prevent MAC address reusing (#663) (#669) related-to: harvester/harvester#9789 (cherry picked from commit 1352246e1efdab691b7ccba9e1d02da01b6844a1) Signed-off-by: Tim Liou Co-authored-by: Tim Liou --- pkg/harvester/config/labels-annotations.js | 1 + pkg/harvester/edit/kubevirt.io.virtualmachine/index.vue | 1 + 2 files changed, 2 insertions(+) diff --git a/pkg/harvester/config/labels-annotations.js b/pkg/harvester/config/labels-annotations.js index 94ea07b5..541c7b69 100644 --- a/pkg/harvester/config/labels-annotations.js +++ b/pkg/harvester/config/labels-annotations.js @@ -77,4 +77,5 @@ export const HCI = { CLONE_STRATEGY: 'cdi.harvesterhci.io/storageProfileCloneStrategy', VOLUME_MODE_ACCESS_MODES: 'cdi.harvesterhci.io/storageProfileVolumeModeAccessModes', VOLUME_SNAPSHOT_CLASS: 'cdi.harvesterhci.io/storageProfileVolumeSnapshotClass', + MAC_ADDRESS: 'harvesterhci.io/mac-address', }; diff --git a/pkg/harvester/edit/kubevirt.io.virtualmachine/index.vue b/pkg/harvester/edit/kubevirt.io.virtualmachine/index.vue index 027b0c49..2af391e7 100644 --- a/pkg/harvester/edit/kubevirt.io.virtualmachine/index.vue +++ b/pkg/harvester/edit/kubevirt.io.virtualmachine/index.vue @@ -254,6 +254,7 @@ export default { return volume; }); + delete cloneVersionVM.metadata.annotations[HCI_ANNOTATIONS.MAC_ADDRESS]; cloneVersionVM.metadata.annotations[HCI_ANNOTATIONS.VOLUME_CLAIM_TEMPLATE] = JSON.stringify(deleteDataSource); // Update instance labels, labels and annotations