Hi,
I'm trying to edit the io read and write limit for an existing vm disk via the api.
However the request fails with the response ""scsi0": "'import-from' requires special syntax - use <storage ID>:0,import-from=<source>".
I'm not quite sure how to properly format the request and which values are needed.
I'm trying to edit the io read and write limit for an existing vm disk via the api.
However the request fails with the response ""scsi0": "'import-from' requires special syntax - use <storage ID>:0,import-from=<source>".
I'm not quite sure how to properly format the request and which values are needed.
Code:
// Set resources
$response1 = Http::withToken($apikey)->asForm()->post('https://' . $server->hostname . ':8006/api2/json/nodes/' . $server->node . '/qemu/' . $vmid . '/config', [
'cores' => $cores,
'cpulimit' => $cpuLimit,
'memory' => $memory,
'net0' => "model=virtio,rate=" . $portLimit,
'scsi0' => "import-from=local-zfs:base-" . $templateid . "-disk-0,file=local-zfs:base-" . $templateid . "-disk-0,mbps_rd=" . $ioLimit . ",mbps_wr=" . $ioLimit,
]);