...
Code Block | ||
---|---|---|
| ||
ssh-keygen -R remote-server-name-here |
Share Folders with Host
... (this will be moved into a separate article)
Warning |
---|
Crap... I got this working late one night and don't remember the steps now.... below steps are not quite correct... will have to reverse engineer what I got working... Think basic steps are,
|
In this example, we want to mount a shared directory from the host system to be accessible to one or more containers,
Panel |
---|
host directory = /opt/lxc/confluenceshared-share-datafor-my-container/movies the container, the directory = /opt/mount-host/movies |
You may actually use the same directory name and path for both host and container, but I have kept them different for clarity.
While in the lxc container, create your directory and setup any permission you may want to set and shutdown the container,
Code Block | ||
---|---|---|
| ||
cd /opt sudo mkdir mount-host sudo chown serveradmin:staff # make accessible to the serveradmin user and staff group sudo shutdown -h now # shutdown the container |
In the host either create the folder (you may use any user because root is the process accessing), but I use sudo. Note the folder you choose may also be a mount over a network share.
From the host modify the config files. In this example it is /var/lib/lxc/my-container/config and add the following line,
...