Connecting to server from container?

strandvaskeren

Active Member
May 7, 2017
13
2
43
55
My setup:

A storage server running ubuntu server, no virtualization.
A second server used for virtualization, running proxmox.

Until recently I've mainly been using the VM part of proxmox, installing full ubuntu server 16.04 servers inside VM's - works fine, but is a bit wasteful.

So recently I started fiddling with CT's instead, but I can't get CT's to mount folders on my storage server.

I just created a VM called testvm, installed a full ubuntu server 16.04, did the apt-get update and apt-get upgrade, did a apt-get install nfs-common, and mounted /mnt/storagedata to 10.1.0.20:/mnt/data (the first data volume on my storage server). Worked perfectly.

Then I created a CT called testct, used the ubuntu server 16.04 template, did the apt-get update and apt-get upgrade, did a apt-get install nfs-common, and tried to mount /mnt/storagedata to 10.1.0.20:/mnt/data and got a mount.nfs: access denied by server while mounting 10.1.0.20:/mnt/data.

Basically I did exactly the same on the VM and the CT, but for some reason the CT won't connect to my storage server while the VM will. Both the VM and the CT responds exactly the same to a showmount and both have ip's in the proper range.

thomas@testct:/mnt$ showmount -e 10.1.0.20
Export list for 10.1.0.20:
/mnt/data2 10.1.0.0/255.255.255.0
/mnt/data4 10.1.0.0/255.255.255.0
/mnt/data3 10.1.0.0/255.255.255.0
/mnt/data1 10.1.0.0/255.255.255.0
/mnt/data 10.1.0.0/255.255.255.0

I'm a bit puzzled and open to suggestions. I need my virtual servers to be able to store files on my storage server.
 
Hmm, okay, at least that explains why I can't get it to work.

It's a bit odd to be honest, if it's about security, shouldn't mounting from inside a full VM be disabled too then?

Thanks for the answer, by the way..
 
So if I connect to the nfs volume from the host itself, will I be able to use that connection from inside the CT's?
 

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!