GithubHelp home page GithubHelp logo

mount host machine folder about xhyve HOT 10 OPEN

machyve avatar machyve commented on August 15, 2024 1
mount host machine folder

from xhyve.

Comments (10)

colby-swandale avatar colby-swandale commented on August 15, 2024

you could use a nfs mount.

from xhyve.

gregory avatar gregory commented on August 15, 2024

could you give more details @colby-swandale

from xhyve.

colby-swandale avatar colby-swandale commented on August 15, 2024

@gregory there are literally thousands of posts on how to do this.

from xhyve.

gregory avatar gregory commented on August 15, 2024

oh sorry. i thought you meant a clean way to do it.... dont want to setup nfs server just for that :(
i used nfs at the very beginning when guest addition was not in boot2docker yet. thx though

from xhyve.

huytd avatar huytd commented on August 15, 2024

yes, I'm looking for something like shared folder in VirtualBox with xhyve :D is there any way to do that?

from xhyve.

huytd avatar huytd commented on August 15, 2024

OK, Thank to @colby-swandale
Running NFS server is not a big deal, it's very simple with just 1 command line.
Here is the detailed note on how to mount host machine folder:

Host: Mac OS X
Client: TinyCore

Step 1: Enable network in xhyverun

If you are using xhyverun.sh to boot the TinyCore, just delete the comment character (#) before NET config

# NET="-s 2:0,virtio-net"

to

NET="-s 2:0,virtio-net"

Start the TinyCore VM with sudo:

sudo ./xhyverun.sh

Step 2: Setup NFS Server on Host

  • Create /etc/exports file
sudo touch /etc/exports
sudo vi /etc/exports
  • Config the Exports file with the following syntax:
/Folder/on/host -mapall=501

Each folder in a line. The mapall parameter indicate the ID of user that have permission to access that host folder.
To find your user ID, type:

id

This is important unless you want to get Connection refused error when mounting from client.

For example, this is my /etc/exports file:

/Users/huy/Shared -mapall=501

Step 3: Start and check NFS Server

  • Start the NFS server with the following command:
sudo nfsd start

or restart it if it already started.

sudo nfsd restart
  • Check the shared folder with the following command:
showmount -e

Your shared folder should displayed.

Step 4: Mount the host folder on guest machine

In TinyCore guest, create a folder somewhere to access the shared folder, for example:

mkdir ~/shared

Mount the host folder with the following command:

sudo mount -o nolock <host-ip>:/Users/huy/Shared/ ~/shared

Done!

from xhyve.

xez avatar xez commented on August 15, 2024

It would be cool if bhyve/xhyve had an implementation of VirtFS/virtio-9p as a much more efficient way to support shared folders. u9fs might be a good starting point for a VirtIO implementation and seems to be license compatible.

from xhyve.

stv0g avatar stv0g commented on August 15, 2024

There's a fork which implements virtio-9p here: https://github.com/jceel/xhyve

UPDATE: Also have a look at #70. I successfully rebased it against the latest version and I am pretty happy with it stv0g/xyhve@virtio-9p

from xhyve.

mauron85 avatar mauron85 commented on August 15, 2024

Probably no news for most of you, but you could use https://syncthing.net/. Using it with alpine linux and OSX. Very easy to setup if you don't mind syncing is not instant thing.

from xhyve.

xpepermint avatar xpepermint commented on August 15, 2024

Status?

from xhyve.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.