fix(vm): global eindeutige VNC-Displays (kein Doppel-Binding) + Gateway per-boot
- project_vms.add_vm: VNC-Display wird GLOBAL eindeutig vergeben (ueber alle Projekte). vnc_display<=0 oder belegtes Display → naechstes freies. Updates behalten ihr Display. Verhindert Port-Konflikt (5901) wenn mehrere VMs laufen. Getestet: vm1..3 → 1,2,3; Wunsch 2 (belegt) → 4; Update behaelt Display. - vm_register-Tool + Seed-Regel: vnc_display weglassen, wird auto-vergeben. - Gateway-IP: der Brain liest sie aus /proc/net/route bei JEDEM Boot frisch (Docker-IP-Aenderung nach Netz-Neuaufbau wird abgefangen); boot-Antwort enthaelt vnc_bind zur Transparenz. py_compile clean. Brain-only, Deploy: brain rebuild. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+2
-2
@@ -1184,7 +1184,7 @@ META_TOOLS = [
|
||||
"disk": {"type": "string", "description": "optional: qcow2-Pfad (Festplatte)."},
|
||||
"floppy": {"type": "string", "description": "optional: Disketten-Image-Pfad (-fda)."},
|
||||
"iso": {"type": "string", "description": "optional: Boot-ISO-Pfad."},
|
||||
"vnc_display": {"type": "integer", "description": "VNC-Display (Default 1 → Port 5901)."},
|
||||
"vnc_display": {"type": "integer", "description": "meist WEGLASSEN — das VNC-Display wird global eindeutig auto-vergeben (kein Port-Konflikt bei mehreren VMs). Nur setzen wenn Du ein bestimmtes willst."},
|
||||
"mem": {"type": "integer", "description": "RAM in MB (Default 1024)."},
|
||||
},
|
||||
"required": ["name", "arch"],
|
||||
@@ -2846,7 +2846,7 @@ class Agent:
|
||||
(arguments.get("iso") or "").strip(),
|
||||
(arguments.get("floppy") or "").strip(),
|
||||
(arguments.get("disk") or "").strip(),
|
||||
int(arguments.get("vnc_display") or 1),
|
||||
int(arguments.get("vnc_display") or 0),
|
||||
int(arguments.get("mem") or 1024),
|
||||
)
|
||||
except (ValueError, TypeError) as exc:
|
||||
|
||||
Reference in New Issue
Block a user