Can I add a manually created RBD image

jschwab

New Member
Jan 23, 2023
5
0
1
I have a separately managed Ceph cluster with an RBD pool pve-vmdata that I use for VM disks. If I create on the Ceph cluster an image, with e.g. rbd create --size 1024 pve-vmdata/myimg, is it possible to add the image to a VM? Can I somehow scan for/detect the new image?
 
Proxmox VE expects the disk images named in a certain format: vm-{vmid}-...
If you create it with that naming scheme, you can run qm rescan --vmid {vmid} and it will search for disk images matching the naming scheme as unused disks to the VM.

If you need to use a name other than that, you should still be able to add it. Either by editing the config file of the VM directly, or by running something like qm set {vmid} --scsi{x} {storage name}:{disk image name}
 
Thank you for the help! Though it seems that even with qm set the images need a prefix of the form vm-{vmid}-. At least I get something like:

Code:
# qm set 235 --scsi1 ceph_rbd:myimg
unable to parse rbd volume name 'myimg'

But that's not a big issue. After renaming the image (rbd mv pve-vmdata/myimg pve-vmdata/vm-235-myimg), I can add it without issues.
 

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!