2018년 2월 14일 수요일

Mounting Virtual Box sharedFolder on Ubuntu 16.04

1. Install VBoxGuestAdditions.iso
# apt-get install virtualbox-guest-additions-iso
# mkdir -p /media/iso
# mount /usr/share/virtualbox/VBoxGuestAdditions.iso /media/iso/
# sh /media/iso/VBoxLinuxAdditions.run

2. set sharedFolder on VirtualBox
VirtualBox - Setting - Shared Folders - adds new shared folder

In this case, I set folder named 'hostFolder' on hostOS


3. manual mount
# mkdir /share
# mount -t vboxsf hostFolder /share

4. set auto mount on boot
You should uncheck Auto-mount option in VirtualBox's setting.
# vi /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
...
/dev/mapper/ubuntu--vg-swap_1 none            swap    sw              0       0

# append below code
# mount sharedFolder on boot
hostFolder /share vboxsf defaults 0 0

# vi /etc/modules
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.

# append below code
# mount sharedFolder on boot
vboxsf

# reboot

댓글 없음:

댓글 쓰기