diff --git a/src/PSProxmoxVE.Core/Services/VmService.cs b/src/PSProxmoxVE.Core/Services/VmService.cs index ff6a47e..412e1ab 100644 --- a/src/PSProxmoxVE.Core/Services/VmService.cs +++ b/src/PSProxmoxVE.Core/Services/VmService.cs @@ -550,7 +550,7 @@ namespace PSProxmoxVE.Core.Services client.PostAsync($"nodes/{Uri.EscapeDataString(node)}/qemu/{vmid}/agent/ping").GetAwaiter().GetResult(); return true; } - catch + catch (Exception ex) when (ex is not OutOfMemoryException and not StackOverflowException) { return false; } diff --git a/src/PSProxmoxVE/Cmdlets/Vms/ImportPveOvaCmdlet.cs b/src/PSProxmoxVE/Cmdlets/Vms/ImportPveOvaCmdlet.cs index a834c66..dd00cee 100644 --- a/src/PSProxmoxVE/Cmdlets/Vms/ImportPveOvaCmdlet.cs +++ b/src/PSProxmoxVE/Cmdlets/Vms/ImportPveOvaCmdlet.cs @@ -274,9 +274,10 @@ namespace PSProxmoxVE.Cmdlets.Vms var vm = vmService.GetVm(session, Node, vmId); WriteObject(vm); } - catch + catch (Exception ex) when (ex is not OutOfMemoryException and not StackOverflowException) { // If the VM isn't queryable yet (e.g. disk import still running), return basic info + WriteVerbose($"VM retrieval failed, returning basic info: {ex.Message}"); WriteObject(new PveVm { VmId = vmId, diff --git a/src/PSProxmoxVE/PSProxmoxVE.format.ps1xml b/src/PSProxmoxVE/PSProxmoxVE.format.ps1xml index 39d60c8..9cbb8a5 100644 --- a/src/PSProxmoxVE/PSProxmoxVE.format.ps1xml +++ b/src/PSProxmoxVE/PSProxmoxVE.format.ps1xml @@ -1356,5 +1356,64 @@ + + + + PSProxmoxVE.Core.Authentication.PveSession + + PSProxmoxVE.Core.Authentication.PveSession + + + + + + 25 + Left + + + + 6 + Right + + + + 10 + Left + + + + 8 + Left + + + + 15 + Left + + + + + + + Hostname + + + Port + + + AuthMode + + + if ($_.IsExpired) { 'Yes' } else { 'No' } + + + if ($_.ServerVersion) { $_.ServerVersion.ToString() } else { 'Unknown' } + + + + + + +