[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


How can I share files between an OpenVZ container and its hosts?

Posted on 2014-08-12
Medium Priority
Last Modified: 2014-09-04
I am running OpenVZ containers on a Proxmox/ Debian host.

There are some files (eg, /etc/resolv.conf) I'd like the container to use directly from the host.

So, is there some smart way to have /etc/resolv.conf on the container linked to /etc/resolv.conf on the host?

File /etc/resolv.conf on container 100 is also visible on the host as /var/lib/vz/private/100/etc/resolv.conf and /var/lib/vz/root/100/etc/resolv.conf (BTW, is there a difference?)
Question by:fibo
  • 3
LVL 20

Accepted Solution

compdigit44 earned 1000 total points
ID: 40259509
I believe the following link is what you are looking and list how to mount a host file system on the guest..

LVL 29

Author Comment

ID: 40259905
Excellent page.
Not exactly what I am looking for though: I want to link to a given file, not a complete directory.
LVL 29

Assisted Solution

fibo earned 0 total points
ID: 40295157
Results so far:
-impossible to have a "live link" to a single file, but possible at the directory level
- in the case of the ..root directory: at boot-time it is copied into the ...private directory

Closing the question
LVL 29

Author Closing Comment

ID: 40303010
Excellent and fast answer, although not completely matchjng my question

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If your vDisk VHD file gets deleted from the image store accidentally or on purpose, you won't be able to remove the vDisk from the PVS console. There is a known workaround that is solid.
In this article will go through how to backup a vPostgres DB from a broken vCenter Appliance and restore to a new vCenter Appliance.
How to install and configure Citrix XenApp 6.5 - Part 1. In this video tutorial we have explained step by step installation of Citrix XenApp 6.5 Server on Windows Server 2008 R2 is explained in this video. We have explained the difference between…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Suggested Courses

868 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question