SR_BACKEND_FAILURE_79 VDI Invalid size
-
Hello everyone.
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 errorAPI 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?
-
Hi,
I am developing management of VMs via the web.
You know there's Xen Orchestra, right? If no, please check https://xen-orchestra.com If yes, why reinventing the wheel? (you might have a good personal reason, just wondering)
Believe me, doing an UI on top of XAPI is a LOT of work, it took us years to master it, with a team of 5 or 6 people.
-
Of course I'm familiar with Xen Orchestra, but it doesn't suit me.
- Integration with CRM.
- Integration with the company's website.
- I am learning and it is very pleasant to do something myself, time does not matter.
-
Then why not using XO API? That would make more sense to control directly the central point than having to deal with all hosts individually. Plus it means XO can act as a proxy between hosts and your business app.
-
Thank you for introducing the possibilities XO, but everyone is free to choose their own path. Sorry, but the question is not about the capabilities of XO, I would like to hear who can help me ..
-
I'm just asking questions XO API will be probably more logical to you, but you decide
-
Solved the problem by explicitly specifying the data type
$resize = 'VDI.resize'; $xcpapi->$resize($vdi, ''.(int)$hdd2.'');
Doesn't work without brackets
''.(int)$hdd2.''