feat: enhance guest network configuration and recovery process for UVM

This commit is contained in:
2026-09-23 08:20:35 +05:30
parent dca3cbde2f
commit 660ba9efee
9 changed files with 474 additions and 12 deletions
+3 -6
View File
@@ -14,14 +14,14 @@ from pathlib import Path
from .config import Settings
from .errors import UvmError
from .images import GuestAssets
from .images import GUEST_NETWORK_TEMPLATE, GuestAssets
from .integrity import load_manifest, require_checksum, sha256_file, verify_file, write_manifest
from .state import StateStore
from .system import CommandRunner, check_kvm, ensure_data_directories, require_root
_UBUNTU_RELEASE = "jammy"
_ROOTFS_RECIPE = "uvm-ubuntu-jammy-v2\n"
_ROOTFS_RECIPE = "uvm-ubuntu-jammy-v3\n"
_GUEST_PACKAGES = (
"ca-certificates", "openssh-server", "sudo", "systemd-sysv", "udev",
"dbus", "libpam-systemd", "iproute2", "iputils-ping", "curl",
@@ -383,10 +383,7 @@ class Installer:
"etc/resolv.conf": "nameserver 1.1.1.1\nnameserver 8.8.8.8\n",
"etc/machine-id": "",
"etc/uvm-image": _ROOTFS_RECIPE,
"etc/systemd/network/10-uvm.network": (
"[Match]\nName=eth0\n\n[Network]\n"
"KeepConfiguration=static\nDHCP=no\nLinkLocalAddressing=no\nIPv6AcceptRA=no\n"
),
"etc/systemd/network/10-uvm.network": GUEST_NETWORK_TEMPLATE,
}
for relative, contents in files.items():
path = root / relative