ProxmoxSshQmExecutor

Runs qm on the Proxmox host over the client’s SSH channel. Use when netsetup does NOT run on the host itself (dev box / test runner), where LocalQmExecutor would try to spawn /usr/bin/env locally and fail.

public sealed class ProxmoxSshQmExecutor : IQmExecutor

1. Constructors

1.1. ProxmoxSshQmExecutor(Proxmox, ILogger)

Initializes a new instance of the ProxmoxSshQmExecutor class.

public ProxmoxSshQmExecutor(Proxmox client, ILogger logger)
Table 1. Parameters
Name Type Description

client

Proxmox

Connected Proxmox client whose SSH channel reaches the host.

logger

ILogger

Logger every qm command is written to before it runs.

2. Methods

2.1. Run(string, string, string, string)

Runs qm {verb} {vmId} [--{optionName} {optionValue}].

public QmResult Run(string verb, string vmId, string optionName = null, string optionValue = null)
Table 2. Parameters
Name Type Description

verb

string

qm subcommand, e.g. set / stop / status / start.

vmId

string

Target VM id.

optionName

string

Option name without dashes, or null for none.

optionValue

string

Option value. Ignored when optionName is null.

Returns: QmResult