mirror of
https://github.com/Telmate/proxmox-api-go.git
synced 2026-04-25 23:45:55 +03:00
[PR #279] [MERGED] feat: add support for unlinking disks from VM #366
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#366
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?
📋 Pull Request Information
Original PR: https://github.com/Telmate/proxmox-api-go/pull/279
Author: @FredrickB
Created: 11/7/2023
Status: ✅ Merged
Merged: 12/6/2023
Merged by: @mleone87
Base:
master← Head:add-detaching-disks-functionality-to-client📝 Commits (1)
d062c3cfeat: add support for unlinking disks from VM📊 Changes
3 files changed (+49 additions, -0 deletions)
View changed files
📝
README.md(+2 -0)📝
main.go(+28 -0)📝
proxmox/client.go(+19 -0)📄 Description
Added support for unlinking a disk from a VM with optional force-removal. This is the first step to fix an issue
in the Proxmox Terraform provider where the disks are not removed correctly if removed from the HCL as part
of a cloud-init based VM.
Testing
I have tested the changes on a local Proxmox install, version
8.0.4with the following modified example JSON for creating the Qemu VM:qemu1.json(supply name of iso-file uploaded to Proxmox node):Scenarios
Unlink disk, but don't delete it
Should unlink the disk
virtio1and leave it asUnused Disk 0in tabHardwareof VMUnlink disk, and delete it
Should unlink the disk
virtio2and remove it from tabHardwareof VMUnlink and delete multiple disks
Should unlink the disks
virtio1andvirtio2and remove both from tabHardwareof VM🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.