KVM proxmox add phisycal hdd to guest

Big problem little question , very short answer .

Many people need to add an external phisycal resource to PVE but in the Web consolle ( i know you are a luser 😛 ) cannot find any way to do that. It’s quite the same as add USB resource , use SSH and call for qm ( qemu/KVM virtual machine manager , man qm ) , using this little command from shell you access the whole garden of resources and and applications of your host and guests .

How to add external HDD to my PVE guest ?


Now let’s exaplain something about what i’ve written.

qm : command to call manager

set : comman to pass to manager

GUEST_ID : the ID of the guest target to the command , 100 , 101 … etc choose yours

-TYPE : the type of the controller , sata ide virtio and so on

-TYPE_CHANNUMBER : without any blank concatenate the channel number to the type , the channel number is 0 1 2 etc depends on the type of the disk , so at the and the option will be something like this : -sata1 or ide1 ..

/dev/DEVICE : the device that you want to connect ( /dev/sdb /dev/sdc … )


The Vmachine must be shutted down and restarted to recognize the aded resource(s)

Have fun with your KVM .

Remeber , the QM simple add configurations lines to your /etc/pve/qemu-server/SERVER_ID.conf . What done with the command in this post is possibile to do also by adding a line like this to your conf file .

sata0 : /dev/sdd,size=SIZE_OF_THE_DISK_IN_KB

SIZE_OF_THE_DISK_IN_KB = the size of the disk expressed in kylobytes … the fastes way is to use the qm command 😉