手工为Vagrant安装VBoxGuestAdditions

问题描述

今日在启动vagrant时报错:ubuntu

==> default: Mounting shared folders...
    default: /vagrant => E:/VmWork/ubuntu14.04
Failed to mount folders in Linux guest. This is usually because
the "vboxsf" file system is not available. Please verify that
the guest additions are properly installed in the guest and
can work properly. The command attempted was:

mount -t vboxsf -o uid=`id -u vagrant`,gid=`getent group vagrant | cut -d: -f3` vagrant /vagrant
mount -t vboxsf -o uid=`id -u vagrant`,gid=`id -g vagrant` vagrant /vagrant

The error output from the last command was:

stdin: is not a tty
mount: unknown filesystem type 'vboxsf'

以下图所示:
问题截图bash

问题解决

通过上网查询,原来是没有安装VBoxGuestAdditions,下面来手工安装VitrualBox的这个加强功能:ui

中止虚拟机

使用命令vagrant halt中止已在运行的虚拟机spa

启动VirtualBox中的虚拟机

直接在VirtualBox中启动虚拟机,以下所示进行登陆:
启动并登录虚拟机vagrant

挂载并安装VBoxGuestAdditions

挂载办法以下所示:设备->安装加强功能
安装加强功能
以后使用如下命令安装VBoxGuestAdditions3d

bashsudo mount /dev/cdrom /media/cdrom
cd /media/cdrom/
sudo ./VBoxLinuxAddtions.run

安装过程以下所示:
图片描述code

以后就能够愉快地vagrant upblog

相关文章
相关标签/搜索