Hello, everyone! First-time poster here.
I'm looking to share my ZFS pool (mounted on
After some research, I decided on creating an NFS server within a CT.
As I'm learning Terraform I decided to use it to provision this CT and all my future VMs.
After I run
I've tried to create a CT without the
I'll use this post as well to ask if there are any better ideas on how to share my storage via NFS/SMB and if there are any guides available.
Thank you very much and let me know if there are any other thing that I can provide that can help you help me.
I'm looking to share my ZFS pool (mounted on
/storage
on the host) via NFS/SMB so it can be accessed in my multiple VMs.After some research, I decided on creating an NFS server within a CT.
As I'm learning Terraform I decided to use it to provision this CT and all my future VMs.
After I run
terraform init
I get a 403 Permission check failed (mount point type bind is only allowed for root@pam)
error. You can find the Terraform files and the complete error message at the end of this post.I've tried to create a CT without the
mountpoint
option and it worked fine, so I guess the API token was correctly generated. It was generated for the root@pam
user.I'll use this post as well to ask if there are any better ideas on how to share my storage via NFS/SMB and if there are any guides available.
Thank you very much and let me know if there are any other thing that I can provide that can help you help me.
Code:
terraform {
required_providers {
proxmox = {
source = "telmate/proxmox"
}
}
}
provider "proxmox" {
pm_tls_insecure = true
pm_api_url = "***"
pm_api_token_id = "***"
pm_api_token_secret = "***"
}
resource "proxmox_lxc" "file_server" {
target_node = "pve"
hostname = "lxc-file-server"
ostemplate = "local:vztmpl/ubuntu-22.04-standard_22.04-1_amd64.tar.zst"
unprivileged = true
ssh_public_keys = file("~/.ssh/id_rsa.pub")
rootfs {
storage = "local-lvm"
size = "8G"
}
mountpoint {
key = "0"
slot = 0
storage = "/storage/share"
volume = "/storage/share"
mp = "/mnt/container/share"
size = "2T"
}
network {
name = "eth0"
bridge = "vmbr0"
ip = "dhcp"
}
}
Code:
proxmox_lxc.file_server: Creating...
╷
│ Error: error creating LXC container: 403 Permission check failed (mount point type bind is only allowed for root@pam), error status: {"data":null} (params: {"arch":"amd64","cmode":"tty","console":true,"cores":1,"cpulimit":0,"cpuunits":1024,"features":"","hostname":"lxc-file-server","memory":512,"mp0":"/storage/share,size=2T,backup=0,mp=/mnt/container/share","net0":"ip=dhcp,name=eth0,bridge=vmbr0","onboot":false,"ostemplate":"local:vztmpl/ubuntu-22.04-standard_22.04-1_amd64.tar.zst","password":"qwerty","protection":false,"rootfs":"local-lvm:8","***","start":false,"storage":"local","swap":0,"tags":"","tty":2,"unprivileged":true,"vmid":100})
│
│ with proxmox_lxc.file_server,
│ on main.tf line 16, in resource "proxmox_lxc" "file_server":
│ 16: resource "proxmox_lxc" "file_server" {
│
╵