Hi, friends.
I'm the Proxmox VE 5.2 user and would like to ask you about write-file QEmu agent request of VE API. Using the following command sequence to write a file on QEmu VM with the "system-test" snapshot created
I want to create 12345.txt file on the remote VM. Everything is fine, except the last command, which returns
And it's stated the agent/file-write command correct answer when it succeeded. But after the command succeeds there's no file 12345.txt on VM exists.
If you have used VE API please help me to understand how to manage the write-file QEmu agent requests.
I'm the Proxmox VE 5.2 user and would like to ask you about write-file QEmu agent request of VE API. Using the following command sequence to write a file on QEmu VM with the "system-test" snapshot created
Code:
$ robotLoginData=$(curl -k -d "username=$pveLogin@pve&password=$pvePassword" [https]://$pveHostPort/api2/json/access/ticket)
$ robotCSRFPreventionToken=$(echo $robotLoginData | jq -r '.data.CSRFPreventionToken')
$ robotTicket=$(echo $robotLoginData | jq -r '.data.ticket')
$ curl -k -b "PVEAuthCookie=$robotTicket" -H "CSRFPreventionToken: $robotCSRFPreventionToken" -X POST [https]://$pveHostPort/api2/json/nodes/$pveNode/qemu/$pveVm/snapshot/system-test/rollback
$ curl -k -b "PVEAuthCookie=$robotTicket" -H "CSRFPreventionToken: $robotCSRFPreventionToken" -d "content=12345" -d "file=12345.txt" -X POST [https]://$pveHostPort/api2/json/nodes/$pveNode/qemu/$pveVm/agent/file-write
Code:
{"data":null}
If you have used VE API please help me to understand how to manage the write-file QEmu agent requests.
Last edited: