mirror of
https://github.com/Telmate/proxmox-api-go.git
synced 2026-04-25 15:35:51 +03:00
[GH-ISSUE #527] Bug: Additional Attribute in Snapshot Creation leading to a failed Creation for LXC Containers #145
Labels
No labels
good first issue
issue/confirmed
issue/critical
proposal/accepted
pull-request
type/bug
type/enhancement
type/feature
type/question
type/refactoring
type/testing
type/testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/proxmox-api-go#145
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Jobonabas on GitHub (Dec 2, 2025).
Original GitHub issue: https://github.com/Telmate/proxmox-api-go/issues/527
Originally assigned to: @Tinyblargon on GitHub.
📄 Description
When creating a snapshot the API does not differ between LXC Container and Qemu VMs. Qemu VMs need the attribute vmstate, while it is not needed for LXC VMs . This leads to an error on the API side when creating a snapshot of an LXC Container.
👣 Steps to reproduce
For this to work you need to have at least one LXC VM
❌ Current behaviour
This leads to the following error:
2025/12/02 15:05:58 failed to create snapshot: error creating Snapshot: 400 Parameter verification failed., (params: {"description":"Test3","snapname":"Test3","vmstate":false})
Leaving out the vmstate false in the struct leads to the same error, as the vmstate is automatically replaced.
Using the Proxmox UI I am able to create snapshots as usual.
✔ Expected behaviour
Snapshot creation should differ between Qemu VMs and LXC Containers and send the attributes according to the Proxmox API:
LXC: https://pve.proxmox.com/pve-docs/api-viewer/#/nodes/{node}/lxc/{vmid}/snapshot
Qemu: https://pve.proxmox.com/pve-docs/api-viewer/#/nodes/{node}/qemu/{vmid}/snapshot