Dear,
Again a few problems with the API. I am unable to send shell commands to the proxmox host via the API.
i.e.
The result will be:
Executing this command via putty works like a charm.
I cant also change special config vars of my LXC container via the API, i.e.
lxc.aa_profile: lxc-custom-mounts
Can someone help? Thanks.
Again a few problems with the API. I am unable to send shell commands to the proxmox host via the API.
i.e.
PHP:
$aCommands = array
(
'pct exec ' . $iVMID . ' -- ls -al /'
);
var_dump ( $pApi->post ( '/nodes/' . $sNodeName . '/execute', array ( 'commands' => json_encode ( $aCommands ) ) ) );
The result will be:
array(1) {
[0]=>
array(2) {
["status"]=>
int(500)
["message"]=>
string(96) "pct exec 106 -- ls -al / is not a valid command at /usr/share/perl5/PVE/API2/Nodes.pm line 352.
"
}
}
Executing this command via putty works like a charm.
I cant also change special config vars of my LXC container via the API, i.e.
lxc.aa_profile: lxc-custom-mounts
Can someone help? Thanks.