diff --git a/pkg/harvester/dialog/EnableSriovDevice.vue b/pkg/harvester/dialog/EnableSriovDevice.vue index b0c47ab56de..1e665f06cd4 100644 --- a/pkg/harvester/dialog/EnableSriovDevice.vue +++ b/pkg/harvester/dialog/EnableSriovDevice.vue @@ -39,6 +39,12 @@ export default { try { this.resources[0].spec.numVFs = this.numVFs; + if (this.resources[0].spec.numVFs <= 0) { + this.resources[0].spec.numVFs = 0; + this.numVFs = 0; + this.close(); + return; + } await actionResource.save(); buttonCb(true); this.close();