Qemu 400 Error

Geron74784

New Member
Dec 12, 2022
11
0
1
::ffff:192.168.178.32 - root@pam [17/12/2022:19:48:05 +0100] "POST /api2/json/nodes/pve/qemu HTTP/1.1" 400 79
Hi I have a website that communicates via API with Proxmox but when I create a virtual machine it returns me Error 400 on qemu, could anyone help me?

::ffff:192.168.178.32 - - [17/12/2022:19:47:58 +0100] "GET /pve2/ext6/theme-crisp/resources/images/grid/hd-pop.png HTTP/1.1" 200 17305
::ffff:192.168.178.32 - root@pam [17/12/2022:19:48:02 +0100] "GET /api2/json/nodes/pve/status HTTP/1.1" 200 774
::ffff:192.168.178.32 - root@pam [17/12/2022:19:48:03 +0100] "GET /api2/json/cluster/tasks HTTP/1.1" 200 988
::ffff:192.168.178.32 - root@pam [17/12/2022:19:48:03 +0100] "GET /api2/json/cluster/resources HTTP/1.1" 200 608
::ffff:192.168.178.32 - - [17/12/2022:19:48:05 +0100] "POST /api2/json/access/ticket HTTP/1.1" 200 1284
::ffff:192.168.178.32 - root@pam [17/12/2022:19:48:05 +0100] "GET /api2/json/nodes HTTP/1.1" 200 330
::ffff:192.168.178.32 - root@pam [17/12/2022:19:48:05 +0100] "GET /api2/json/cluster/nextid HTTP/1.1" 200 14
::ffff:192.168.178.32 - root@pam [17/12/2022:19:48:05 +0100] "POST /api2/json/nodes/pve/qemu HTTP/1.1" 400 79
::ffff:192.168.178.32 - root@pam [17/12/2022:19:48:10 +0100] "GET /api2/json/cluster/tasks HTTP/1.1" 200 981
::ffff:192.168.178.32 - root@pam [17/12/2022:19:48:10 +0100] "GET /api2/json/nodes/pve/status HTTP/1.1" 200 784
::ffff:192.168.178.32 - root@pam [17/12/2022:19:48:10 +0100] "GET /api2/json/cluster/resources HTTP/1.1" 200 608
 
else {
if ($product_config['virt'] == 'qemu') {
$container_settings = array(
'vmid' => $vmid,
'name' => $model->username, // Hostname to define
'description' => $description,
'storage' => $product_config['storage'],
'memory' => $product_config['memory'],
'ostype' => 'other',
'ide2' => $product_config['cdrom'].',media=cdrom',
'sockets' => $product_config['cpu'],
'cores' => $product_config['cpu'],
'ide0' => $product_config['ide0']
);
}
This is the array I pass for qemu
 
check the response for the actual error (message).
 

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!