VirtualBox Guest Additionsをインストールする
概要
VirtualBox Guest AdditionsはゲストOS側でインストールするもので、これでゲストOSとホストOS間のファイルの共有やクリップボードの共有などができるようになる。
ここでは、ゲストOSがSlackware Linux 14.1環境でVirtualBox Guest Additionsをインストールした。
方法は[1]を参考にした。
方法
http://download.virtualbox.org/virtualbox/ より、使用中のVirtualBoxのバージョンのフォルダへ行って、VBoxGuestAdditions_<version>.isoをダウンロードする。 私の場合はVBoxGuestAdditions_4.3.10.isoをダウンロードした。
VirtualBoxでGuest AdditionsをインストールしたいゲストOSを起動し、メニューのデバイス->仮想CD/DVDディスクファイルの選択でダウンロードしたVBoxGuestAdditions_<version>.isoを選択する。
ゲストOSでCD/DVDをマウントする。
% su - # mount /dev/sr0 /mnt/cdrom
CD/DVDのディレクトリへ移動し、スーパーユーザ権限で./VBoxLinuxAdditions.runを実行。
# cd /mnt/cdrom # sh ./VBoxLinuxAdditions.run
再起動
# reboot
Slackware環境下では、次の3つの起動スクリプト:
/etc/rc.d/rc.vboxadd /etc/rc.d/rc.vboxadd-service /etc/rc.d/rc.vboxadd-x11
が追加され、/etc/rc.d/rc.localへ次の内容が追加されていた:
# Start vboxadd # If you do not wish this to be executed here then comment it out, # and the installer will skip it next time. if [ -x /etc/rc.d/rc.vboxadd ]; then /etc/rc.d/rc.vboxadd start fi # Start vboxadd-service # If you do not wish this to be executed here then comment it out, # and the installer will skip it next time. if [ -x /etc/rc.d/rc.vboxadd-service ]; then /etc/rc.d/rc.vboxadd-service start fi # Start vboxadd-x11 # If you do not wish this to be executed here then comment it out, # and the installer will skip it next time. if [ -x /etc/rc.d/rc.vboxadd-x11 ]; then /etc/rc.d/rc.vboxadd-x11 start fi
共有フォルダをマウントする
デバイス -> 共有フォルダ設定でホストOSのマウントしたいフォルダを追加する。
ゲストOSでマウントするには、
mount -t vboxsf <shared_folder_name> <mount-point>
とする。
References
- ↑ [SOLVED] VirtualBox guest additions for init 3 Slackware guest? http://www.linuxquestions.org/questions/slackware-14/virtualbox-guest-additions-for-init-3-slackware-guest-4175464672/