Proxmox API VM creation

x86

New Member
Aug 19, 2014
21
0
1
Hello,

I need some information about creating a VM through the VE API. I am already aware of the API documentation ( http://pve.proxmox.com/pve2-api-doc/ -> /nodes/{node}/qemu ).

My question is, how to create a HDD/CD-ROM ?
The creation output (via PHP):
Code:
array(12) {
  ["name"]=>
  string(7) "web002x"
  ["ostype"]=>
  string(4) "win8"
  ["sockets"]=>
  string(1) "1"
  ["cores"]=>
  string(1) "4"
  ["cpu"]=>
  string(4) "host"
  ["memory"]=>
  string(4) "4096"
  ["ide0"]=>
  string(16) "none,media=cdrom"
  ["virtio1"]=>
  string(21) "local=25,format=qcow2"
  ["vmid"]=>
  string(3) "107"
  ["hotplug"]=>
  bool(true)
  ["autostart"]=>
  bool(true)
  ["onboot"]=>
  bool(true)
}

Where 15 means 15 GB.
But I am get the error via debug: [virtio1] => invalid format - unable to parse drive options

Thanks.
 
Last edited:

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!