How to RESIZE through API?

kotakomputer

Renowned Member
May 14, 2012
429
13
83
Jakarta, Indonesia
www.proxmoxindo.com
This code doesn't work, unfortunately the API documentation not yet complete. Don't know if array name of 'disk' and 'size' are the corrects one.
Code:
$svr_hostname = 'dsi-094114';
$vmid = 100;

$hdd_settings = array();
$hdd_settings['disk'] = 'ide0';
$hdd_settings['size'] = '+25';
$pve2->put("/nodes/$svr_hostname/qemu/$vmid/resize", $hdd_settings);

Any idea?
 
To be able to do what you want you need to json encode $hdd_settings.

For a test try this:

$pve2->put("/nodes/$svr_hostname/qemu/$vmid/resize", '{"disk":"ide0","size":"+25"}');
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!