linux ioctl 设备只读,无法在Linux guest虚拟机中挂载文件夹 - mesg:ttyname失败:设备的ioctl不合适...

Vagrant不会挂载文件夹 . 尝试了这么多解决方案,没有任何效果 .

版本:Vagrant 1.8.1 / Ubuntu 15.10 / Virtualbox 5.0.16

vagrant up

Bringing machine 'default' up with 'virtualbox' provider...

==> default: Checking if box 'ubuntu/wily64' is up to date...

==> default: Clearing any previously set forwarded ports...

==> default: Clearing any previously set network interfaces...

==> default: Preparing network interfaces based on configuration...

default: Adapter 1: nat

default: Adapter 2: hostonly

==> default: Forwarding ports...

default: 22 (guest) => 2222 (host) (adapter 1)

==> default: Running 'pre-boot' VM customizations...

==> default: Booting VM...

==> default: Waiting for machine to boot. This may take a few minutes...

default: SSH address: 127.0.0.1:2222

default: SSH username: vagrant

default: SSH auth method: private key

default: Warning: Remote connection disconnect. Retrying...

default: Warning: Remote connection disconnect. Retrying...

==> default: Machine booted and ready!

GuestAdditions 5.0.16 running --- OK.

==> default: Checking for guest additions in VM...

==> default: Configuring and enabling network interfaces...

==> default: Mounting shared folders...

default: /vagrant => C:/Users/User/www/magento-box

default: /vagrant-magento-box-folder => C:/Users/User/www/magento-box-folder

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 www-data | cut -d: -f3`,dmode=775, fmode=664 vagrant-magento-box-folder /vagrant-magento-box-folder

mount -t vboxsf -o uid=`id -u vagrant`,gid=`id -g www-data`,dmode=775, fmode=664 vagrant-magento-box-folder /vagrant-magento-box-folder

The error output from the last command was:

mesg: ttyname failed: Inappropriate ioctl for device

在Vagrantfile.config.yml同步文件夹中:

synced_folder:

host_path: "/Users/User/www/magento-box-folder"

guest_path: "/vagrant-magento-box-folder/"

Vagrantfile

require 'yaml'

vagrantConfig = YAML.load_file 'Vagrantfile.config.yml'

Vagrant.configure(2) do |config|

config.vm.box = "ubuntu/trusty64"

config.vm.network "private_network",

ip: vagrantConfig['ip']

config.vm.synced_folder "#{vagrantConfig['synced_folder']['host_path']}",

"#{vagrantConfig['synced_folder']['guest_path']}",

owner: "vagrant",

group: "www-data",

mount_options:["dmode=775, fmode=664"]

# VirtualBox specific settings

config.vm.provider "virtualbox" do |vb|

vb.gui = false

vb.memory = "2048"

vb.cpus = 2

end

在流浪汉ssh我做了

sudo ln -s /opt/VBoxGuestAdditions-5.0.16/lib/VBoxGuestAdditions /usr/lib/VBoxGuestAdditions

我在tmp中替换了VBoxGuestAdditions.iso

Copy iso fileC:\Program Files/Oracle/VirtualBox/VBoxGuestAdditions.iso into the box /tmp/VBoxGuestAdditions.iso

已安装的vbguest . 不知道如何解决它..

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值