Hello all, I'm working on a small project to create a KVM using the API, but I'm encountering an issue.
In short, I can successfully create a disk for KVM by calling the endpoint
with parameters like
Now, I want to fetch a file from the storage of a related node and use a specific file as an ISO for the KVM I'm creating.
I can retrieve all the storage content using the endpoint
and it returns a JSON array of the ISOs I have stored. However, I'm unsure which parameter of
to use for this purpose.
I tried using the selected disk parameter (virtio0) as in the example by adding
but it doesn't seem to work. Is the creation of a KVM using ISO done through the disk parameter (virtio, sata, etc.)?
If so, what value should be used for this parameter? Or is there another parameter? Is this the same parameter used for qcow disks, except the endpoint to fetch the qcow is different?
I've been struggling with this for the last two days and am using the latest version of Proxmox.
Can someone please help me figure this out? Thank you!
In short, I can successfully create a disk for KVM by calling the endpoint
HTTP:
/api2/json/nodes/{node}/qemu
with parameters like
HTTP:
virtio0: local-lvm:10,cache=none,size=10G,ro=0
Now, I want to fetch a file from the storage of a related node and use a specific file as an ISO for the KVM I'm creating.
I can retrieve all the storage content using the endpoint
HTTP:
/nodes/{node}/storage/{storage}/content
and it returns a JSON array of the ISOs I have stored. However, I'm unsure which parameter of
HTTP:
/api2/json/nodes/{node}/qemu
to use for this purpose.
I tried using the selected disk parameter (virtio0) as in the example by adding
HTTP:
media={volid}, local-lvm:10,cache=none,size=10G,ro=0,file={volid}
but it doesn't seem to work. Is the creation of a KVM using ISO done through the disk parameter (virtio, sata, etc.)?
If so, what value should be used for this parameter? Or is there another parameter? Is this the same parameter used for qcow disks, except the endpoint to fetch the qcow is different?
I've been struggling with this for the last two days and am using the latest version of Proxmox.
Can someone please help me figure this out? Thank you!