vagrant - 使用 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 上也看到过类似的帖子,但我找不到解决方案。
解决方案
好的,做更多的研究我在这里找到了答案:
推荐阅读
- ios - 如果firebase用户已经存在并且已登录,如何在应用程序启动时签入AppDelegate?
- html - 在角度应用管道后如何获得结果数组?
- c - 使用 extern 来指代非静态内联函数的实例化
- excel - 使用 #N/A 将 csv 导入 Excel
- c# - 如何使鼠标滚轮成为 UWP 中用户交互的主要来源?
- angular - Angular:HttpClient 服务和 Observable 自定义类型
- sql-server - 如何使用 pypyodbc 对 SQL Server 进行游标查询
- java - 首次启动时显示指令弹出窗口
- xml - 通过模式进行 XML 验证
- naming - 如何命名同一事物的两个类,一个复数和一个单数