使用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上也看到过类似的帖子,但找不到解决方案。

解决方法

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

Test kitchen fails to install VirtualBox Guest Additions 4.3.28