VirtualBoxの共有フォルダをマウントさせる

電脳備忘録
仮想サーバからファイルサーバへ接続できるように設定したときの備忘録

VirtualBoxのメニューから「デバイス」ー「共有フォルダ」を選択し、共有フォルダにファイルサーバを指定して設定しました。このときファイルサーバのディレクトリ名はFilreServerです。

今度はゲスト側の設定を行います。 FileServerというディレクトリを作ります。
# mkdir /mnt/FileServer
VirtualBoxの共有フォルダFileServerを先ほど作った/mnt/FileServerにマウントします。
# mount -t vboxsf FileServer /mnt/FileServer
起動時に共有フォルダをマウントするように設定します。
# vi /etc/rc.local
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
touch /var/lock/subsys/local
#共有フォルダへのマウント
mount -t vboxsf FileServer /mnt/FileServer
/mnt/FileServeディレクトリを開くとファイルサーバの中身を見ることができましたとさ...。

広告

ブログの維持費に充てるでございます・・・。