diff --git a/pkg/harvester/config/labels-annotations.js b/pkg/harvester/config/labels-annotations.js index a04d5e0d..98c28c3c 100644 --- a/pkg/harvester/config/labels-annotations.js +++ b/pkg/harvester/config/labels-annotations.js @@ -28,6 +28,7 @@ export const HCI = { NODE_ROLE_CONTROL_PLANE: 'node-role.kubernetes.io/control-plane', NODE_ROLE_ETCD: 'node-role.harvesterhci.io/witness', PROMOTE_STATUS: 'harvesterhci.io/promote-status', + CLONE_BACKEND_STORAGE_STATUS: 'harvesterhci.io/clone-backend-storage-status', MIGRATION_STATE: 'harvesterhci.io/migrationState', VOLUME_CLAIM_TEMPLATE: 'harvesterhci.io/volumeClaimTemplates', IMAGE_NAME: 'harvesterhci.io/image-name', diff --git a/pkg/harvester/models/kubevirt.io.virtualmachine.js b/pkg/harvester/models/kubevirt.io.virtualmachine.js index 26830630..c31f5a90 100644 --- a/pkg/harvester/models/kubevirt.io.virtualmachine.js +++ b/pkg/harvester/models/kubevirt.io.virtualmachine.js @@ -770,11 +770,11 @@ export default class VirtVm extends HarvesterResource { } get isPending() { - if (this && + if ((this && !this.isVMExpectedRunning && this.isVMCreated && this.vmi?.status?.phase === VMIPhase.Pending - ) { + ) || (this.metadata?.annotations?.[HCI_ANNOTATIONS.CLONE_BACKEND_STORAGE_STATUS] === 'cloning')) { return { status: VMIPhase.Pending }; }