Skip to content

Commit 2ae021a

Browse files
fix(vm): increase max disk limit to 31 (#2302)
* feat(vm): increase max disk limit to 31 Signed-off-by: Justas Umbrasas <justas.umbrasas@hostinger.com> * fix: change vm disk devices limit to constant Signed-off-by: Justas Umbrasas <justas.umbrasas@hostinger.com> --------- Signed-off-by: Justas Umbrasas <justas.umbrasas@hostinger.com>
1 parent 702500c commit 2ae021a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

proxmoxtf/resource/vm/disk/schema.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ const (
2222
dvDiskDiscard = "ignore"
2323
dvDiskCache = "none"
2424

25+
// see /usr/share/perl5/PVE/QemuServer/Drive.pm
26+
// Using SCSI limit (31) as the highest value (IDE: 4, SCSI: 31, VirtIO: 16, SATA: 6).
27+
maxResourceVirtualEnvironmentVMDiskDevices = 31
28+
2529
// MkDisk is the name of the disk resource.
2630
MkDisk = "disk"
2731
mkDiskAIO = "aio"
@@ -271,7 +275,7 @@ func Schema() map[string]*schema.Schema {
271275
},
272276
},
273277
},
274-
MaxItems: 14,
278+
MaxItems: maxResourceVirtualEnvironmentVMDiskDevices,
275279
MinItems: 0,
276280
},
277281
}

0 commit comments

Comments
 (0)