CreateVirtualMachines

Creates virtual machines on a Proxmox host from the NETSetup configuration. VMs are identified by serial number format {VMID}@{HostSerial}. DC (WindowsServer) is created first, Windows 11 VMs get stealth hardware.

public static class CreateVirtualMachines

1. Methods

1.1. GetOrderedVmsForHost(NETSetupConfig, SerialNumber)

Filters and orders machines from config that should be created on this host. Returns machines whose serial suffix matches the host. Ordering: OPNsense first (router boots before downstream VMs need network), then DC (WindowsServer), then everything else, NixDns LAST (so sibling Nix VMs already running with discoverable IPs by the time dns config emits coredns LAN A records).

public static IReadOnlyList<Machine> GetOrderedVmsForHost(NETSetupConfig config, SerialNumber hostSerial)
Table 1. Parameters
Name Type Description

config

NETSetupConfig

hostSerial

SerialNumber

Returns: IReadOnlyList<Machine>

1.2. IsForHost(SerialNumber, SerialNumber)

Determines whether a machine’s serial number targets this host. Serial format: {VMID}@{HostSerial}. Returns true if the suffix after @ matches the host serial.

public static bool IsForHost(SerialNumber machineSerial, SerialNumber hostSerial)
Table 2. Parameters
Name Type Description

machineSerial

SerialNumber

hostSerial

SerialNumber

Returns: bool

1.3. ShouldUseStealthHardware(Machine)

Determines whether a VM should use stealth hardware (LSI/E1000) for anti-detection. Only Windows 11 VMs require stealth hardware; other OSes get standard SMBIOS anti-detection.

public static bool ShouldUseStealthHardware(Machine machine)
Table 3. Parameters
Name Type Description

machine

Machine

Returns: bool