qm-unlink

Unlink disks from a Proxmox VM

TLDR

Unlink a disk from a virtual machine
$ qm unlink [vmid] --idlist [unused0]
Unlink a disk and force-remove it from the config
$ qm unlink [vmid] --idlist [scsi0] --force
Unlink multiple disks at once
$ qm unlink [vmid] --idlist [scsi0;scsi1]

SYNOPSIS

qm unlink vmid --idlist string [--force boolean]

DESCRIPTION

qm unlink is an alias for qm disk unlink that removes a disk from a virtual machine's configuration without deleting the underlying storage volume. The disk becomes unused but remains available in the storage for reattachment to the same or another VM.This is useful for safely detaching disks before moving them between VMs or when cleaning up a VM configuration without losing data.

PARAMETERS

vmid

The unique numeric ID of the virtual machine (100-999999999).
--idlist string
A semicolon-separated list of disk IDs to unlink (e.g., `unused0`, `scsi0`, `virtio1`).
--force boolean
Force removal. Allows removing disks that are still referenced in the VM config even if they are not marked as unused. Default: `0`.

INSTALL

sudo dnf install qm

SEE ALSO

qm(1), qm-disk(1)