How do you attach a disk to a VM?

Red Squirrel

Renowned Member
May 31, 2014
25
7
68
Seems this should be something simple to do but can't seem to find the option anywhere. I want to create my disks manually so I can preallocate them as there does not seem to be an option to do that while creating the VM, but I also see no option to add the disks. Is there a way to do this?
 
Figured it out, looks like you have to edit /etc/pve/qemu-server/xxx.conf where xxx is vm number. Would be nice if there was a way through the gui to do it though.
 
you do not have to edit the file manually, you can use the api/cli

Code:
pvesm alloc <storage> <vmid> <filename> <size>

allocates a new disk

and with
Code:
qm set ID -scsiX 'storage:volumeid'

you can attach it
 
  • Like
Reactions: Spirog

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!