API: How to create a volume for qemu/kvm?

ArtemZ

New Member
May 23, 2012
12
0
1
Hello,
I found official proxmox api docs (http://pve.proxmox.com/pve2-api-doc/) to be completely unclear on how to create a qcow/raw volume for qemu/kvm VM and assign one to it (or how to specify that a volume should be created on VM creation) and how to specify extra options for this volume (read/write limits),
Could someone explain please?

Thanks
 
Hello,
I found official proxmox api docs (http://pve.proxmox.com/pve2-api-doc/) to be completely unclear on how to create a qcow/raw volume for qemu/kvm VM and assign one to it (or how to specify that a volume should be created on VM creation) and how to specify extra options for this volume (read/write limits),
Could someone explain please?

Thanks

you need to look in doc pour qemu config update

PUT /api2/json/nodes/{node}/qemu/{vmid}/config


Note that proxmox gui use the api, so if you have firebug by example, you can see the ajax request to the api with parameters
 
you need to look in doc pour qemu config update

PUT /api2/json/nodes/{node}/qemu/{vmid}/config


Note that proxmox gui use the api, so if you have firebug by example, you can see the ajax request to the api with parameters

Documentation for PUT /api2/json/nodes/{node}/qemu/{vmid}/config doesn't describe volume creation. There are only two parameters related to my question: sata[n] and virtio[n]. Both, in my understanding, only allows to specify already existing volume and comments for both doesn't describe how to specify extra io management parameters.
 
Documentation for PUT /api2/json/nodes/{node}/qemu/{vmid}/config doesn't describe volume creation. There are only two parameters related to my question: sata[n] and virtio[n]. Both, in my understanding, only allows to specify already existing volume and comments for both doesn't describe how to specify extra io management parameters.

There is a special syntax for colume creation, where you can pas the size in GB: example "-ide0 5"
 

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!