Quantcast
Channel: openSUSE Forums
Viewing all articles
Browse latest Browse all 40713

Mounting a Host Directory in LXC - (Sharing a directory between Host and Guest)

$
0
0
New addition to my openSUSE wiki describing

LXC (Linux Containers)
Probably the best method for mounting a Host directory into a Container (Guest).
https://en.opensuse.org/User:Tsu2/LX...ared_directory

Although there are many ways described how to share a directory, this method avoids cluttering your Guests with internal config files.
This method only requires the Container to be configured with a directory as a mount point. Everything else happens outside the Guest.

Describes
Setting up the shared directory on the Host. This directory can then be used not only as a shared FS directory in any number of Containers, it can be accessed by libvirt Guests using another of my Wiki pages (https://en.opensuse.org/User:Tsu2/virtfs#Overview), for example running KVM or Xen guests simultaneously as well.

Setting up the Container config file.

If you're running LXC possibly with Xen or KVM, enjoy!

TSU

PS.
For any LXC users, it looks like SUSE Documentation just posted a new "How To" which looks mostly OK...
https://www.suse.com/documentation/s...uickstart.html
Some minor corrections need to be made, but is a good start for anyone new to LXC... Except! - In my own LXC how-to (which itself sorely needs updating) I highly recommend replacing the conventional steps to create a bridge (br0) in YAST with what I feel is a far superior path using libvirt (vm manager) (typically virbr0).

Viewing all articles
Browse latest Browse all 40713

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>