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:
Hat wer eine Idee, warum dies nicht funktioniert?
Mit freundlichen Grüßen
Tom S.
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;
}
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.