‘vagrant up’ fails to mount linked directory /vagrant

偶然出现错误:

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:

/sbin/mount.vboxsf: mounting failed with the error: No such device
[[email protected] ~]# yum update -y
[[email protected] ~]# yum install kernel-devel-$(uname -r) kernel-headers-$(uname -r) dkms -y

#再來就是安裝 VirtualBox Guest Additions kernel modules

[[email protected] ~]# /etc/init.d/vboxadd setup
Removing existing VirtualBox DKMS kernel modules           [  OK  ]
Removing existing VirtualBox non-DKMS kernel modules       [  OK  ]
Building the VirtualBox Guest Additions kernel modules     [  OK  ]
Doing non-kernel setup of the Guest Additions              [  OK  ]
Starting the VirtualBox Guest Additions                    [  OK  ]

[[email protected] ~]#

再來就可以重新啟動 Guest OS 確認啟動過程,應該就可以正常掛載 /vagrant 目錄了。

$ vagrant reload
时间: 2024-08-02 18:16:31

‘vagrant up’ fails to mount linked directory /vagrant的相关文章

Using sshfs to mount remote directory

*/--> Using sshfs to mount remote directory I am working on different locations, but I do not want to copy all the files from one computer to another, the simplest way to avoid the trouble of duplicating files are using sshfs. In order to make sshfs

Vagrant挂载目录失败mount: unknown filesystem type ‘vboxsf’

一.背景 ? 最近在玩Mac OS下的虚拟机,然后有朋友推荐了我Vagrant,但是在设置完跟宿主机共享目录然后启动虚拟机的时候,出现了vagrant mount: unknown filesystem type 'vboxsf'问题,而且网上的解决访问在我的电脑上不适用,折腾了很久才解决,所以记录一下,以便能帮到遇到同样问题的小伙伴. 错误如下: 二.解决思路及步骤 ? 遇见这个,感觉瞬间懵逼.不过好在理智控制住了我,我就去网上查呀查,知道了原因是要先安装virtualbox guest ad

Vagrant Up and Running

目录 Install Vagrant Installing Vagrant Verifying the Installation Project Setup Box Up And SSH Synced Folders Provisioning Installing Apache Provision! Networking Port Forwarding Teardown Rebuild Install xfce and virtualbox additions Install Vagrant I

使用 Vagrant + VirtualBox 快速构建 CentOS 下的 Docker 环境

Vagrant - 基础概念: Vagrant 是什么? Vagrant是一款用于在单个工作流程中构建和管理虚拟机环境的工具.凭借易于使用的工作流程和专注于自动化,Vagrant降低了开发环境设置时间,提高了开发效率. Vagrant 是构建在虚拟化技术之上的虚拟机运行环境管理工具: 建立和删除虚拟机 配置虚拟机运行参数 管理虚拟机运行状态 自动化配置和安装开发环境 打包和分发虚拟机运行环境 Vagrant的适用范围 开发 测试 参考:https://www.vagrantup.com/intr

Vagrant常用命令

Vagrant常用命令 Vagrant的几个命令: vagrant box add 添加box的操作 vagrant init 初始化box的操作 vagrant up 启动虚拟机的操作 vagrant ssh 登录拟机的操作 Vagrant还包括如下一些操作: vagrant box list 显示当前已经添加的box列表 $ vagrant box list base (virtualbox) vagrant box remove 删除相应的box $ vagrant box remove

vagrant使用简介

前言 Vagrant是什么? ?????是一款用来构建虚拟开发环境的工具,它底层支持VirtualBox.VMware甚至AWS作为虚拟机系统. Vagrant能做什么? 统一开发环境.一次配置打包,统一分发给团队成员,统一团队开发环境,解决诸如"编码问题","缺少模块","配置文件不同"带来的问题: 避免重复搭建开发环境.新员工加入,不用浪费时间搭建开发环境,快速加入开发,减少时间成本的浪费: 多个相互隔离开发环境.可以在不用box里跑不同的语

使用 Vagrant 构建开发环境

摘要:本文描述了如使用 Vagrant 构建统一的开发环境. 问题 作为开发人员,我们通常面临的问题有: 开发环境需要手工安装配置,这包括操作系统(CentOS.Ubuntu).PHP/HHVM.Python.Node.js.MySQL.Apache/Nginx等的版本和配置. 无法重现问题.甲:你说的问题,怎么在我的机器上没事儿啊?乙:可问题的确存在,不信你到我的机器上来看.甲:那我的机器和你的环境哪里不同呢?因为环境不同,比如开发环境和生产环境不同,和测试环境也不完全相同. 团队中没有统一的

用 vagrant 实现虚拟开发环境的快速部署

Vagrant Introduction Vagrantprovides easy to configure, reproducible, and portable work environments builton top of industry-standard technology and controlled by a single consistentworkflow to help maximize the productivity and flexibility of you an

vagrant在windows下的使用

vagrant在windows下的使用 下载安装 VirtualBox :https://www.virtualbox.org/ 下载安装 Vagrant :http://www.vagrantup.com/ 下载需要使用的 box : 添加box 如下添加一个debian的box E:\ubuntu\vagrant-box-ngixn-php-fpm-mysql-redis-nodejs>vagrant box add debian p ackage.box ==> box: Adding