mirror of
https://github.com/bpg/terraform-provider-proxmox.git
synced 2025-07-01 19:12:59 +00:00
fix(vm): edge case error when cloning a VM with EFI disk (#1897)
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
This commit is contained in:
parent
13401465c9
commit
4ca2f32ac6
@ -2235,9 +2235,13 @@ func vmCreateClone(ctx context.Context, d *schema.ResourceData, m interface{}) d
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
if efiType != *currentDiskInfo.Type {
|
// the efitype is either "2m" or "4m"
|
||||||
|
// so it's kinda resizing, but with 2 fixed sizes it treated as a "type" by PVE
|
||||||
|
// default is "2m", hence this elaborated check.
|
||||||
|
if (currentDiskInfo.Type != nil && efiType != *currentDiskInfo.Type) ||
|
||||||
|
(currentDiskInfo.Type == nil && efiType != dvEFIDiskType) {
|
||||||
return diag.Errorf(
|
return diag.Errorf(
|
||||||
"resizing of efidisks is not supported.",
|
"changing the EFI disk type (4m / 2m) is not supported",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user