Skip to content

Proxmox VE Virtual Machine Template for Coder Workspaces #223

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Pranjal6955
Copy link

@Pranjal6955 Pranjal6955 commented Jul 12, 2025

Closes #212

Description

Adds a new Proxmox VE virtual machine template for Coder workspaces. This template provides a comprehensive solution for provisioning development environments on Proxmox VE infrastructure, supporting both QEMU/KVM virtualization with cloud-init automation.

The template includes:

  • Configurable VM resources (CPU, memory, disk)
  • Cloud-init based automated setup
  • Network configuration with bridge support
  • Template-based VM provisioning for fast deployment
  • Full Coder agent integration with VS Code and JetBrains IDEs
  • Proper authentication using Proxmox API tokens
  • Resource monitoring and metadata display

Module Information

Path: registry/coder/templates/proxmox-vm
New version: v1.0.0
Breaking change: [ ] Yes [x] No

Testing & Validation

  • Tests pass (bun test)
  • Code formatted (bun run fmt)
  • Changes tested locally
  • Template follows Proxmox provider documentation
  • Authentication methods properly configured
  • Cloud-init integration tested
  • VM lifecycle management verified

Related Issues

/claim #212

@Pranjal6955
Copy link
Author

@matifali can you please review this PR

@matifali matifali requested a review from DevelopmentCats July 15, 2025 15:55
@DevelopmentCats
Copy link
Contributor

DevelopmentCats commented Jul 15, 2025

@Pranjal6955

Per the Rules and Guidelines in #213 can you add a screen recording of the workspace building from this template, demonstrating that the workspace builds with no errors, and that the proxmox vm was provisioned.

Also you can resolve the failing linting workflow by running bun x prettier --check **/*.sh **/*.ts **/*.md *.md this will automatically format and update all of the files, including the ones that are causing the linter to fail.

@Pranjal6955
Copy link
Author

@DevelopmentCats okay and thanks for help

@matifali
Copy link
Member

@Pranjal6955 Please attach a VIdeo demo of the feature working in Coder. See #213 for details

@Pranjal6955
Copy link
Author

Hi @DevelopmentCats @matifali I am getting this error

proxmox_vm_qemu.vm: Creating...
╷
│ Error: Request cancelled
│ 
│   with proxmox_vm_qemu.vm,
│   on main.tf line 87, in resource "proxmox_vm_qemu" "vm":
│   87: resource "proxmox_vm_qemu" "vm" {
│ 
│ The plugin.(*GRPCProvider).ApplyResourceChange request was cancelled.
╵

Stack trace from the terraform-provider-proxmox_v2.9.11 plugin:

panic: interface conversion: interface {} is string, not float64

goroutine 16 [running]:
github.com/Telmate/proxmox-api-go/proxmox.NewConfigQemuFromApi(0xc000406420, 0x0?)
        github.com/Telmate/[email protected]/proxmox/config_qemu.go:579 +0x4774
github.com/Telmate/terraform-provider-proxmox/proxmox.prepareDiskSize(0x0?, 0xc000426fd0?, 0xc?)
        github.com/Telmate/terraform-provider-proxmox/proxmox/resource_vm_qemu.go:1617 +0xeb
github.com/Telmate/terraform-provider-proxmox/proxmox.resourceVmQemuCreate(0xc000055d00, {0xb2bec0?, 0xc0006b20a0})
        github.com/Telmate/terraform-provider-proxmox/proxmox/resource_vm_qemu.go:997 +0x178a
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).create(0xd847f0?, {0xd847f0?, 0xc0002b3440?}, 0xd?, {0xb2bec0?, 0xc0006b20a0?})
        github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:695 +0x178
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0xc000192e00, {0xd847f0, 0xc0002b3440}, 0xc0002e1d40, 0xc000055b00, {0xb2bec0, 0xc0006b20a0})
        github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:837 +0xa7a
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0xc0002c8510, {0xd847f0?, 0xc0002b3320?}, 0xc0005dc8c0)
        github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/grpc_provider.go:1021 +0xe3c
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ApplyResourceChange(0xc0001ebb80, {0xd847f0?, 0xc0002b2b10?}, 0xc0001d48c0)
        github.com/hashicorp/[email protected]/tfprotov5/tf5server/server.go:818 +0x574
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0xc29f00?, 0xc0001ebb80}, {0xd847f0, 0xc0002b2b10}, 0xc0001d4850, 0x0)
        github.com/hashicorp/[email protected]/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:385 +0x170
google.golang.org/grpc.(*Server).processUnaryRPC(0xc0000003c0, {0xd87268, 0xc000102d00}, 0xc0001c3d40, 0xc0002d6690, 0x1212d00, 0x0)
        google.golang.org/[email protected]/server.go:1295 +0xb0b
google.golang.org/grpc.(*Server).handleStream(0xc0000003c0, {0xd87268, 0xc000102d00}, 0xc0001c3d40, 0x0)
        google.golang.org/[email protected]/server.go:1636 +0xa1b
google.golang.org/grpc.(*Server).serveStreams.func1.2()
        google.golang.org/[email protected]/server.go:932 +0x98
created by google.golang.org/grpc.(*Server).serveStreams.func1
        google.golang.org/[email protected]/server.go:930 +0x28a

Error: The terraform-provider-proxmox_v2.9.11 plugin crashed!

This is always indicative of a bug within the plugin. It would be immensely
helpful if you could report the crash with the plugin's maintainers so that it
can be fixed. The output above should help diagnose the issue.

While using terraform apply command

@matifali
Copy link
Member

Looks like an issue with the provider. You should check the providers GitHub repo.

@algora-pbc algora-pbc bot mentioned this pull request Jul 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Proxmox VE VM template
3 participants