Quantcast
Channel: Proxmox Support Forum
Viewing all articles
Browse latest Browse all 170703

Api php

$
0
0
Hi,

I have a little problem whith the Proxmox API.

My goal is to change whith a php page the MAC address of one KVM.

My code :

Code:

if ($pve2->constructor_success()) {   
if ($pve2->login()) {
            $settings = array();
            $settings['skiplock'] = true;
            $settings['net[0]'] = "e1000='".$MY_MAC_ADDRESS."'[,vmbr0]";
            $pve2->put("/nodes/$nodename/qemu/$vmid/config", $settings);
    } else {
      echo("Impossible d'effectuer le changement.");
    }
}

But when I execute this code, in Proxmox Cluster Task History, the login is show but not the update of the Network Adaptater.
I have tried to change RAM (with memory argument) and it succesfull ! Why the MAC Address not ?

Thank's for your help.

PS: Sorry for my bad English, I'm French

Viewing all articles
Browse latest Browse all 170703

Trending Articles



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