[GH-ISSUE #84] Incomplete error handling (or lack of filtering) for "non-snapshottable" machines #79

Closed
opened 2026-02-26 17:44:19 +03:00 by kerem · 1 comment
Owner

Originally created by @meyergru on GitHub (Nov 29, 2023).
Original GitHub issue: https://github.com/Corsinvest/cv4pve-autosnap/issues/84

What happened?

I added a new VM, only to find that cv4pve snapshots caused consistent errors (Unhandled expections). The error output was indeed meaningless, it did neither contain the VMID which was the culprit nor the probable cause:

Unhandled exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at Corsinvest.ProxmoxVE.Api.Shared.Models.Vm.VmConfig.OnSerializedMethod(StreamingContext context)
   at InvokeStub_VmConfig.OnSerializedMethod(Object, Object, IntPtr*)
   at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
   --- End of inner exception stack trace ---
   at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at Newtonsoft.Json.Serialization.JsonContract.<>c__DisplayClass57_0.<CreateSerializationCallback>b__0(Object o, StreamingContext context)
   at Newtonsoft.Json.Serialization.JsonContract.InvokeOnDeserialized(Object o, StreamingContext context)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
   at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
   at Corsinvest.ProxmoxVE.Api.ResultExtension.ToModel[T](Result result)
   at Corsinvest.ProxmoxVE.Api.Extension.ModelsExtensionsAutoGen.Get(PveConfig item, Nullable`1 current, String snapshot)
   at Corsinvest.ProxmoxVE.AutoSnap.Api.Application.Snap(String vmIdsOrNames, String label, Int32 keep, Boolean state, Int64 timeout, String timestampFormat, Int32 maxPercentageStorage, Boolean onlyRuns)
   at Corsinvest.ProxmoxVE.AutoSnap.Commands.<>c__DisplayClass12_0.<<Snap>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Invocation.AnonymousCommandHandler.InvokeAsync(InvocationContext context)
   at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_0.<<BuildInvocationChain>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass17_0.<<UseParseErrorReporting>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass12_0.<<UseHelp>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass22_0.<<UseVersionOption>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass19_0.<<UseTypoCorrections>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseSuggestDirective>b__18_0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass16_0.<<UseParseDirective>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<RegisterWithDotnetSuggest>b__5_0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass8_0.<<UseExceptionHandler>b__0>d.MoveNext()

I was lucky to conclude it was the new machine which causes this. I often have similar intermittent failures where I cannot lay my hand on what the reason could be. The side-effect is that all machines after the culprit are not snapshotted any more.

The reason for this is that the VM in question has a passthrough disk attached, thus it cannot be snapshotted. The "snapshot" section of the PVE manager says: "The current guest configuration does not support taking new snapshots". I wonder if this can be seen through the API.

Expected behavior

At least, this (and similar) condition(s) should be detected and a warning should be given, skipping to the next machine. If possible, an implicit or explicit filtering condition like with "--only-running" should be applied to skip such VMs / LXCs if --vmid="all" is specified.

Relevant log output

dbug: Corsinvest.ProxmoxVE.Api.PveClientBase[0]
      Method: GET, Url: https://127.0.0.1:8006/api2/json/version
dbug: Corsinvest.ProxmoxVE.Api.PveClientBase[0]
      StatusCode:          OK
      ReasonPhrase:        OK
      IsSuccessStatusCode: True
trce: Corsinvest.ProxmoxVE.Api.PveClientBase[0]
      {
        "data": {
          "console": "html5",
          "release": "8.1",
          "version": "8.1.3",
          "repoid": "b46aac3b42da5d15"
        }
      }
dbug: Corsinvest.ProxmoxVE.Api.PveClientBase[0]
      Method: GET, Url: https://127.0.0.1:8006/api2/json/version
dbug: Corsinvest.ProxmoxVE.Api.PveClientBase[0]
      StatusCode:          OK
      ReasonPhrase:        OK
      IsSuccessStatusCode: True
trce: Corsinvest.ProxmoxVE.Api.PveClientBase[0]
      {
        "data": {
          "repoid": "b46aac3b42da5d15",
          "version": "8.1.3",
          "release": "8.1",
          "console": "html5"
        }
      }
ACTION Snap
PVE Version:      8.1.3
VMs:              all
Label:            hourly
Keep:             23
State:            False
Only running:     False
Timeout:          30 sec.
Timestamp format: yyMMddHHmmss
Max % Storage :   95%
dbug: Corsinvest.ProxmoxVE.Api.PveClientBase[0]
      Method: GET, Url: https://127.0.0.1:8006/api2/json/cluster/resources?type=vm
dbug: Corsinvest.ProxmoxVE.Api.PveClientBase[0]
      StatusCode:          OK
      ReasonPhrase:        OK
      IsSuccessStatusCode: True
trce: Corsinvest.ProxmoxVE.Api.PveClientBase[0]
      {
          {
            "netout": 65383814,
            "diskwrite": 3055362560,
            "disk": 0,
            "name": "homer",
            "netin": 232922850,
            "uptime": 52493,
            "tags": "iot",
            "status": "running",
            "maxdisk": 34359738368,
            "type": "qemu",
            "maxmem": 4294967296,
            "mem": 1710219264,
            "cpu": 0.0608018692063652,
            "maxcpu": 2,
            "vmid": 260,
            "node": "baremetal",
            "diskread": 758206464,
            "id": "qemu/260",
            "template": 0
          },
          {
            "name": "tinrig",
            "disk": 0,
            "netout": 6211010,
            "diskwrite": 2863886336,
            "netin": 83200292,
            "uptime": 8860,
            "status": "running",
            "mem": 4085866768,
            "maxcpu": 8,
            "cpu": 0.00798668620931068,
            "vmid": 304,
            "node": "baremetal",
            "maxdisk": 2000398934016,
            "type": "qemu",
            "maxmem": 17179869184,
            "id": "qemu/304",
            "template": 0,
            "diskread": 542693594
          }
        ]
      }
dbug: Corsinvest.ProxmoxVE.Api.PveClientBase[0]
      Method: GET, Url: https://127.0.0.1:8006/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": [
          {
            "maxdisk": 1832108720128,
            "type": "storage",
            "plugintype": "zfspool",
            "shared": 0,
            "disk": 712423665664,
            "node": "baremetal",
            "content": "rootdir,images",
            "storage": "local-zfs",
            "status": "available",
            "id": "storage/baremetal/local-zfs"
          },
          {
            "storage": "local",
            "status": "available",
            "id": "storage/baremetal/local",
            "maxdisk": 1125874663424,
            "type": "storage",
            "plugintype": "dir",
            "disk": 6189613056,
            "shared": 0,
            "content": "backup,iso,vztmpl",
            "node": "baremetal"
          }
        ]
      }
                  Storage      Type     Valid   Used %    Disk Size  Disk Usage
      baremetal/local-zfs   zfspool        Ok      38.9     1.67 TB    663.5 GB
----- VM 304 qemu running -----
dbug: Corsinvest.ProxmoxVE.Api.PveClientBase[0]
      Method: GET, Url: https://127.0.0.1:8006/api2/json/nodes/baremetal/qemu/304/config
dbug: Corsinvest.ProxmoxVE.Api.PveClientBase[0]
      StatusCode:          OK
      ReasonPhrase:        OK
      IsSuccessStatusCode: True
trce: Corsinvest.ProxmoxVE.Api.PveClientBase[0]
      {
        "data": {
          "name": "tinrig",
          "sockets": 1,
          "scsihw": "virtio-scsi-single",
          "smbios1": "uuid=58abc0d9-8011-49e2-a0d0-e0fa49f6f7ed",
          "cores": 8,
          "net0": "virtio=BC:24:11:FF:FF:FF,bridge=vmbr0,firewall=1",
          "ostype": "l26",
          "bios": "ovmf",
          "ide2": "backup:iso/proxmox-ve_8.1-1.iso,media=cdrom,size=1262310K",
          "vmgenid": "9dc820ad-b10f-4494-bd0f-896f4bad6fd2",
          "digest": "d0c440da82927aa894a2960e46d7074e4d1a6984",
          "efidisk0": "local-zfs:vm-304-disk-0,efitype=4m,size=1M",
          "scsi0": "/dev/disk/by-id/ata-Samsung_SSD_860_EVO_2TB_S24525235325L,size=1953514584K",
          "cpu": "host",
          "numa": 0,
          "memory": "16384",
          "meta": "creation-qemu=8.1.2,ctime=1701180842",
          "boot": "order=scsi0;ide2;net0",
          "balloon": 0
        }
      }
Unhandled exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at Corsinvest.ProxmoxVE.Api.Shared.Models.Vm.VmConfig.OnSerializedMethod(StreamingContext context)
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
   --- End of inner exception stack trace ---
   at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at Newtonsoft.Json.Serialization.JsonContract.<>c__DisplayClass57_0.<CreateSerializationCallback>b__0(Object o, StreamingContext context)
   at Newtonsoft.Json.Serialization.JsonContract.InvokeOnDeserialized(Object o, StreamingContext context)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.OnDeserialized(JsonReader reader, JsonContract contract, Object value)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
   at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
   at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2)
   at Corsinvest.ProxmoxVE.Api.ResultExtension.ToModel[T](Result result)
   at Corsinvest.ProxmoxVE.Api.Extension.ModelsExtensionsAutoGen.Get(PveConfig item, Nullable`1 current, String snapshot)
   at Corsinvest.ProxmoxVE.AutoSnap.Api.Application.Snap(String vmIdsOrNames, String label, Int32 keep, Boolean state, Int64 timeout, String timestampFormat, Int32 maxPercentageStorage, Boolean onlyRuns)
   at Corsinvest.ProxmoxVE.AutoSnap.Commands.<>c__DisplayClass12_0.<<Snap>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Invocation.AnonymousCommandHandler.InvokeAsync(InvocationContext context)
   at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_0.<<BuildInvocationChain>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass17_0.<<UseParseErrorReporting>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass12_0.<<UseHelp>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass22_0.<<UseVersionOption>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass19_0.<<UseTypoCorrections>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseSuggestDirective>b__18_0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass16_0.<<UseParseDirective>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<RegisterWithDotnetSuggest>b__5_0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass8_0.<<UseExceptionHandler>b__0>d.MoveNext()

Proxmox VE Version

8.1.3

Version (bug)

1.14.8

Version (working)

On what operating system are you experiencing the issue?

Linux

Pull Request

  • I would like to do a Pull Request
Originally created by @meyergru on GitHub (Nov 29, 2023). Original GitHub issue: https://github.com/Corsinvest/cv4pve-autosnap/issues/84 ### What happened? I added a new VM, only to find that cv4pve snapshots caused consistent errors (Unhandled expections). The error output was indeed meaningless, it did neither contain the VMID which was the culprit nor the probable cause: ``` Unhandled exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IndexOutOfRangeException: Index was outside the bounds of the array. at Corsinvest.ProxmoxVE.Api.Shared.Models.Vm.VmConfig.OnSerializedMethod(StreamingContext context) at InvokeStub_VmConfig.OnSerializedMethod(Object, Object, IntPtr*) at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr) --- End of inner exception stack trace --- at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at Newtonsoft.Json.Serialization.JsonContract.<>c__DisplayClass57_0.<CreateSerializationCallback>b__0(Object o, StreamingContext context) at Newtonsoft.Json.Serialization.JsonContract.InvokeOnDeserialized(Object o, StreamingContext context) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType) at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings) at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings) at Corsinvest.ProxmoxVE.Api.ResultExtension.ToModel[T](Result result) at Corsinvest.ProxmoxVE.Api.Extension.ModelsExtensionsAutoGen.Get(PveConfig item, Nullable`1 current, String snapshot) at Corsinvest.ProxmoxVE.AutoSnap.Api.Application.Snap(String vmIdsOrNames, String label, Int32 keep, Boolean state, Int64 timeout, String timestampFormat, Int32 maxPercentageStorage, Boolean onlyRuns) at Corsinvest.ProxmoxVE.AutoSnap.Commands.<>c__DisplayClass12_0.<<Snap>b__0>d.MoveNext() --- End of stack trace from previous location --- at System.CommandLine.Invocation.AnonymousCommandHandler.InvokeAsync(InvocationContext context) at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_0.<<BuildInvocationChain>b__0>d.MoveNext() --- End of stack trace from previous location --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass17_0.<<UseParseErrorReporting>b__0>d.MoveNext() --- End of stack trace from previous location --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass12_0.<<UseHelp>b__0>d.MoveNext() --- End of stack trace from previous location --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass22_0.<<UseVersionOption>b__0>d.MoveNext() --- End of stack trace from previous location --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass19_0.<<UseTypoCorrections>b__0>d.MoveNext() --- End of stack trace from previous location --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseSuggestDirective>b__18_0>d.MoveNext() --- End of stack trace from previous location --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass16_0.<<UseParseDirective>b__0>d.MoveNext() --- End of stack trace from previous location --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<RegisterWithDotnetSuggest>b__5_0>d.MoveNext() --- End of stack trace from previous location --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass8_0.<<UseExceptionHandler>b__0>d.MoveNext() ``` I was lucky to conclude it was the new machine which causes this. I often have similar intermittent failures where I cannot lay my hand on what the reason could be. The side-effect is that all machines after the culprit are not snapshotted any more. The reason for this is that the VM in question has a passthrough disk attached, thus it cannot be snapshotted. The "snapshot" section of the PVE manager says: "The current guest configuration does not support taking new snapshots". I wonder if this can be seen through the API. ### Expected behavior At least, this (and similar) condition(s) should be detected and a warning should be given, skipping to the next machine. If possible, an implicit or explicit filtering condition like with "--only-running" should be applied to skip such VMs / LXCs if --vmid="all" is specified. ### Relevant log output ```shell dbug: Corsinvest.ProxmoxVE.Api.PveClientBase[0] Method: GET, Url: https://127.0.0.1:8006/api2/json/version dbug: Corsinvest.ProxmoxVE.Api.PveClientBase[0] StatusCode: OK ReasonPhrase: OK IsSuccessStatusCode: True trce: Corsinvest.ProxmoxVE.Api.PveClientBase[0] { "data": { "console": "html5", "release": "8.1", "version": "8.1.3", "repoid": "b46aac3b42da5d15" } } dbug: Corsinvest.ProxmoxVE.Api.PveClientBase[0] Method: GET, Url: https://127.0.0.1:8006/api2/json/version dbug: Corsinvest.ProxmoxVE.Api.PveClientBase[0] StatusCode: OK ReasonPhrase: OK IsSuccessStatusCode: True trce: Corsinvest.ProxmoxVE.Api.PveClientBase[0] { "data": { "repoid": "b46aac3b42da5d15", "version": "8.1.3", "release": "8.1", "console": "html5" } } ACTION Snap PVE Version: 8.1.3 VMs: all Label: hourly Keep: 23 State: False Only running: False Timeout: 30 sec. Timestamp format: yyMMddHHmmss Max % Storage : 95% dbug: Corsinvest.ProxmoxVE.Api.PveClientBase[0] Method: GET, Url: https://127.0.0.1:8006/api2/json/cluster/resources?type=vm dbug: Corsinvest.ProxmoxVE.Api.PveClientBase[0] StatusCode: OK ReasonPhrase: OK IsSuccessStatusCode: True trce: Corsinvest.ProxmoxVE.Api.PveClientBase[0] { { "netout": 65383814, "diskwrite": 3055362560, "disk": 0, "name": "homer", "netin": 232922850, "uptime": 52493, "tags": "iot", "status": "running", "maxdisk": 34359738368, "type": "qemu", "maxmem": 4294967296, "mem": 1710219264, "cpu": 0.0608018692063652, "maxcpu": 2, "vmid": 260, "node": "baremetal", "diskread": 758206464, "id": "qemu/260", "template": 0 }, { "name": "tinrig", "disk": 0, "netout": 6211010, "diskwrite": 2863886336, "netin": 83200292, "uptime": 8860, "status": "running", "mem": 4085866768, "maxcpu": 8, "cpu": 0.00798668620931068, "vmid": 304, "node": "baremetal", "maxdisk": 2000398934016, "type": "qemu", "maxmem": 17179869184, "id": "qemu/304", "template": 0, "diskread": 542693594 } ] } dbug: Corsinvest.ProxmoxVE.Api.PveClientBase[0] Method: GET, Url: https://127.0.0.1:8006/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": [ { "maxdisk": 1832108720128, "type": "storage", "plugintype": "zfspool", "shared": 0, "disk": 712423665664, "node": "baremetal", "content": "rootdir,images", "storage": "local-zfs", "status": "available", "id": "storage/baremetal/local-zfs" }, { "storage": "local", "status": "available", "id": "storage/baremetal/local", "maxdisk": 1125874663424, "type": "storage", "plugintype": "dir", "disk": 6189613056, "shared": 0, "content": "backup,iso,vztmpl", "node": "baremetal" } ] } Storage Type Valid Used % Disk Size Disk Usage baremetal/local-zfs zfspool Ok 38.9 1.67 TB 663.5 GB ----- VM 304 qemu running ----- dbug: Corsinvest.ProxmoxVE.Api.PveClientBase[0] Method: GET, Url: https://127.0.0.1:8006/api2/json/nodes/baremetal/qemu/304/config dbug: Corsinvest.ProxmoxVE.Api.PveClientBase[0] StatusCode: OK ReasonPhrase: OK IsSuccessStatusCode: True trce: Corsinvest.ProxmoxVE.Api.PveClientBase[0] { "data": { "name": "tinrig", "sockets": 1, "scsihw": "virtio-scsi-single", "smbios1": "uuid=58abc0d9-8011-49e2-a0d0-e0fa49f6f7ed", "cores": 8, "net0": "virtio=BC:24:11:FF:FF:FF,bridge=vmbr0,firewall=1", "ostype": "l26", "bios": "ovmf", "ide2": "backup:iso/proxmox-ve_8.1-1.iso,media=cdrom,size=1262310K", "vmgenid": "9dc820ad-b10f-4494-bd0f-896f4bad6fd2", "digest": "d0c440da82927aa894a2960e46d7074e4d1a6984", "efidisk0": "local-zfs:vm-304-disk-0,efitype=4m,size=1M", "scsi0": "/dev/disk/by-id/ata-Samsung_SSD_860_EVO_2TB_S24525235325L,size=1953514584K", "cpu": "host", "numa": 0, "memory": "16384", "meta": "creation-qemu=8.1.2,ctime=1701180842", "boot": "order=scsi0;ide2;net0", "balloon": 0 } } Unhandled exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IndexOutOfRangeException: Index was outside the bounds of the array. at Corsinvest.ProxmoxVE.Api.Shared.Models.Vm.VmConfig.OnSerializedMethod(StreamingContext context) at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor) at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr) --- End of inner exception stack trace --- at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at Newtonsoft.Json.Serialization.JsonContract.<>c__DisplayClass57_0.<CreateSerializationCallback>b__0(Object o, StreamingContext context) at Newtonsoft.Json.Serialization.JsonContract.InvokeOnDeserialized(Object o, StreamingContext context) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.OnDeserialized(JsonReader reader, JsonContract contract, Object value) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType) at Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType) at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings) at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings) at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2) at Corsinvest.ProxmoxVE.Api.ResultExtension.ToModel[T](Result result) at Corsinvest.ProxmoxVE.Api.Extension.ModelsExtensionsAutoGen.Get(PveConfig item, Nullable`1 current, String snapshot) at Corsinvest.ProxmoxVE.AutoSnap.Api.Application.Snap(String vmIdsOrNames, String label, Int32 keep, Boolean state, Int64 timeout, String timestampFormat, Int32 maxPercentageStorage, Boolean onlyRuns) at Corsinvest.ProxmoxVE.AutoSnap.Commands.<>c__DisplayClass12_0.<<Snap>b__0>d.MoveNext() --- End of stack trace from previous location --- at System.CommandLine.Invocation.AnonymousCommandHandler.InvokeAsync(InvocationContext context) at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_0.<<BuildInvocationChain>b__0>d.MoveNext() --- End of stack trace from previous location --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass17_0.<<UseParseErrorReporting>b__0>d.MoveNext() --- End of stack trace from previous location --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass12_0.<<UseHelp>b__0>d.MoveNext() --- End of stack trace from previous location --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass22_0.<<UseVersionOption>b__0>d.MoveNext() --- End of stack trace from previous location --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass19_0.<<UseTypoCorrections>b__0>d.MoveNext() --- End of stack trace from previous location --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseSuggestDirective>b__18_0>d.MoveNext() --- End of stack trace from previous location --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass16_0.<<UseParseDirective>b__0>d.MoveNext() --- End of stack trace from previous location --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<RegisterWithDotnetSuggest>b__5_0>d.MoveNext() --- End of stack trace from previous location --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass8_0.<<UseExceptionHandler>b__0>d.MoveNext() ``` ### Proxmox VE Version 8.1.3 ### Version (bug) 1.14.8 ### Version (working) - ### On what operating system are you experiencing the issue? Linux ### Pull Request - [ ] I would like to do a Pull Request
kerem 2026-02-26 17:44:19 +03:00
Author
Owner

@franklupo commented on GitHub (Apr 17, 2024):

Fix in the next release.

<!-- gh-comment-id:2061348977 --> @franklupo commented on GitHub (Apr 17, 2024): Fix in the next release.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cv4pve-autosnap#79
No description provided.