虚拟机在非windows 下共享文件是个大问题。
不过在linux 挂载nfs倒是很方便。
服务端:
yum install nfs-utils rpcbind
编辑/etc/exports
/home *(rw,insecure,sync,no_root_squash)
几个参数 /home 共享的文件夹,* 允许挂载的ip ,rw 允许读写,insecure 允许使用小于1000的端口进行挂载,sync 同步的方式。
exportfs -a
可以使用
showmount -e 127.0.0.1
来查看共享的文件夹
客户端:
yum install nfs-common
挂载:
mount -t nfs 192.168.1.1:/home /mnt
从左到右依次是,远程IP,目录 ,本地目录