Workflow now provisions a throwaway nested PVE VM via Terraform, runs
integration tests against it, then destroys it. Uses proxmox-auto-install-assistant
to bake the answer file and a first-boot script (installs qemu-guest-agent)
directly into the ISO. IP is discovered via the QEMU guest agent on the
parent PVE, eliminating the need for static IP configuration.
Supports both PVE 8.x and 9.x via workflow_dispatch version selector.
Skip provisioning with skip_provision=true to test against a pre-existing PVE.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The self-hosted runner has dotnet 9.0 installed globally. Drop the
setup-dotnet step (which tried to install to /usr/share/dotnet without
permission) and build/publish against the project's actual target
framework net9.0 instead of the nonexistent net10.0.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Connectivity check: pass API token and check /nodes instead of /version
(PVE 9 requires authentication for all API endpoints including /version)
- Runner labels updated to proxmox,integration externally
- PVETEST secrets configured for integration test target
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Remove ISO upload and answer-file resources (pre-provisioned manually)
- Remove null_resource wait/token steps (token created out-of-band)
- Switch iso_file to iso_file_id referencing an existing Proxmox file ID
- Add lifecycle ignore_changes for started and cdrom
- Update README with proxmox-auto-install-assistant ISO prep instructions
- Update default variables to match homelab environment
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- BaseUrl trailing slash and resource path cleanup: PveSession.BaseUrl now
ends with '/', all cmdlet resource strings stripped of leading slashes and
/api2/json/ prefixes so URLs compose correctly
- PveNodeStatus: rename Name -> Node to match JSON field and test expectations
- NewPveVmCmdlet: auto-allocate vmid via GET cluster/nextid when -VmId omitted
- UploadFileAsync (BZ 7389 workarounds):
* Unquoted multipart boundary in Content-Type header
* Quoted name= values in Content-Disposition (embedded double-quotes)
* Content-Disposition set before Content-Type on file part — PVE's parser
closes the connection if Content-Type appears first
- SendPveIsoCmdlet: run upload in Task.Run, track progress atomically with
Interlocked, poll and call WriteProgress only from pipeline thread to avoid
InvalidOperationException from PSCmdlet thread-affinity requirements
- Add debug/Capture-UploadDiff.ps1: mitmproxy capture script used to isolate
the header-ordering bug by diffing raw multipart bytes from PS vs C# module
Integration test result: 11 passed, 0 failed, 4 skipped (expected — no
template/stopped VMs on bare nested PVE test node).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Implement Get-PveApiToken, New-PveApiToken, and Remove-PveApiToken to
enable automated token management without manual Proxmox VE UI interaction.
Adds PveApiToken model, UserService methods for the token endpoints, and
31 Pester unit tests covering parameters, ShouldProcess, and no-session behaviour.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
.NET's HttpHeaders.Add() validates the Authorization header value
against the HTTP spec, rejecting PVE's custom PVEAPIToken scheme
that contains @, !, and = in the token string.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Integration tests now run on self-hosted runners with proxmox/integration
labels on every push to main. Adds PVE API connectivity check before
test execution and uses Pester configuration object for cleaner setup.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Bash setup script for Debian/Ubuntu, Dockerfile for containerized
runners, and comprehensive documentation. Installs .NET SDK, PowerShell,
Terraform, and configures the GitHub Actions runner as a systemd service
with proxmox/integration labels.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Provisions a throwaway nested Proxmox VE instance on an existing host
using bpg/proxmox provider. Includes unattended install via answer file,
API wait script, and automatic API token creation. Designed for CI-driven
integration test environments.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Pester tests that start the mock PVE server, run real cmdlets against it,
and validate end-to-end behavior: auth flows, node/VM/storage/network/
user operations, pipeline support, and deserialization. Runs on every
push via GitHub-hosted runners.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ASP.NET Minimal API project that simulates the Proxmox VE API using
existing JSON fixtures. Supports ticket and API token auth, request
tracking for assertions, self-signed HTTPS, and all major API endpoints.
Designed for programmatic test startup via MockPveServer.Start().
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Invoke-Tests.ps1 with -Tier (Unit/Integration/All) runs dotnet test
and Invoke-Pester with color-coded summary output.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Build workflow validates both net48 and net10.0 targets with code
coverage. Unit test workflow runs Pester across 6 OS/PS combinations.
Integration test workflow is manual trigger only with secrets check.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
All integration tests skip unless PVETEST_* environment variables are
configured. README documents required API token permissions, environment
variables, and planned test coverage per domain. Warning that tests
create and destroy real VMs and modify network configuration.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
18 Pester 5 test files covering parameter validation, pipeline support,
-WhatIf behavior, ShouldProcess/ConfirmImpact attributes, and session
requirement enforcement for all cmdlet groups. Fully mocked — no network
calls.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
144 tests covering authentication (version parsing, session expiry, token
format validation), model deserialization from real PVE 8.x/9.x API JSON
fixtures, and service layer behavior. Includes TestHelper with mock
HttpMessageHandler factory and 21 JSON fixture files.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Define default Format-Table views for PveVm, PveNode, PveStorage,
PveTask, PveSnapshot, PveContainer, and PveUser. Add module manifest
with all 60+ cmdlets explicitly listed, PowerShell 5.1+ compatibility,
and prerelease tag.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add cmdlets for snapshots (Get/New/Remove/Restore-PveSnapshot), network
(Get/New/Set/Remove-PveNetwork, Invoke-PveNetworkApply), SDN zones and
VNets (PVE 8.0+ version guard), users/roles/permissions, templates
(Get/New/Remove-PveTemplate, New-PveVmFromTemplate), cloud-init config,
and task management (Get-PveTask, Wait-PveTask).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add Get-PveContainer, New-PveContainer, Remove-PveContainer,
Start/Stop/Restart-PveContainer, Copy-PveContainer,
Get-PveContainerConfig, and Set-PveContainerConfig. Mirrors VM
cmdlet patterns with LXC-appropriate parameters.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add Get-PveVm, New-PveVm, Remove-PveVm, Start/Stop/Suspend/Resume/
Reset/Restart-PveVm, Copy-PveVm, Move-PveVm, Get-PveVmConfig,
Set-PveVmConfig, and Resize-PveVmDisk. All support pipeline input,
-WhatIf/-Confirm on state changes, and -Wait for async tasks.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add ModuleState, PveCmdletBase with -Session parameter and session
validation. Implement Connect-PveServer, Disconnect-PveServer,
Test-PveConnection, Get-PveNode, and Get-PveNodeStatus with pipeline
support.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add service classes for nodes, VMs, containers, storage, snapshots,
network/SDN, users/roles/permissions, templates, cloud-init, tasks,
and cluster. SDN services enforce PVE 8.0+ version guard. Task service
supports polling with configurable timeout and progress callbacks.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add C# model classes for all PVE API resources: nodes, VMs, VM config,
containers, storage, network interfaces, SDN zones/vnets, users, roles,
permissions, snapshots, tasks, and cluster status. All models use dual
JSON attributes (System.Text.Json + Newtonsoft.Json), nullable optional
fields, and human-readable ToString() overrides.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
PveHttpClient handles auth headers, error parsing, and both sync/async
request methods. ISO upload constructs raw multipart body manually to
avoid .NET MultipartFormDataContent sub-headers that Proxmox pveproxy
mishandles. Streams files in 4MB chunks with progress callback support.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add PveSession, PveAuthenticator, PveVersion, and PveAuthMode. Support
ticket-based auth (username/password with 2hr expiry) and API token auth
(USER@REALM!TOKENID=UUID format). Version detection on connect via
GET /api2/json/version. Custom exception types for API errors, expired
sessions, missing connections, version mismatches, and task failures.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Set up the PSProxmoxVE repository with solution file, project files for
Core library (net10.0+net48), PowerShell module, and xUnit test project.
Includes .gitignore, .editorconfig, LICENSE (MIT), CHANGELOG, and README
with supported version matrix and full cmdlet reference.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>