fix(region): allow guest create on cannot detect image props (#21139)

This commit is contained in:
wanyaoqi
2024-09-02 10:18:51 +08:00
committed by GitHub
parent f6817bd6e2
commit 4ea3d11140
+2 -2
View File
@@ -1750,8 +1750,8 @@ func (manager *SGuestManager) validateCreateData(
return nil, httperrors.NewInputParameterError("UEFI image requires UEFI boot mode")
}
default:
// not UEFI or not detectable
if input.Bios == "UEFI" {
// not UEFI image
if input.Bios == "UEFI" && len(imgProperties) != 0 {
return nil, httperrors.NewInputParameterError("UEFI boot mode requires UEFI image")
}
}