how to use api reset vm password

hi,

you can set up qemu guest agent and use qm guest exec to execute commands in VM
 
If your VM`s use cloud init then u can use the API to Chang e the cloud init config.
Bit u must reboot the VM
Or as per the other sender u can use qemu guest agent u can also use that via the API
 
hi,

you can set up qemu guest agent and use qm guest exec to execute commands in VM
tks. we have understand and found code.
so if we vm install
guest-agent
we have way use agent config ipv4 ?
issues we write system manage promox vm .
tks support
 
Last edited:
so if we vm install
guest-agent
we have way use agent config ipv4 ?

if you set up guest-agent on your vm, you can execute whichever commands you like in the vm
 
if you set up guest-agent on your vm, you can execute whichever commands you like in the vm
hi, oguz. i wish help me show use guest-agent config ip config
tks. just see example demo.
 
hi
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.
now we just no understand kvm promox how to use api config kvm ip v4 or v6
 
now we just no understand kvm promox how to use api config kvm ip v4 or v6
* you can use cloud-init
* or you can use guest-agent to execute the commands to set up network

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.

what do you need help with exactly?
 
* 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?
use api config ip demo
just this.
tks. and you check my code
Code:
$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"
All error
wish get help
 
Last edited:
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
 
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
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)
}
 

Attachments

  • QQ图片20191022155912.png
    QQ图片20191022155912.png
    6.1 KB · Views: 11
Last edited:
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)
}
help me check right? or api no support?
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!