测试厨房无法安装VirtualBox Guest Additions 4.3.28 [英] Test kitchen fails to install VirtualBox Guest Additions 4.3.28

查看:80
本文介绍了测试厨房无法安装VirtualBox Guest Additions 4.3.28的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用厨房创建同步文件夹时遇到了麻烦.最新版本的Virtualbox Guest Additions(2.3.8)似乎有问题

I'm having trouble creating a synced folder using kitchen. Seems like something is wrong with the latest version of Virtualbox Guest Additions (2.3.8)

运行后:

$ kitchen converge

我明白了:

Downloading VirtualBox Guest Additions ISO from http://download.virtualbox.org/virtualbox/4.3.28/VBoxGuestAdditions_4.3.28.iso
Copy iso file /home/rocker/.vagrant.d/tmp/VBoxGuestAdditions_4.3.28.iso into the box /tmp/VBoxGuestAdditions.iso
mount: /dev/loop0 is write-protected, mounting read-only
Installing Virtualbox Guest Additions 4.3.28 - guest version is 4.3.20
Verifying archive integrity... All good.
Uncompressing VirtualBox 4.3.28 Guest Additions for Linux............
VirtualBox Guest Additions installer
Removing installed version 4.3.20 of VirtualBox Guest Additions...
Copying additional installer modules ...
Installing additional modules ...
Removing existing VirtualBox non-DKMS kernel modules[  OK  ]
Building the VirtualBox Guest Additions kernel modules
Building the main Guest Additions module[FAILED]
(Look at /var/log/vboxadd-install.log to find out what went wrong)
Doing non-kernel setup of the Guest Additions[  OK  ]
Installing the Window System drivers
Could not find the X.Org or XFree86 Window System, skipping.
An error occurred during installation of VirtualBox Guest Additions 4.3.28. Some functionality may not work as intended.
In most cases it is OK that the "Window System drivers" installation failed.
Cleaning up downloaded VirtualBox Guest Additions ISO...
Restarting VM to apply changes...
==> default: Attempting graceful shutdown of VM...
==> 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: Connection timeout. Retrying...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Setting hostname...
==> default: Configuring and enabling network interfaces...
==> default: Mounting shared folders...
    default: /home/vagrant/sync => /home/rocker/environments/chef-repo/mediacenter/data
STDERR: 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` home_vagrant_sync /home/vagrant/sync
mount -t vboxsf -o uid=`id -u vagrant`,gid=`id -g vagrant` home_vagrant_sync /home/vagrant/sync

这是我的.kitchen.yml

Here is my .kitchen.yml

---
driver:
    name: vagrant
    synced_folders:
        - ["data", "/home/vagrant/sync"]

provisioner:
    name: chef_solo
    cookbooks_path: "/home/rocker/environments/chef-repo/cookbooks"

platforms:
    - name: cento7
      driver:
        box: centos7
        box_url: http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_centos-7.0_chef-provisionerless.box
        network:
        - ["private_network", {ip: "192.168.38.34"}]
        customize:
            memory: 1536

suites:
    - name: server
      run_list:
        - recipe[chef-server::default]
      attributes:

如果我删除此部分:

synced_folders:
    - ["data", "/home/vagrant/sync"]

VirtualBox Guest Additions仍然失败,但是并没有停止聚合过程.

the VirtualBox Guest Additions still fails, but it doesn't stop the converge processes.

如果我使用learningchef centos 6.5图像框,也会发生同样的事情:

Same thing happens if I use the learningchef centos 6.5 image box:

    box: learningchef/centos65
    box_url: learningchef/centos65

我已经在网上进行了一些研究,似乎可以解决许多使用该问题的人的问题:

I've done some research online and it seems to solve the problem for a lot of people that use:

$ vagrant plugin install vagrant-vbguest

因此,请安装Vagrant Virtualbox来宾插件.我可以以某种方式将其插入测试厨房的生命周期中,而不要手动执行此操作吗?

So installing the Vagrant Virtualbox guest plugin. Can I somehow plug it in the test kitchen lifecycle and not do this step by hand?

另外,生成的Vagrantfile如下所示:

Also, the generated Vagrantfile looks like this:

Vagrant.configure("2") do |c|
  c.berkshelf.enabled = false if Vagrant.has_plugin?("vagrant-berkshelf")
  c.vm.box = "centos7"
  c.vm.box_url = "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_centos-7.0_chef-provisionerless.box"
  c.vm.hostname = "server-cento7"
  c.vm.network(:private_network, {:ip=>"192.168.38.34"})
  c.vm.synced_folder ".", "/vagrant", disabled: true
  c.vm.synced_folder "/home/rocker/environments/chef-repo/mediacenter/data", "/home/vagrant/sync", nil
  c.vm.provider :virtualbox do |p|
    p.customize ["modifyvm", :id, "--memory", "1536"]
  end
end

任何建议都值得赞赏.

推荐答案

您可以通过简单地使用一个已安装来宾添加项的框来完全避免此问题.您可以在此处浏览第三方盒.可能会有一种可以使用的方式.

You can avoid this problem altogether by simply using a box with guest additions already installed. You can browse 3rd party boxes here. Chances are there will be one which you can use.

此外,流浪者插件是全球性的,因此一旦安装它,就无需为同一台计算机上的其他项目再次这样做.

Also, vagrant plugins are global so once you've installed it you won't need to do so again for other projects on the same machine.

(从评论升级为答案)

这篇关于测试厨房无法安装VirtualBox Guest Additions 4.3.28的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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