diff --git a/pkg/harvester/mixins/harvester-vm/index.js b/pkg/harvester/mixins/harvester-vm/index.js index 8ba418e7..24ca3964 100644 --- a/pkg/harvester/mixins/harvester-vm/index.js +++ b/pkg/harvester/mixins/harvester-vm/index.js @@ -907,14 +907,22 @@ export default { const specInterfaces = this.spec?.template?.spec?.domain?.devices?.interfaces; const mergedInterfaces = this.mergeInterfaceList(specInterfaces, interfaces); + const devices = { + ...this.spec.template.spec.domain.devices, + interfaces: mergedInterfaces, + }; + + if (this.isEdit && networkRow.length === 0) { + devices.autoattachPodInterface = false; + } else { + delete devices.autoattachPodInterface; + } + const spec = { ...this.spec.template.spec, domain: { ...this.spec.template.spec.domain, - devices: { - ...this.spec.template.spec.domain.devices, - interfaces: mergedInterfaces, - }, + devices, }, networks };