{"id":327,"date":"2012-01-06T13:36:47","date_gmt":"2012-01-06T18:36:47","guid":{"rendered":"http:\/\/www.ryanbelanger.com\/?p=327"},"modified":"2012-01-06T13:36:47","modified_gmt":"2012-01-06T18:36:47","slug":"openvz-proxmox-how-to-share-folders-between-vms-or-between-host-and-vm","status":"publish","type":"post","link":"https:\/\/ryanbelanger.com\/?p=327","title":{"rendered":"OpenVZ \/ Proxmox &#8211; How to share folders between VMs or between Host and VM"},"content":{"rendered":"<p>Notes:<\/p>\n<ul>\n<li>This must be run on hardware node (host)<\/li>\n<li>Replace 102 with your container ID (Id of virtual machine)<\/li>\n<li>Create \/common-stuff folder in VM before restarting<\/li>\n<\/ul>\n<pre>\u00a0vi \/etc\/vz\/conf\/102.mount<\/pre>\n<p>paste:<\/p>\n<pre>#!\/bin\/bash\nsource \/etc\/vz\/vz.conf\nsource ${VE_CONFFILE}\nmount -n --bind \/common-stuff ${VE_ROOT}\/common-stuff<\/pre>\n<pre>\u00a0chmod +x \/etc\/vz\/conf\/102.mount<\/pre>\n<p>Restart VM<\/p>\n<p>Sources:<\/p>\n<ul>\n<li><a href=\"http:\/\/wiki.openvz.org\/Bind_mounts\">http:\/\/wiki.openvz.org\/Bind_mounts<\/a><\/li>\n<li><a href=\"http:\/\/serverfault.com\/questions\/241966\/openvz-share-a-folder-between-containers\">http:\/\/serverfault.com\/questions\/241966\/openvz-share-a-folder-between-containers<\/a><\/li>\n<li><a href=\"http:\/\/forum.openvz.org\/index.php?t=msg&amp;goto=42129&amp;\">http:\/\/forum.openvz.org\/index.php?t=msg&amp;goto=42129&amp;<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>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 \u00a0vi \/etc\/vz\/conf\/102.mount paste: #!\/bin\/bash source \/etc\/vz\/vz.conf source ${VE_CONFFILE} mount -n &#8211;bind \/common-stuff ${VE_ROOT}\/common-stuff \u00a0chmod +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&amp;goto=42129&amp;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-327","post","type-post","status-publish","format-standard","hentry","category-tips"],"_links":{"self":[{"href":"https:\/\/ryanbelanger.com\/index.php?rest_route=\/wp\/v2\/posts\/327","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ryanbelanger.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ryanbelanger.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ryanbelanger.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ryanbelanger.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=327"}],"version-history":[{"count":0,"href":"https:\/\/ryanbelanger.com\/index.php?rest_route=\/wp\/v2\/posts\/327\/revisions"}],"wp:attachment":[{"href":"https:\/\/ryanbelanger.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=327"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ryanbelanger.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=327"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ryanbelanger.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=327"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}