3

问题描述

今日在启动vagrant时报错:

==> 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'

如下图所示:
问题截图

问题解决

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

停止虚拟机

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

启动VirtualBox中的虚拟机

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

挂载并安装VBoxGuestAdditions

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

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

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

之后就可以愉快地vagrant up


glc400
258 声望6 粉丝

引用和评论

1 篇内容引用
0 条评论