Skip to content

Commit 27442bd

Browse files
authored
fix(kubevirt-instancetypes): drop persistent EFI/TPM to unblock live-migration (#3006)
## What this PR does Temporary revert. v1.5.0 restored persistent EFI/TPM state for the `windows.11` / `windows.2k22` / `windows.2k25` profiles. With persistence on, KubeVirt creates a backend-storage PVC (`persistent-state-for-<vm>`) which, on the default `replicated` StorageClass, is **ReadWriteOnce** — it pins the VM to its node and **blocks live-migration and node drains**. With `evictionStrategy: LiveMigrate` this can stall cluster upgrades. See #3005. This strips persistent EFI/TPM from the preferences again — but via `yq del` instead of the original `sed -d`, so an emptied `preferredTPM` stays `{}` (the v1.8 CRD rejects `null`, which is the bug the original strip caused). **Secure Boot and the vTPM remain present, just non-persistent** — Windows VMs still boot; they just don't persist EFI/TPM across reboots. ⚠️ **Temporary stopgap** until vm-state can request an RWX backend — either RWX-Block via the upstream KubeVirt change (kubevirt/kubevirt#18215), or an RWX-Filesystem `vmStateStorageClass`. Once that lands, persistence can be re-enabled with live-migration intact. ### Screenshots No UI changes. ### Release note ```release-note fix(kubevirt-instancetypes): temporarily disable persistent EFI/TPM state to unblock live-migration of Windows VMs. Persistence created a ReadWriteOnce backend-storage PVC on the default storage class, pinning the VM to its node. Secure Boot and vTPM remain available (non-persistent); to be re-enabled once vm-state can use RWX storage. ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Updated Windows virtual machine preferences to enable live migration and drain operations * Fixed compatibility issues with KubeVirt v1.8 virtual machine preference configurations * Removed persistent settings from TPM and EFI configurations to prevent blocking behaviors on Windows 11 and Windows Server 2022/2025 variants <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2 parents 82b8c46 + 6ac2601 commit 27442bd

2 files changed

Lines changed: 12 additions & 18 deletions

File tree

‎packages/system/kubevirt-instancetypes/Makefile‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ update:
1616
mkdir templates
1717
kustomize build https://github.com/kubevirt/common-instancetypes/preferences?ref=$(COMMON_INSTANCETYPES_REF) > templates/preferences.yaml
1818
yq -i 'select(.kind != "VirtualMachinePreference")' templates/preferences.yaml
19+
# TEMPORARY (see #3005): drop persistent EFI/TPM state. With persistence on,
20+
# KubeVirt creates a backend-storage PVC that is RWO on the default StorageClass,
21+
# which pins the VM to its node and blocks live-migration / drain. Use `del` (not
22+
# `sed -d`) so an emptied preferredTPM stays `{}` rather than null, which the
23+
# KubeVirt v1.8 CRD structural schema rejects. Revert once vm-state can request RWX.
24+
yq -i 'del(.spec.firmware.preferredEfi.persistent) | del(.spec.devices.preferredTPM.persistent)' templates/preferences.yaml
1925
kustomize build https://github.com/kubevirt/common-instancetypes/instancetypes?ref=$(COMMON_INSTANCETYPES_REF) > templates/instancetypes.yaml
2026
yq -i 'select(.kind != "VirtualMachineInstancetype")' templates/instancetypes.yaml
2127
# Re-append Cozystack-local instancetypes the pinned catalog no longer ships

‎packages/system/kubevirt-instancetypes/templates/preferences.yaml‎

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1352,8 +1352,7 @@ spec:
13521352
preferredAutoattachInputDevice: true
13531353
preferredDiskBus: sata
13541354
preferredInterfaceModel: e1000e
1355-
preferredTPM:
1356-
persistent: true
1355+
preferredTPM: {}
13571356
features:
13581357
preferredAcpi: {}
13591358
preferredApic: {}
@@ -1375,7 +1374,6 @@ spec:
13751374
preferredSmm: {}
13761375
firmware:
13771376
preferredEfi:
1378-
persistent: true
13791377
secureBoot: true
13801378
preferredTerminationGracePeriodSeconds: 3600
13811379
requirements:
@@ -1424,8 +1422,7 @@ spec:
14241422
preferredInputBus: virtio
14251423
preferredInputType: tablet
14261424
preferredInterfaceModel: virtio
1427-
preferredTPM:
1428-
persistent: true
1425+
preferredTPM: {}
14291426
features:
14301427
preferredAcpi: {}
14311428
preferredApic: {}
@@ -1447,7 +1444,6 @@ spec:
14471444
preferredSmm: {}
14481445
firmware:
14491446
preferredEfi:
1450-
persistent: true
14511447
secureBoot: true
14521448
preferredTerminationGracePeriodSeconds: 3600
14531449
requirements:
@@ -1894,8 +1890,7 @@ spec:
18941890
preferredAutoattachInputDevice: true
18951891
preferredDiskBus: sata
18961892
preferredInterfaceModel: e1000e
1897-
preferredTPM:
1898-
persistent: true
1893+
preferredTPM: {}
18991894
features:
19001895
preferredAcpi: {}
19011896
preferredApic: {}
@@ -1917,7 +1912,6 @@ spec:
19171912
preferredSmm: {}
19181913
firmware:
19191914
preferredEfi:
1920-
persistent: true
19211915
secureBoot: true
19221916
preferredTerminationGracePeriodSeconds: 3600
19231917
requirements:
@@ -1966,8 +1960,7 @@ spec:
19661960
preferredInputBus: virtio
19671961
preferredInputType: tablet
19681962
preferredInterfaceModel: virtio
1969-
preferredTPM:
1970-
persistent: true
1963+
preferredTPM: {}
19711964
features:
19721965
preferredAcpi: {}
19731966
preferredApic: {}
@@ -1989,7 +1982,6 @@ spec:
19891982
preferredSmm: {}
19901983
firmware:
19911984
preferredEfi:
1992-
persistent: true
19931985
secureBoot: true
19941986
preferredTerminationGracePeriodSeconds: 3600
19951987
requirements:
@@ -2036,8 +2028,7 @@ spec:
20362028
preferredAutoattachInputDevice: true
20372029
preferredDiskBus: sata
20382030
preferredInterfaceModel: e1000e
2039-
preferredTPM:
2040-
persistent: true
2031+
preferredTPM: {}
20412032
features:
20422033
preferredAcpi: {}
20432034
preferredApic: {}
@@ -2059,7 +2050,6 @@ spec:
20592050
preferredSmm: {}
20602051
firmware:
20612052
preferredEfi:
2062-
persistent: true
20632053
secureBoot: true
20642054
preferredTerminationGracePeriodSeconds: 3600
20652055
requirements:
@@ -2108,8 +2098,7 @@ spec:
21082098
preferredInputBus: virtio
21092099
preferredInputType: tablet
21102100
preferredInterfaceModel: virtio
2111-
preferredTPM:
2112-
persistent: true
2101+
preferredTPM: {}
21132102
features:
21142103
preferredAcpi: {}
21152104
preferredApic: {}
@@ -2131,7 +2120,6 @@ spec:
21312120
preferredSmm: {}
21322121
firmware:
21332122
preferredEfi:
2134-
persistent: true
21352123
secureBoot: true
21362124
preferredTerminationGracePeriodSeconds: 3600
21372125
requirements:

0 commit comments

Comments
 (0)