← 返回命令列表

Linux command

qm-disk 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Example

qm disk resize [100] scsi0 +10G

Move

qm disk move [100] scsi0 [local-lvm]

Example

qm disk move [100] scsi0 [local-lvm] --delete

Import

qm disk import [100] [/path/to/disk.vmdk] [local-lvm] --format qcow2

Rescan

qm disk rescan

Example

qm disk rescan --dryrun

Example

qm disk rescan --vmid [100]

说明

qm disk manages disk images for Proxmox VE virtual machines. It handles resizing, moving between storage backends, importing external disk images, and rescanning storage for changes. This is essential for storage management and migration tasks.

参数

resize _vmid_ _disk_ _size_
Resize a disk (use +nG to add space). Shrinking is not supported.
move _vmid_ _disk_ _storage_
Move disk to different storage or different VM.
import _vmid_ _source_ _storage_
Import external disk image as unused disk.
rescan _options_
Rescan storages for disk changes.
--format _format_
Target disk image format (qcow2, raw, vmdk).
--delete
Delete source after move.
--dryrun
Preview changes without applying.
--vmid _id_
Target specific VM for rescan.
--disk _disk_id_
Assign specific disk ID (e.g. scsi0, sata1) on import.

FAQ

What is the qm-disk command used for?

qm disk manages disk images for Proxmox VE virtual machines. It handles resizing, moving between storage backends, importing external disk images, and rescanning storage for changes. This is essential for storage management and migration tasks.

How do I run a basic qm-disk example?

Run `qm disk resize [100] scsi0 +10G` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does resize _vmid_ _disk_ _size_ do in qm-disk?

Resize a disk (use +nG to add space). Shrinking is not supported.