Create container with bridged mode via php API

Thomesc

New Member
Jul 26, 2016
13
0
1
27
Hi,
I'm currently making a web interface using a the proxmox API to create containers automaticly.
I'd like this containers network to be default bridged mode, my code currently looks like this :
Code:
$new_container_settings = array();
    $new_container_settings['ostemplate'] = "local:vztmpl/" . $template;
    $new_container_settings['vmid'] = $_POST['ID'];
    $new_container_settings['cpus'] = $_POST['CPU'];
    $new_container_settings['description'] = $_POST['description'];
    $new_container_settings['disk'] = $_POST['disk_size'];
    $new_container_settings['hostname'] = $_POST['nom_vm'];
    $new_container_settings['memory'] = $_POST['RAM'];
    $new_container_settings['swap'] = $_POST['swap'];
    $new_container_settings['password'] = $_POST['password'];
    $new_container_settings['storage'] = "NFS";
   
    $task = $pve2->post("/nodes/".$first_node."/openvz", $new_container_settings);
I've searched in the documentation and on the web but couldn't find what variable I had to change to switch to bridged mode.