Comments (9)
@grahampugh Thank you for the feedback.
I have been thinking of the same thing, too.
I agree with your idea, --nfs
parameter for xhyverun.sh
.
But it is not so easy to specify the mount point, because the mount script in the VM (NFS client side) has to know the mount point as well as the vmnet_export.sh
(NFS server side).
To pass the mount point to the VM, I have two options so far.
- Set the mount point as a kernel command parameter.
- Execute a mount command through SSH after booting up like Vagrant.
What do you think?
from boot2docker-xhyve.
Solution no.2 may be late for some containers which have volumes under the NFS mount.
I would choose no.1.
from boot2docker-xhyve.
Hi,
I've found that NFS mounting isn't working on external volumes (i.e. a folder in /Volumes). It might be due to the external volume having ownership disabled (as is normal for external USB disks). I haven't experimented with setting the USB disk to have ownership enabled, to see if that solves the problem. (I'm also not sure why this isn't a problem with a Vagrant Ubuntu/Centos VM, but is with boot2docker and Docker-Machine).
from boot2docker-xhyve.
@grahampugh Hi, thank you for the information.
I guess we need to modify some mount options in the startup script in the VM. Or something in the /etc/exports.
https://github.com/ailispaw/boot2docker-xhyve/blob/master/config/bootsync.sh
from boot2docker-xhyve.
Hi. Yeah perhaps. I'm afraid I don't really understand how vmnet_export.sh
and config/bootsync.sh
interact. I tried appending the following to bootsync.sh
but it didn't do anything (even if I changed the line in vmnet_export.sh
to reflect this share - and I tried it with folders on the system volume such as /Applications):
# Custom folder
source_volume="/Volumes/Images" # comment this out if you don't want an additional NFS mount
vm_mount="/Images"
if [ -z ${source_volume} ]; then
mkdir -p ${vm_mount}
umount ${vm_mount}
if [ -n "${GW_IP}" ]; then
mount_nfs -o "vers=3,noowners,nolocks,nolockd,nolock,nonlm,automounted,nosuid,hard,bg,noresvport,intr,rw,tcp,nfc" ${GW_IP}:${source_volume} ${vm_mount}
fi
fi
from boot2docker-xhyve.
I'm at AWS re:Invent. I will figure it out this weekend.
from boot2docker-xhyve.
Your /etc/exports in the host and /var/lib/boot2docker/bootsync.sh in the VM should be the followings.
/etc/exports
"/Volumes/Images" -network 192.168.64.0 -mask 255.255.255.0 -alldirs -mapall=501:20
/var/lib/boot2docker/bootsync.sh
#!/bin/sh
mkdir -p /Users
umount /Users
/usr/local/etc/init.d/nfs-client start
GW_IP=$(ip route get 8.8.8.8 | awk 'NR==1 {print $3}')
if [ -n "${GW_IP}" ]; then
mount ${GW_IP}:/Users /Users -o rw,async,noatime,rsize=32768,wsize=32768,proto=tcp
fi
# Custom folder
source_volume="/Volumes/Images" # comment this out if you don't want an additional NFS mount
vm_mount="/Images"
if [ -n "${source_volume}" ]; then
mkdir -p ${vm_mount}
umount ${vm_mount}
if [ -n "${GW_IP}" ]; then
mount ${GW_IP}:${source_volume} ${vm_mount} -o rw,async,noatime,rsize=32768,wsize=32768,proto=tcp
fi
fi
from boot2docker-xhyve.
I will keep the same UX as the original boot2docker which uses /Users
.
from boot2docker-xhyve.
I implemented this functionality at https://github.com/ailispaw/docker-root-xhyve instead.
You can use sudo ./xhyverun.sh /Volumes/Images
there.
from boot2docker-xhyve.
Related Issues (20)
- Bump boot2docker distro to 1.8.1 HOT 8
- docker-machine requires a docker host with tls support HOT 12
- Segfaults on compiling uuid2mac HOT 1
- Installing cron in boot2docker-xhyve to fix clock drift HOT 15
- Minor README revisions HOT 5
- /etc/localtime is a directory, not a file HOT 4
- Cannot connect to docker host HOT 40
- nameserver 192.168.64.1 on OSX is not working correctly HOT 22
- Add "make upgrade" HOT 3
- Running a container on startup? HOT 1
- NFS doesn't propagate the file changes? HOT 1
- How to increase the disk space? HOT 4
- Client can't connect even with env vars set correctly? HOT 9
- Will need a patch for xhyve to boot new boot2docker HOT 2
- Is there a way to increase disk space? HOT 2
- Can't boot boot2docker v1.7.1 HOT 5
- Access docker internal network HOT 10
- `docker` cli tools don't work from mac to boot2docker HOT 5
- Starting fails HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from boot2docker-xhyve.