[SOLVED] How to add a virtual disk to VM via command line qm set?

r4dh4l

Active Member
Feb 5, 2018
88
7
28
Hi,

maybe a very simple question but reading https://pve.proxmox.com/pve-docs/qm.1.html I didn't understand how to use the qm set command for adding a second virtual disk to an existing VM.

What I'm looking for is the equivalent to VM Management -> Add -> Hard Disk -> (default settings: SCSI, VirtIO SCSI). So maybe something like:

Code:
qm set VMID --scsi1 ,size=32G

But trying this command proxmox reports:

Code:
400 Parameter verification failed.
scsi1: invalid format - format error
scsi1.file: property is missing and it is not optional

What am I doing wrong?
 
You don't tell where to store the virtual disk and under which name. You could try something like this:
qm set 1000 --scsi1 YourVMStorageId:vm-1000-disk-1,size=32G
 
  • Like
Reactions: r4dh4l
Thank you. "YourVMStorageId" is, for example, "local-zfs"?
 
There s a simplified syntax for the command line:

# qm set 1000 --scsi1 YourVMStorageId:32

This is mentioned in the "qm" manual page:
Use the special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume.
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!