Well, its not a standard daily operation so there are no readily available solutions that you can just copy-paste.
create new disk and attach it to VM:
pvesm alloc blockbridge 100 vm-100-disk-1 1G
qm set 100 --scsihw virtio-scsi-pci --scsi1 blockbridge:vm-100-disk-1
Inside the VM:
lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 2.2G 0 disk
├─sda1 8:1 0 2.1G 0 part /
├─sda14 8:14 0 4M 0 part
└─sda15 8:15 0 106M 0 part /boot/efi
sdb 8:16 0 1G 0 disk
sr0 11:0 1 4M 0 rom
mkfs.ext4 /dev/sdb
mkdir /mnt/sdb
mount /dev/sdb /mnt/sdb
echo "hi there from vm" > /mnt/sdb/hi.txt
umount /mnt/sdb
back on the host, unmap the disk from vm:
qm unlink 100 --idlist scsi1
rename the disk using storage specific commands:
bb vss update --vss blockbridge:vm-100-disk-1 --label blockbridge:vm-999-disk-2
== Updated vss: blockbridge:vm-999-disk-2 (VSS1862194C40606620)
attach new disk to the container:
pct set 999 --mp2 blockbridge:vm-999-disk-2,mp=/vmdata
pct config 999
arch: amd64
hostname: CT999
memory: 512
mp1: blockbridge:vm-999-disk-1,mp=/data,size=1G
mp2: blockbridge:vm-999-disk-2,mp=/vmdata,size=1G
ostype: ubuntu
rootfs: blockbridge:vm-999-disk-0,size=8G
swap: 512
PROFIT:
pct start 999
pct exec 999 cat /vmdata/hi.txt
hi there from vm
Blockbridge: Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox