Quantcast
Viewing all articles
Browse latest Browse all 170992

PHP API cannot Clone VM (qemu)

Hello,
i hope you understand my problem. Sry for my english, I am from Germany.

I would like to develope a API for Hosting qemu VM´s.

Status from all VM´s from the github example works perfect. But to clone a VM to another it doesent work. Proxmoxx api doesnt send an error or notice. I only get "array(1) { [0]=> bool(false) }" looks like false :D. The VM didnt created. But i cannot see whats wrong. Proxmoxx only say this.
my php code
PHP Code:

if ($pve2->constructor_success()) {
 
   
    if (
$pve2->login()) {
        
//clone VM6 (Testsystem)
if(isset($_GET["reinstall"]) && $_GET["reinstall"] != "")
{
    
$vmid $_GET["reinstall"];
    if(
$vmid == "108")
    {
        
        
$parameters = array ();
$parameters["newid"] = 108;
$parameters["node"] = "srv01";
$parameters["vmid"] = 106;
$parameters["full"] = true;
$parameters["storage"] = "local";
$parameters["format"] = 1;



        
$status[] = $pve2->post("/nodes/srv01/qemu/108/clone",$parameters);
        
var_dump($status);exit;
        
        
    }
    
    
    


why it doesent work? I hope anyone understand my problem and can help me.

Greetings from Germany

Viewing all articles
Browse latest Browse all 170992

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>