Solved the problem by explicitly specifying the data type
$resize = 'VDI.resize'; $xcpapi->$resize($vdi, ''.(int)$hdd2.'');
Doesn't work without brackets
I am developing management of VMs via the web.
Faced the problem of resizing the disk.
To change I use the VDI.resize function
I cannot understand this function in what format does it accept data B, KB, MB, GB?
If I transfer to Byte, writes an error
API failure. (SR_BACKEND_FAILURE_79 VDI Invalid size [opterr = VDI size must be between 1 MB and 2088960 MB])
If I transfer to KB .... an error
API failure. (SR_BACKEND_FAILURE_79 VDI Invalid size [opterr = shrinking not allowed])
Maybe someone knows how to do it right?