mirror of
https://github.com/Corsinvest/cv4pve-autosnap.git
synced 2026-04-26 09:25:48 +03:00
[GH-ISSUE #57] Error on fresh install #54
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/cv4pve-autosnap#54
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @sgtpepperaut on GitHub (Dec 23, 2021).
Original GitHub issue: https://github.com/Corsinvest/cv4pve-autosnap/issues/57
What happened?
running a simple one liner on a fresh install gives me an error on proxmox 7.1-7
/usr/local/bin/cv4pve-autosnap --host=127.0.0.1 --username="snapshot@pve" --password="MYPASS" --vmid=5020 snap --label="daily" --keep=6
Expected behavior
create a snapshot :)
Relevant log output
Proxmox VE Version
7.1-7
Version (bug)
1.13.2
Version (working)
No response
On what operating system are you experiencing the issue?
Linux
Pull Request
@franklupo commented on GitHub (Dec 23, 2021):
Hi,
can you run with the --debug option and attach the result?
Remember to remove the password information from the registry.
Best regards
@sgtpepperaut commented on GitHub (Dec 23, 2021):
here is the output:
``root@srv1:/usr/local/bin# /usr/local/bin/cv4pve-autosnap --host=127.0.0.1 --username="snapshot@pve" --password="mypass" --vmid=5020 snap --label="daily" --keep=6 --debug
Method: POST, Url: https://127.0.0.1:8006/api2/json/access/ticket
Parameters:
password : mypass
username : snapshot
realm : pve
StatusCode: OK
ReasonPhrase: OK
IsSuccessStatusCode: True
{
"data": {
"CSRFPreventionToken": "61C44923:83IcfAEX0xLSEtgC3l1FPctsp86ts9L+6ooBlGWEaEE",
"cap": {
"nodes": {},
"dc": {},
"storage": {},
"access": {},
"vms": {
"VM.Snapshot": 1,
"VM.Audit": 1,
"VM.Snapshot.Rollback": 1
},
"sdn": {}
},
"username": "snapshot@pve",
"ticket": "PVE:snapshot@pve:61C44923::jTuYiasr0R6RoUyC0KpLDpN8Ydk9C+4D3yvfIs8AcfQzUGijoPRc0PqjGrqvGwL6f1TTpOeYNlLzJqHsrPIpt+dAGory2EjgnE5R46t9M9PNL1ccKp5XadcbhWribicc4JPQMvUU9HqEhrl80apkMLiuTgdg9VdBmLVM/+kKY98/soMsBMaaVhssE3Tnj8L4233XiutgV6HUfdfInX/AeaLVWURrWGJZMo/WhvZrbio3lgN34IQmfEoul8eUrZdYAcYewiSP8gNUu3sUDq75hz5kt3FLxWOg3LjfWVIdAEgS/IM7kchxRUZ7dO0Gf2Gz1N7JZHxv/iq+i7355CskTw=="
}
}
ACTION Snap
VMs: 5020
Label: daily
Keep: 6
State: False
Timeout: 30000
Timestamp format: yyMMddHHmmss
Max % Storage : 95%
Method: GET, Url: https://127.0.0.1:8006/api2/json/cluster/resources?type=vm
StatusCode: OK
ReasonPhrase: OK
IsSuccessStatusCode: True
{
"data": [
{
"name": "ano-pfsense",
"netin": 20613081521,
"diskwrite": 30332746240,
"netout": 13493524657,
"type": "qemu",
"mem": 1365996020,
"template": 0,
"vmid": 5001,
"diskread": 176566742,
"node": "srv1",
"cpu": 0.00590965218071446,
"maxcpu": 4,
"id": "qemu/5001",
"status": "running",
"disk": 0,
"maxmem": 4194304000,
"maxdisk": 6442450944,
"uptime": 1452533
},
etc more vms...
]
}
Method: GET, Url: https://127.0.0.1:8006/api2/json/cluster/resources?type=storage
StatusCode: OK
ReasonPhrase: OK
IsSuccessStatusCode: True
{
"data": []
}
================ EXCEPTION ================
System.IndexOutOfRangeException
Index was outside the bounds of the array.
at BetterConsoleTables.Table.ToString(Int32[] columnLengths)
at BetterConsoleTables.Table.ToString()
at Corsinvest.ProxmoxVE.Api.Extension.Helpers.TableHelper.Create(IEnumerable
1 columns, IEnumerable1 rows, TableOutputType outputType, Boolean hasInnerRows)at Corsinvest.ProxmoxVE.Api.Extension.Helpers.TableHelper.Create(IEnumerable
1 columns, IEnumerable1 rows, TableOutputType outputType, Boolean hasInnerRows)at Corsinvest.ProxmoxVE.AutoSnap.Api.Application.Snap(String vmIdsOrNames, String label, Int32 keep, Boolean state, Int64 timeout, String timestampFormat, Int32 optMaxPercentageStorage)
at Corsinvest.ProxmoxVE.AutoSnap.ShellCommands.<>c__DisplayClass9_1.b__1()
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.<>c__DisplayClass144_0.b__0(CancellationToken _)
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.ExecuteAsync(String[] args, CancellationToken cancellationToken)
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.Execute(String[] args)
at Corsinvest.ProxmoxVE.Api.Shell.Helpers.ShellHelper.ExecuteConsoleApp(CommandLineApplication app, String[] args)
================ EXCEPTION ================
System.IndexOutOfRangeException
Index was outside the bounds of the array.
at BetterConsoleTables.Table.ToString(Int32[] columnLengths)
at BetterConsoleTables.Table.ToString()
at Corsinvest.ProxmoxVE.Api.Extension.Helpers.TableHelper.Create(IEnumerable
1 columns, IEnumerable1 rows, TableOutputType outputType, Boolean hasInnerRows)at Corsinvest.ProxmoxVE.Api.Extension.Helpers.TableHelper.Create(IEnumerable
1 columns, IEnumerable1 rows, TableOutputType outputType, Boolean hasInnerRows)at Corsinvest.ProxmoxVE.AutoSnap.Api.Application.Snap(String vmIdsOrNames, String label, Int32 keep, Boolean state, Int64 timeout, String timestampFormat, Int32 optMaxPercentageStorage)
at Corsinvest.ProxmoxVE.AutoSnap.ShellCommands.<>c__DisplayClass9_1.b__1()
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.<>c__DisplayClass144_0.b__0(CancellationToken _)
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.ExecuteAsync(String[] args, CancellationToken cancellationToken)
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.Execute(String[] args)
at Corsinvest.ProxmoxVE.Api.Shell.Helpers.ShellHelper.ExecuteConsoleApp(CommandLineApplication app, String[] args)``
@franklupo commented on GitHub (Dec 24, 2021):
Permission problem read documentation
@bwmravec commented on GitHub (Dec 27, 2021):
Your user snapshot@pve doesn't have access to storage where you are storing snapshots. Simply add this user with permissions "Datastore.Audit Pool.Audit VM.Audit VM.Snapshot" also to your storage, not only to VM 5020.
@thunfischbrot commented on GitHub (Jan 2, 2022):
The error message could provide a hint to the permission problem. This might also save you from answering these questions in the future :-)
@franklupo commented on GitHub (Jan 4, 2022):
Fix in new version