API: qemu lässt keine virtio disks anlegen

tomsiewert

Active Member
Nov 5, 2016
7
0
41
21
Germany
Guten Tag Proxmox-Community German,

ich habe derzeit das Problem, dass ich keine qemu VM mit virtio-Disk anlegen.
Fehler:
'virtio' => 'property is not defined in schema and the schema does not allow additional properties'
Ich nutze die PHP-API von Nathan Sullivan.
Mein Code:
<?php
require("pve.class.php");
$pve2 = new PVE2_API("dedi01.CENSCORED.de", "root", "pam", "CENSCORED");
if ($pve2->login()) {
$nodes = $pve2->get_node_list();
$first_node = $nodes[0];
unset($nodes);

$new_qemu_settings = array();
$new_qemu_settings['vmid'] = "1233";
$new_qemu_settings['bios'] = "seabios";
$new_qemu_settings['cdrom'] = "local:iso/ubuntu-16.04.1-server-amd64.iso";
$new_qemu_settings['cores'] = "2";
$new_qemu_settings['cpu'] = "cputype=host";
$new_qemu_settings['memory'] = "512";
$new_qemu_settings['ostype'] = "other";
$new_qemu_settings['virtio'] = "size=25";
print_r($new_qemu_settings);
print("\n\n");
print_r($pve2->post("/nodes/" . $first_node . "/qemu", $new_qemu_settings));
print("\n\n");
echo "Erstellt";
print("\n\n");
} else {
print("Login to Proxmox Host failed.\n");
exit;
}

Hat wer eine Idee, warum dies nicht funktioniert?

Mit freundlichen Grüßen
Tom S.
 
Hi,
Virtio gibt es nicht, es muss virtio<X> heißen.
X steht für eine Nummer.
Da musst du dich an den Nathan Sullivan wenden oder eine andere PHP-API verwenden.
 

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!