diff --git a/pvesnap/recovery.py b/pvesnap/recovery.py index 81b70a5..8fafc00 100644 --- a/pvesnap/recovery.py +++ b/pvesnap/recovery.py @@ -1286,10 +1286,15 @@ def set_display(proxmox, instance, spice, usb, progress=None): raise RecoveryError("SPICE und USB-Weiterleitung gibt es nur bei " "virtuellen Maschinen, nicht bei Containern.") usb = max(0, min(14, int(usb or 0))) - if usb and not spice: - spice = True - step("SPICE wird mit eingeschaltet - ohne den Kanal waeren die " - "Anschluesse wirkungslos") + if not spice: + # SPICE aus ist die staerkere Aussage. Die Anschluesse fallen mit weg - + # ohne Kanal waeren sie ohnehin wirkungslos. (Beim Anlegen gilt die + # Regel andersherum: dort zieht --usb die Anzeige mit hoch, siehe + # plan(). Hier wuerde genau das die Absage ueberstimmen.) + if usb: + step("Die USB-Anschluesse fallen mit weg - ohne SPICE-Kanal " + "waeren sie wirkungslos") + usb = 0 config = proxmox.guest_config(instance.guest) hat_spice = str(config.get("vga") or "").startswith("qxl") diff --git a/pvesnap/recovery_ui.py b/pvesnap/recovery_ui.py index 42f3a87..e77f869 100644 --- a/pvesnap/recovery_ui.py +++ b/pvesnap/recovery_ui.py @@ -689,7 +689,7 @@ def _display(stdscr, proxmox, instance): (False, "aus - nur noVNC im Browser")]) if ziel is None: return - anzahl = usb + anzahl = 0 if ziel: anzahl = choose(stdscr, "USB-Weiterleitung (jetzt: %d)" % usb, [(0, "keine"), (1, "1 Anschluss"), (2, "2 Anschluesse"),