Is that possible to let a VM and a Container share storage?

kamanwu

New Member
May 7, 2023
12
0
1
On PVE host, I have a zpool (tank).
I have a container (105) use a dataset in this zpool. (proxmox create one for me: tank/subvol-105-disk-0)
I have another VM (106) use a dataset in this zpool. (proxmox create one for me: tank/vm-106-disk-0)

Is that possible to create a dataset in this zpool to let both 105 and 106 can access it, and share data?

Thanks.
 
This is not possible in the sense you want to do it, the lxc Container uses the hosts kernel to access a filesystem on the host.
The vm uses a disk image on a zvol, accessed by the kernel inside the vm.

You can however use any network Filesystem technique you like to provide a shared storage, i.e. a network share.
You can host this share on the proxmox host, in a separate vm or lxc or in either your existing lxc or vm.
 
  • Like
Reactions: UdoB
This is not possible in the sense you want to do it, the lxc Container uses the hosts kernel to access a filesystem on the host.
The vm uses a disk image on a zvol, accessed by the kernel inside the vm.

You can however use any network Filesystem technique you like to provide a shared storage, i.e. a network share.
You can host this share on the proxmox host, in a separate vm or lxc or in either your existing lxc or vm.

Thanks for letting me know. I decided to dockerized my application running inside container (105), and run it on my VM (106). So I can get rid of the container (105)
 

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!