Previous page

Next page

Locate page in Contents

Print this page

Sharing Directories between Hardware Node and Containers

Warning: In this case file locking is a standard mechanism handled by kernel. If the file locking configuration is changed, it will affect the whole Hardware Node.

To share a directory on the hardware node with a Container, use the vzctl set --bindmount_add command. For example, to share the directory /home/shared located on the hardware node with Container 101, do the following:

  1. Stop the Container if required.
  2. Specify the directory to share. For example:

    # vzctl set 101 --bindmount_add /home/shared:/mnt/shared --save

When you next start the Container, the shared directory will appear as /mnt/shared.

To remove the share, use the following command:

# vzctl set 101 --bindmount_del /mnt/shared --save