Tuesday, October 6, 2015

[メモ] OS XのホストからVMにnfsでファイル共有

普段OS X上で作業しつつ、開発ディレクトリをOS X上のVMで動いているLinuxやFreeBSDからもアクセスできるようにしてあると、互換性検証がはかどる。

どう設定するか、備忘録をかねてメモ。

1. ゲスト側で通常使用するアカウントのuser-id,group-idを、OS Xのそれに揃える

2. OS Xの/etc/exportsと/etc/nfs.confを以下のように、TCP経由でVMの仮想ネットワークにだけファイルを公開するよう設定
/etc/exports:
/shared-dir -mapall=user:group -network netaddr -mask netmask

/etc/nfs.conf:
nfs.server.udp=0
nfs.server.tcp=1
3. ゲスト側の/etc/fstabにマウント情報を設定
192.168.140.1:/shared-dir /shared-dir nfs rw,noatime 1 0
これで、ホストでも、どのVMでも、/shared-dirの中身が同じになる。

注. VMware Fusion 10の場合は、環境設定から、新しいネットワークを作成し、「NATを使用する」を外し、そのネットワークを使う必要がある。そうしない限り、ホストに見えるTCPのソースアドレスがローカルネットワークのものにならない。

できるだけ単純に構成しようとすると、こんな感じになるかな、と。設定に問題があるようだったら教えてください。

8 comments:

  1. All you need to know with these problems or if you wish to learn more about these high end problems of designing games for the Android phone are GLSurfaceView ATITC compression, VBO's and there buffers (which are responsible and great for giving feedback when a game crashes because you can trackback the results of the crash when you report it to Google. Togel Singapore

    ReplyDelete
  2. And when you get released, you can do more crimes as well, with the same results. Imagine doing that stuff in real life. Bandar Q

    ReplyDelete
  3. https://eunblocked.com/run-3 online titles have recently become a huge business with companies like Zynga creating huge hits like FarmVille and Mafia Wars.

    ReplyDelete
  4. Business has not been benevolent to them either.There has been an ascent in the quantity of individuals searching for approaches to address their monetary needs without the assistance of these money related establishments and new openings for work.online car title loans chicago

    ReplyDelete
  5. This comment has been removed by the author.

    ReplyDelete

Note: Only a member of this blog may post a comment.