Here is the identity & permissions I have setup.
When I run the following:
I get the following returned error:
{
"message": "Permission check failed (/storage/backup-nfs, Datastore.Allocate)\n",
"data": null
}
I am not sure what more permissions I need to give? I am trying to keep the permissions as tight as I can. Any insight would be appreciated.
Code:
pveum user add foundry@pve --password "<redacted>" --email "admin@foundryserver.com"
pveum user token add foundry@pve foundryApi --comment "API token for Foundry VM management"
pveum role add FoundryApiRole --privs "VM.Allocate,VM.Audit,VM.Backup,VM.Clone,VM.Config.Disk,VM.Config.CPU,VM.Config.Memory,VM.Config.Network,VM.Config.Options,VM.PowerMgmt,Datastore.Audit,Sys.Audit,Datastore.AllocateSpace,Datastore.Allocate,Datastore.AllocateTemplate"
pveum acl modify / --user foundry@pve --role FoundryApiRole
When I run the following:
Code:
const axios = require('axios');
let data = JSON.stringify({
"vmid": "2222",
"mode": "snapshot",
"compress": "zstd",
"storage": "backup-nfs",
"prune-backups": "keep-last=2",
"remove": "1",
"notes-template": "{{guestname}}-{{node}}-{{vmid}}"
});
let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://spare1.mgmt.local:8006/api2/json/nodes/temppve/vzdump',
headers: {
'Authorization': 'PVEAPIToken=foundry@pve!foundryApi=<redacted>',
'Content-Type': 'application/json'
},
data : data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
I get the following returned error:
{
"message": "Permission check failed (/storage/backup-nfs, Datastore.Allocate)\n",
"data": null
}
I am not sure what more permissions I need to give? I am trying to keep the permissions as tight as I can. Any insight would be appreciated.