Skip to content

Instantly share code, notes, and snippets.

@uplus
Created March 6, 2016 15:46
Show Gist options
  • Save uplus/e9c59e1fbcbca087efee to your computer and use it in GitHub Desktop.
Save uplus/e9c59e1fbcbca087efee to your computer and use it in GitHub Desktop.
virt-manager(KVM)で共有フォルダを使うには(Ubuntu15) ref: http://qiita.com/uplus_e10/items/91b64111d153fe8d7c1f
$ sudo apt-get install nfs-common nfs-kernel-server
$ sudo apt-get install nfs-common
$ cat /etc/exports
/dir/path 192.168.122.0/24(rw,sync,no_subtree_check,fsid=0)
$ sudo exportfs -rav #設定反映
$ rpcinfo -p
sudo ufw allow from 192.168.122.0/24 to any port 111
sudo ufw allow from 192.168.122.0/24 to any port 2049
sudo ufw allow from 192.168.122.0/24 to any port 48218 proto udp
sudo ufw allow from 192.168.122.0/24 to any port 38309 proto tcp
sudo ufw allow from 192.168.122.0/24 to any port 48900 proto udp
sudo ufw allow from 192.168.122.0/24 to any port 41747 proto tcp
$ showmount -e 192.168.1.2
$ sudo mount 192.168.1.2:/ /mnt
$ cat /etc/fstab
/dev/sda1 / ext4 errors=remount-ro 0 1
/dev/sda2 none swap sw 0 0
192.168.1.2:/ /mnt nfs4 rsize=8192,wsize=8192,timeo=14,_netdev 0 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment