tks. we have understand and found code.hi,
you can set up qemu guest agent and useqm guest exec
to execute commands in VM
so if we vm install
guest-agent
we have way use agent config ipv4 ?
hi, oguz. i wish help me show use guest-agent config ip configif you set up guest-agent on your vm, you can execute whichever commands you like in the vm
* you can use cloud-initnow we just no understand kvm promox how to use api config kvm ip v4 or v6
i wish get help.
because we company now write new system connect promox.
let promox easy face customer.
wish get your support.
if ok reply me . and we ready ok show your website demo.
use api config ip demo* you can use cloud-init
* or you can use guest-agent to execute the commands to set up network
what do you need help with exactly?
$response = Nodes::setQemuConfig($node, $vmid, [
'ipconfig0' => "gw=192.168.1.1,ip=192.168.1.100/24",
]);
$response = Request::Request("/nodes/$node/qemu/$vmid/agent/exec",[
'command' => "gw=192.168.1.1,ip=192.168.1.100/24"
],"POST");
$response = Request::Request("/nodes/$node/qemu/$vmid/agent/exec",[
'command' => "route add default gw 192.168.1.1 dev eth0"
],"POST");
'command' => "ip addr add 192.168.1.100 dev eth0"
use api config vm ip address.i don't understand what you mean by that
curl --insecure --cookie "$(<cookie)" --header "$(<token)" -X POST https://10.10.10.10:8006/api2/json/nodes/$node/qemu/$vmid/agent/exec -d "command=ip addr add 192.168.22.200 dev ens18"
we have running this code.example to change IP of VM via guest-agent:
check here[0] for more examples.Code:curl --insecure --cookie "$(<cookie)" --header "$(<token)" -X POST https://10.10.10.10:8006/api2/json/nodes/$node/qemu/$vmid/agent/exec -d "command=ip addr add 192.168.22.200 dev ens18"
[0]: https://pve.proxmox.com/wiki/Proxmox_VE_API
help me check right? or api no support?we have running this code.
but reply is false empty .
[4]=>
array(3) {
["enabled"]=>
bool(false)
["name"]=>
string(10) "guest-exec"
["success-response"]=>
bool(true)
}
[5]=>
array(3) {
["name"]=>
string(17) "guest-exec-status"
["enabled"]=>
bool(false) check this is false
["success-response"]=>
bool(true)
}
[6]=>
array(3) {
["success-response"]=>
bool(true)
["name"]=>
string(27) "guest-get-memory-block-info"
["enabled"]=>
bool(true)
}
have time help me check?example to change IP of VM via guest-agent:
Code:curl --insecure --cookie "$(<cookie)" --header "$(<token)" -X POST https://10.10.10.10:8006/api2/json/nodes/$node/qemu/$vmid/agent/exec -d "command=ip addr add 192.168.22.200 dev ens18"
check here[0] for more examples.
[0]: https://pve.proxmox.com/wiki/Proxmox_VE_API