vagrant:无法在Linux guest虚拟机中装载文件夹,“vboxsf”文件系统不可用? [英] vagrant : Failed to mount folders in Linux guest, "vboxsf" file system is not available?

查看:530
本文介绍了vagrant:无法在Linux guest虚拟机中装载文件夹,“vboxsf”文件系统不可用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Ubuntu 14.04 64位桌面上安装了 VirtualBox 4.3.10 Vagrant 1.4.3


$ b

早些时候,曾与流浪技术合作过,但这次是多重问题。让我描述一下我做了什么


  1. 克隆私人git到本地系统 / opt / lampp / htdocs / {project

  2. root @ desktop:/ opt / lampp / htdocs / {完成项目} $ vagrant up


在终端执行时给出消息

$您的主机(4.3.10)和来宾(4.2.0)上的b
$ b


GuestAdditions 版本不匹配。

命令完成以下消息


无法在Linux guest虚拟机中安装文件夹。这通常是因为
vboxsf文件系统不可用。请确认guest
的添加已正确安装在guest虚拟机中,并且可以正常工作。
尝试的命令是:

...




  1. check vagrant vbguest --status


    GuestAdditions 4.3.10正在运行---确定。



  2. 打开浏览器并使用 http://192.168.0.33 运行(在private git repo的README.md文件中提到)但它没有工作。


    UPDATE




    1. 按建议安装 vagrant-vbguest here

      $:sudo vagrant插件安装vagrant-vbguest p>


      安装插件'vagrant-vbguest(0.10.0)'!



    通过这样做, 2. 中描述的 GuestAdditions / strong>已消失


    1. 重启 vagrant halt 然后 vagrant up




    与'virtualbox'提供商... ...
    [默认]清除任何以前设置的转发端口...

    [默认]清除任何以前设置的网络接口...

    [默认]准备网络基于配置的接口...

    [默认]转发端口...

    [默认] - 22 => 2222(适配器1)

    [默认值] - 80 => 8080(适配器1)

    [默认值]引导VM ...

    [默认值]等待机器启动。这可能需要几分钟...

    [默认]机器启动并准备好!

    GuestAdditions 4.3.10运行---确定。

    [default ]配置和启用网络接口...

    [默认]挂载共享文件夹...

    [默认] - / vagrant



    无法在Linux guest虚拟机中装入文件夹。这通常是因为vboxsf文件系统不可用。请确认客人新增内容已正确安装在客人中,并且可以正常工作。试图命令是:



      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

    是否需要更改本地 vagrantfile 中的任何内容或更改vagrant版本或其他内容?



    有人说这是一个bug ,而有些为ubuntu提供了解决方案< 14.04



    请提出解决方案提示以及如何解决此问题?

    解决方案

      vagrant插件安装vagrant-vbguest 

    对我来说效果很好(Virtual Box 5.0.22,Vagrant 1.8.4)。由于该插件下载了gcc和一系列其他工具,因此在将guest虚拟机增加.iso添加到正确的位置之前,需要花费较长时间才能提供。

    I have VirtualBox 4.3.10 and Vagrant 1.4.3 installed on my Ubuntu 14.04 64 bit Desktop.

    Earlier, worked with vagrant technology but this time, multiple issue. Let me describe what I have done

    1. clone private git to local system /opt/lampp/htdocs/{project} : done

    2. root@desktop:/opt/lampp/htdocs/{project}$ vagrant up

    gives message on terminal while execution

    GuestAdditions versions on your host (4.3.10) and guest (4.2.0) do not match.

    command completed with below message

    Failed to mount folders in Linux guest. This is usually beacuse 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:

    ...

    I understand this is version difference.

    1. check vagrant vbguest --status

      GuestAdditions 4.3.10 running --- OK.

    2. Open browser and run with http://192.168.0.33 (mentioned on README.md file of private git repo) but it didn't work.

    UPDATE

    1. Installed vagrant-vbguest as suggested here

      $:sudo vagrant plugin install vagrant-vbguest

      Installed the plugin 'vagrant-vbguest (0.10.0)'!

    By doing this,message of version difference of GuestAdditions described in 2. is gone

    1. restart vagrant halt and then vagrant up

    Bringing machine 'default' up with 'virtualbox' provider...
    [default] Clearing any previously set forwarded ports...
    [default] Clearing any previously set network interfaces...
    [default] Preparing network interfaces based on configuration...
    [default] Forwarding ports...
    [default] -- 22 => 2222 (adapter 1)
    [default] -- 80 => 8080 (adapter 1)
    [default] Booting VM...
    [default] Waiting for machine to boot. This may take a few minutes...
    [default] Machine booted and ready!
    GuestAdditions 4.3.10 running --- OK.
    [default] Configuring and enabling network interfaces...
    [default] Mounting shared folders...
    [default] -- /vagrant

    Failed to mount folders in Linux guest. This is usually beacuse 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
    

    Do I need to change anything in local vagrantfile or change vagrant version or something else?

    Some say it is a bug whilesome gives solution for ubuntu < 14.04

    Kindly suggest the solution hints and how to fix this issue?

    解决方案

     vagrant plugin install vagrant-vbguest
    

    worked well for me (Virtual Box 5.0.22, Vagrant 1.8.4). It took muck longer to provision initially because the plugin downloaded gcc and a bunch of other tools before linking the guest additions .iso to the correct place.

    这篇关于vagrant:无法在Linux guest虚拟机中装载文件夹,“vboxsf”文件系统不可用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆