Notes:

  • This must be run on hardware node (host)
  • Replace 102 with your container ID (Id of virtual machine)
  • Create /common-stuff folder in VM before restarting
 vi /etc/vz/conf/102.mount

paste:

#!/bin/bash
source /etc/vz/vz.conf
source ${VE_CONFFILE}
mount -n --bind /common-stuff ${VE_ROOT}/common-stuff
 chmod +x /etc/vz/conf/102.mount

Restart VM

Sources:

  • http://wiki.openvz.org/Bind_mounts
  • http://serverfault.com/questions/241966/openvz-share-a-folder-between-containers
  • http://forum.openvz.org/index.php?t=msg&goto=42129&

Comments

comments