Closed JosemirLujambio closed 2 years ago
Hi, which version do you use autosnap?
best regards
Hello frank, version 1.13.3
download latest version https://github.com/Corsinvest/cv4pve-autosnap/releases/tag/v1.14.5
i updated as suggfested and now i get different error:
root@server:~# cv4pve-autosnap --host=10.20.20.5 --username=snapuser@pam --password='password' --vmid=101 snap --label=test --state --keep=1 --debug dbug: Corsinvest.ProxmoxVE.Api.PveClientBase[0] Login: snapuser@pam dbug: Corsinvest.ProxmoxVE.Api.PveClientBase[0] Method: POST, Url: https://10.20.20.5/api2/json/access/ticket dbug: Corsinvest.ProxmoxVE.Api.PveClientBase[0] Parameters: password : password username : snapuser realm : pam dbug: Corsinvest.ProxmoxVE.Api.PveClientBase[0] StatusCode: OK ReasonPhrase: OK IsSuccessStatusCode: True trce: Corsinvest.ProxmoxVE.Api.PveClientBase[0] { "data": { "cap": { "access": {}, "sdn": {}, "storage": { "Datastore.Allocate": 1, "Datastore.AllocateSpace": 1, "Datastore.Audit": 1 }, "vms": { "VM.Config.CDROM": 1, "VM.Audit": 1, "VM.Monitor": 1, "VM.PowerMgmt": 1, "VM.Console": 1, "VM.Backup": 1, "VM.Snapshot": 1 }, "nodes": { "Sys.Console": 1, "Sys.Audit": 1 }, "dc": { "Sys.Audit": 1 } }, "CSRFPreventionToken": "631A11AA:ThLFxiIQxgJXTso6LTiU6kaajrISDCFgN13BV4XFkdc", "username": "snapuser@pam", "ticket": "PVE:snapuser@pam:631A11AA::TQJkih65skDYE8bmVpnNX8sf/kIGGEkKs17c6YQfHGRiPVZh8/ogAZ5OsfMbrJddXkmEJLq51N3/v0Ae7b3HHb/HZPeGCAyD3VwNINpSQJtslfketPbZ/s+drO8XDPjsQNKxUXXXtg/0UuJxhg8h99BrlKNvaBew6B5bVbC2HWOvMf2BMi3HqYOg/PHHdGVlaZohEpM7Kt7xvugkf0l1t06GYQq2UyMQ1m4gdZBoWfkWKyZc/X7oADwaeYPqfr3qf0ChLTsqF9uQNwb0JLoE73WO3jJdNFpwNrsAOJ6pH+p2sj+9ufKjcU8qUuYF3J1qxirlQa0kqDS6QvvgOasMKg==" } } dbug: Corsinvest.ProxmoxVE.Api.PveClientBase[0] Method: GET, Url: https://10.20.20.5/api2/json/version dbug: Corsinvest.ProxmoxVE.Api.PveClientBase[0] StatusCode: OK ReasonPhrase: OK IsSuccessStatusCode: True trce: Corsinvest.ProxmoxVE.Api.PveClientBase[0] { "data": { "repoid": "b287dd27", "release": "6.2", "version": "6.2-12", "keyboard": "en-us" } } ACTION Snap PVE Version: 6.2-12 VMs: 101 Label: test Keep: 1 State: True Timeout: 30 sec. Timestamp format: yyMMddHHmmss Max % Storage : 95% dbug: Corsinvest.ProxmoxVE.Api.PveClientBase[0] Method: GET, Url: https://10.20.20.5/api2/json/cluster/resources?type=vm dbug: Corsinvest.ProxmoxVE.Api.PveClientBase[0] StatusCode: OK ReasonPhrase: OK IsSuccessStatusCode: True trce: Corsinvest.ProxmoxVE.Api.PveClientBase[0] { "data": [ { "maxdisk": 53687091200, "diskread": 84833408000, "diskwrite": 64613082112, "netout": 4482401755, "disk": 0, "maxmem": 8589934592, "node": "xxx-svr", "uptime": 1907381, "template": 0, "type": "qemu", "status": "running", "vmid": 101, "netin": 16869972435, "maxcpu": 4, "cpu": 0.0662405251201612, "name": "xxx-s01", "mem": 4746559488, "id": "qemu/101" }, { "mem": 3728905198, "name": "xxx-s03", "id": "qemu/103", "maxcpu": 2, "netin": 2750590231, "cpu": 0.137858509844173, "vmid": 103, "template": 0, "type": "qemu", "status": "running", "uptime": 1907503, "node": "xxx-svr", "maxmem": 4294967296, "disk": 0, "netout": 8286949343, "diskwrite": 31386835968, "diskread": 76584864768, "maxdisk": 54760833024 } ] } dbug: Corsinvest.ProxmoxVE.Api.PveClientBase[0] Method: GET, Url: https://10.20.20.5/api2/json/cluster/resources?type=storage dbug: Corsinvest.ProxmoxVE.Api.PveClientBase[0] StatusCode: OK ReasonPhrase: OK IsSuccessStatusCode: True trce: Corsinvest.ProxmoxVE.Api.PveClientBase[0] { "data": [ { "shared": 0, "id": "storage/xxx-svr/local-lvm", "status": "available", "type": "storage", "storage": "local-lvm", "node": "xxx-svr", "disk": 663753966642, "maxdisk": 1836618612736 }, { "shared": 0, "id": "storage/xxx-svr/local", "type": "storage", "status": "available", "storage": "local", "node": "xxx-svr", "maxdisk": 100924641280, "disk": 15426510848 } ] } Unhandled exception: System.NullReferenceException: Object reference not set to an instance of an object. at Corsinvest.ProxmoxVE.AutoSnap.Api.Application.<>cDisplayClass23_0.
b1(IClusterResourceStorage a) at System.Linq.Enumerable.WhereEnumerableIterator 0>d.MoveNext() --- End of stack trace from previous location --- at System.CommandLine.Invocation.AnonymousCommandHandler.InvokeAsync(InvocationContext context) at System.CommandLine.Invocation.InvocationPipeline.<>cDisplayClass4_0.<1.ToArray() at System.Linq.Buffer
1..ctor(IEnumerable1 source) at System.Linq.OrderedEnumerable
1.GetEnumerator()+MoveNext() at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source) at Corsinvest.ProxmoxVE.AutoSnap.Api.Application.Snap(String vmIdsOrNames, String label, Int32 keep, Boolean state, Int64 timeout, String timestampFormat, Int32 maxPercentageStorage) at Corsinvest.ProxmoxVE.AutoSnap.Commands.<>cDisplayClass12_0.<b b0>d.MoveNext() --- End of stack trace from previous location --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>cDisplayClass18_0.< 0>d.MoveNext() --- End of stack trace from previous location --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>cDisplayClass13_0.<b b0>d.MoveNext() --- End of stack trace from previous location --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>cDisplayClass22_0.< 0>d.MoveNext() --- End of stack trace from previous location --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>cDisplayClass20_0.<b b0>d.MoveNext() --- End of stack trace from previous location --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.< DisplayClass17_0.<b 19_0>d.MoveNext() --- End of stack trace from previous location --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>cb0>d.MoveNext() --- End of stack trace from previous location --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.< b 6_0>d.MoveNext() --- End of stack trace from previous location --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass9_0.<b__0>d.MoveNext()
what version is it? 6.2????
what version is it? 6.2????
Yes, 6.2-12
You can run the command on the host and attach the result?
pvesh get /cluster/resources -type=storage --output-format json-pretty
best regards
ok:
root@xxx-svr:~# pvesh get /cluster/resources -type=storage --output-format json- pretty [ { "disk" : 665223261532, "id" : "storage/xxx-svr/local-lvm", "maxdisk" : 1836618612736, "node" : "xxx-svr", "shared" : 0, "status" : "available", "storage" : "local-lvm", "type" : "storage" }, { "disk" : 15439167488, "id" : "storage/xxx-svr/local", "maxdisk" : 100924641280, "node" : "xxx-svr", "shared" : 0, "status" : "available", "storage" : "local", "type" : "storage" } ]
ok, in 6.4-13 the json has a new item "content". This i for check the space sotrage.
I think a solutions
Hello. thanx in advance for your help and for making this extraordinary tool. I am getting an error when snapping on proxmox 6.2. have 5 servers with this version and all of them fails with the same error. Snapping on proxmox 7.2 works fine.