Corsinvest / cv4pve-autosnap

Automatic snapshot tool for Proxmox VE
https://www.corsinvest.it/cv4pve
GNU General Public License v3.0
403 stars 50 forks source link

Problem connection! no tokenid specified #48

Closed plastilincheg closed 2 years ago

plastilincheg commented 3 years ago

Hello. Cannot create snapshot. What i do wrong?

root@proxmox:~# /usr/local/bin/cv4pve-autosnap --host=127.0.0.1 --api-token='cv4pve@pve!cv4pve' --timestamp-format=yyMMddss --vmid='1005' snap --label='-daily-' --keep=3 Problem connection! no tokenid specified

franklupo commented 3 years ago

Hi, the format of token is 'USER@REALM!TOKENID=UUID' You not specified the part '=UUID'

best regards

plastilincheg commented 3 years ago

What do you mean UUID? I cannot search this parameter.

franklupo commented 3 years ago

When you create the token in Proxmox VE only one flying UUID is shown in the window.

image

Secret is the UUID

https://pve.proxmox.com/pve-docs/chapter-pveum.html#pveum_tokens

franklupo commented 3 years ago

News?

plastilincheg commented 3 years ago

Authentication success but snapshot not create.

root@proxmox:~# /usr/local/bin/cv4pve-autosnap --host=127.0.0.1 --api-token='cv4pve@pve!xceJxrnRNXMC=9e7dfd28-bdcb-4184-9cdd-2e57abeb532a' --timestamp-format=yyMMddss --vmid='1008' snap --label='-test-' --keep=3

ACTION Snap VMs: 1008 Label: -test- Keep: 3 State: False Timeout: 30000 Timestamp format: yyMMddss Total execution 00:00:00.0430807

franklupo commented 3 years ago

Execute with --debug and attach output

best regards

plastilincheg commented 3 years ago

Method: GET, Url: https://127.0.0.1:8006/api2/json/version StatusCode: OK ReasonPhrase: OK IsSuccessStatusCode: True { "data": { "keyboard": "en-us", "repoid": "337d6701", "version": "6.4-4", "release": "6.4" } }

ACTION Snap VMs: 1008 Label: -test- Keep: 3 State: False Timeout: 30000 Timestamp format: yyMMddss Method: GET, Url: https://127.0.0.1:8006/api2/json/cluster/resources?type=vm StatusCode: OK ReasonPhrase: OK IsSuccessStatusCode: True { "data": [] }

Total execution 00:00:00.0508417

franklupo commented 3 years ago

What permissions have you given user you use?

plastilincheg commented 3 years ago

I add storage permission Administrator image

image

franklupo commented 3 years ago

Hi, add permssion in cluster, not in storage.

Best regards