feat: add AdditionalConfig parameter and guest agent cmdlets (closes #2, #3)

Issue #3 — Set-PveVmConfig / Set-PveContainerConfig:
- Add -AdditionalConfig [Hashtable] for arbitrary PVE config keys
  (scsi0, boot, agent, net0, ide2, cicustom, etc.)
- Add -Delete [string] for removing config keys
- Unit tests for both new parameters

Issue #2 — QEMU Guest Agent cmdlets:
- Test-PveVmGuestAgent: pings guest agent, returns bool
- Get-PveVmGuestNetwork: returns guest network interfaces with IPs
- Invoke-PveVmGuestExec: executes command in guest, returns output
- New models: PveGuestNetworkInterface, PveGuestIpAddress
- Service methods in VmService for all agent operations

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Clint Branham
2026-03-19 14:06:55 -05:00
parent c6da302742
commit b12ffc485d
10 changed files with 364 additions and 0 deletions
@@ -212,6 +212,22 @@ Describe 'Set-PveVmConfig' {
$script:Cmd.Parameters['OsType'].ParameterType | Should -Be ([string])
}
It 'Should have AdditionalConfig parameter (optional, Hashtable)' {
$script:Cmd.Parameters.ContainsKey('AdditionalConfig') | Should -BeTrue
$script:Cmd.Parameters['AdditionalConfig'].ParameterType | Should -Be ([hashtable])
$isMandatory = $script:Cmd.Parameters['AdditionalConfig'].ParameterSets.Values |
Where-Object { $_.IsMandatory }
$isMandatory | Should -BeNullOrEmpty
}
It 'Should have Delete parameter (optional, String)' {
$script:Cmd.Parameters.ContainsKey('Delete') | Should -BeTrue
$script:Cmd.Parameters['Delete'].ParameterType | Should -Be ([string])
$isMandatory = $script:Cmd.Parameters['Delete'].ParameterSets.Values |
Where-Object { $_.IsMandatory }
$isMandatory | Should -BeNullOrEmpty
}
It 'Should have Session parameter (inherited from PveCmdletBase)' {
$script:Cmd.Parameters.ContainsKey('Session') | Should -BeTrue
}