首页 > 解决方案 > 使用 Chef Test Kitchen 脚本创建 CentOS 盒子时出现问题

问题描述

我确实有这个 kitchen.yml:

driver:
  name: vagrant

provisioner:
  name: chef_solo

platforms:
  - name: centos65
    driver:
      box: learningchef/centos65
      box_url: learningchef/centos65

suites:
  - name: default
    run_list:
    attributes:

我跑:

kitchen create default-centos65

但我得到错误:

>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: 1 actions failed.
>>>>>>     Failed to complete #create action: [Expected process to exit with [0], but received '1'
---- Begin output of vagrant up --no-provision --provider virtualbox ----
STDOUT: Bringing machine 'default' up with 'virtualbox' provider...
    ...
    default: 
    default: Guest Additions Version: 4.3.20
    default: VirtualBox Version: 6.1
==> default: Setting hostname...
STDERR: The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

hostname -F /etc/hostname

Stdout from the command:



Stderr from the command:

hostname: can't open `/etc/hostname'
---- End output of vagrant up --no-provision --provider virtualbox ----
Ran vagrant up --no-provision --provider virtualbox returned 1] on default-centos65
>>>>>> ----------------------

我在我的 Windows10 笔记本电脑上运行 Vargant 和 VirtualBox。我在 stackoverflow 上也看到过类似的帖子,但我找不到解决方案。

标签: vagrantchef-infravirtualboxcentos6

解决方案


好的,做更多的研究我在这里找到了答案:

测试厨房无法安装 VirtualBox Guest Additions 4.3.28


推荐阅读