passthrough 1 x NVMe drive to Virutal Machine & LXC CT Container

pkr

New Member
Aug 22, 2023
26
1
3
context:
- i managed to successfully passthrough 1 x NVMe drive to both:
- Virtual Machine (VM) running Ubuntu 22.04
- LXC Container (CT) running Ubuntu 22.04
- am able to create & view files via VM & CT individually
- but unable to see each other files

i.e.
a. when i create files via VM, i am unable to see them via CT
b. when i create files via CT, i am unable to see them via VM
c. however, for files created via CT, am able to see them via PVE Host

please help
 
Do you make sure not to run the CT and the VM at the same time?
Drives, filesystems and operating systems are not designed for sharing (virtual or physical) drives and cache and change data without informing the other and is a sure way to lose data. If you want to share data between VMs and the Proxmox host (and/or containers running on the host), you need something designed for that like NFS or Samba.
You can share data between containers because they share the ({Proxmox host) kernel and operating system. This does not work that way with VMs.
 
  • Like
Reactions: pkr
thank you @leesteken for taking the time to read and answer my question
essentially, i want to move some of the files from VM-301 to CT-201
once the files are moved over, that NVMe drive will be dedicated to CT-201

the more i research, looks like, it might be a good idea to learn more about how to setup NFS or Samba using a container -- is one better than the other ?!
 

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!