ProvisionWindowsVmOnProxmox

Provisions a Windows VM on a Proxmox host by building a per-VM offline NETSetup ISO, copying it to Proxmox iso storage, then creating the VM booting from that ISO.

public static class ProvisionWindowsVmOnProxmox

1. Fields

1.1. IsoNamePrefix

Prefix for per-VM NETSetup ISOs.

public const string IsoNamePrefix

1.2. ProxmoxDefaultIsoStoragePath

Standard Proxmox iso storage path.

public static readonly AbsolutePath ProxmoxDefaultIsoStoragePath

1.3. ReusableIsoName

Shared reusable ISO file name on iso storage. Used by every VM when UseReusableIso is set (no per-VM offline ISO build).

public const string ReusableIsoName

2. Methods

2.1. BuildIsoName(string, string)

Returns the expected ISO file name for the given ticket and hostname: NETSetup-{ticket}-{host}.iso.

public static string BuildIsoName(string ticket, string hostname)
Table 1. Parameters
Name Type Description

ticket

string

hostname

string

Returns: string

2.2. Run(Host, SystemManagement.Entities.Machine, NETSetupConfig, ISystemHost, IServiceProvider)

Production facade. Must wire real deps: existence check via Host, real offline ISO build via MainISO.CreateOfflineProductionISO + CopyToProxmoxStorageIfApplicable, VM creation via Host.CreateVirtualMachine.

public static ProvisionWindowsVmResult Run(Host proxmoxHost, SystemManagement.Entities.Machine machine, NETSetupConfig config, ISystemHost sysHost, IServiceProvider services)
Table 2. Parameters
Name Type Description

proxmoxHost

Host

machine

SystemManagement.Entities.Machine

config

NETSetupConfig

sysHost

ISystemHost

services

IServiceProvider

Returns: ProvisionWindowsVmResult

2.3. RunCore(SystemManagement.Entities.Machine, string, Func<bool>, Func<string, AbsolutePath>, Action<AbsolutePath, bool>, ILogger)

Testable core: pure-delegate orchestration of existence-check, ISO build, and VM create.

public static ProvisionWindowsVmResult RunCore(SystemManagement.Entities.Machine machine, string ticket, Func<bool> vmExists, Func<string, AbsolutePath> createOfflineIsoAndCopy, Action<AbsolutePath, bool> createVm, ILogger logger)
Table 3. Parameters
Name Type Description

machine

SystemManagement.Entities.Machine

ticket

string

vmExists

Func<bool>

createOfflineIsoAndCopy

Func<string, AbsolutePath>

createVm

Action<AbsolutePath, bool>

logger

ILogger

Returns: ProvisionWindowsVmResult