Adding rust mounts within a VM

pickromanodd

New Member
Oct 27, 2023
1
0
1
I'm running a VM where the boot drive is on ssd's. I'd like to have one of the directories on the OS be backed by my spinning rust pool. On lxc containers I can select a storage option and a path to mount it at within the container, how would I do something similar for a VM?

I may have attempted this in the past, I see two "Unused Disk" entries under Hardware (probably qcow2). When I double click them and "Add" them as SATA drives to the VM and reboot, I see them listed with fdisk -l, but I don't know how to mount those to a directory.

I'm using ZFS if that matters. I thought there might be a fancy way to just create a new dataset and map it as a subdirectory, but maybe that's just for lxc?
 
Hi,
you were almost there. After adding the disks you have to format them from the guest system. You are adding them as "virtual" hard drives, not as a preexisting directory structure, like you do on lxc. I found a good tutorial that goes from formatting to persistently mounting [0].
Currently it's not possible to mount a host directory directly into the vm, without the use of some protocol like nfs or smb, but I think that something like that is coming in a future release

[0] https://cloud.google.com/compute/docs/disks/format-mount-disk-linux
 

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!