When adding a new drive to a VM, how do I use the full size without guessing?

manguy

New Member
Jul 5, 2024
13
1
3
If I buy an 8TB drive, ideally when adding a hard drive to a VM and it asks me for how much, saying "8000" would work, but as we all know, the true number available is some number that has to be calculated with variables like "how is it formatted?" etc. Why is there no "all available" option? Ad barring that, how can I know what the largest number is? My 8TB drive says it is 7.83TB in the disks section, so of course I try "7830", and of course "nope". I then try 7829, etc, until I give up and start removing hundreds of GB and something like 7600 works, but obviously wasting unused space. What is the real way of doing this?
 
If I buy an 8TB drive

Proxmox is about virtualization. So your approach of buying a disk and giving it completely to a single VM is plainly wrong.

If you really have a valid reason to do so you need to look into "Pass Through" and manage that disk from inside the VM. This way you "see" the complete disk inside the VM. (Yes, there are reasons to do so. But this approach is not for the usual use case.)

The more common approach is to instantiate a storage pool (please in a redundant flavor, hopefully via ZFS) and give parts of it to several VMs, depending on the needs of the service inside the VM. Those virtual disk are usually "thin provisioned" which means you can assign more space to those VMs than you actually have. The different types are discussed here: https://pve.proxmox.com/pve-docs/chapter-pvesm.html

In this picture the difference between "7830" or "8000" doesn't matter at all.


Disclaimer: this post contains my opinion. As usual...
 
  • Like
Reactions: news and leesteken
I use proxmox to run different OSs at once. Im currently running a MacOS VM for my day to day and work which has its own AMD 5600 XT GPU, and its own NVME drive. Then I have a windows 10 VM with its own NVME drive and its own NVIDIA 4080, and lastly an Ubuntu VM with its own NVME drive, AND its own 2X4TB raid 0 drive for all the household self-hosting things, with another 8TB as a backup to that raid0, and finally a 24TB to back everything up. I didnt know I was supposed to just be passing these through in my case. I thought I would "lose functionality" like the drives being included in the proxmox backup.
 
I didnt know I was supposed to just be passing these through in my case. I thought I would "lose functionality" like the drives being included in the proxmox backup.
If you use PCI(e) passthrough, Proxmox cannot backup the drive. If you use drive/disk passthrough or a virtual disk, it can backup the drive/partition.

Dedicating memory, CPU, devices or drives to a single VM is contrary to the design goals of an clustered enterprise hypervisor such as Proxmox. Therefore, there are no conveniences for your use case and you have to calculate or guess the virtual disk size yourself (or use disk passthrough).

I don't expect anyone to have a script for this (as it is not that common) but maybe some home lab people have and will help you on this forum.

EDIT: I'm not 100% sure Proxmox will backup passed through disks like virtual disk. And whether or not it will restore it (as a virtual disk!). Please test this beforehand!
 
Last edited:
  • Like
Reactions: UdoB