厨房创建 new_box 命令无效
kitchen create new_box command not working
我是 运行 命令 kitchen create default-centos65
但我无法拉入盒子和提供。无论出于何种原因,它一直说 URL 路径是 file:/Users/Guest/Git/chef/kitchen/.kitchen/kitchen-vagrant/default-centos65/learningchef/centos65
。我不确定为什么它认为应该从那里而不是从 vagrantcloud.com
.
下载盒子
这是输出。
-----> Starting Kitchen (v1.3.1)
-----> Creating <default-centos65>...
Bringing machine 'default' up with 'virtualbox' provider...[default] Box 'learningchef/centos65' was not found. Fetching box from specified URL for
the provider 'virtualbox'. Note that if the URL does not have
a box for this provider, you should interrupt Vagrant now and add
the box yourself. Otherwise Vagrant will attempt to download the
full box prior to discovering this error.
Downloading box from URL: file:/Users/Guest/Git/chef/kitchen/.kitchen/kitchen-vagrant/default-centos65/learningchef/centos65
Download failed. Will try another box URL if there is one.
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.
Couldn't open file /Users/Guest/Git/chef/kitchen/.kitchen/kitchen-vagrant/default-centos65/learningchef/centos65
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: 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] Box 'learningchef/centos65' was not found. Fetching box from specified URL for
the provider 'virtualbox'. Note that if the URL does not have
a box for this provider, you should interrupt Vagrant now and add
the box yourself. Otherwise Vagrant will attempt to download the
full box prior to discovering this error.
Downloading box from URL: file:/Users/Guest/Git/chef/kitchen/.kitchen/kitchen-vagrant/default-centos65/learningchef/centos65
STDERR: Download failed. Will try another box URL if there is one.
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.
Couldn't open file /Users/Guest/Git/chef/kitchen/.kitchen/kitchen-vagrant/default-centos65/learningchef/centos65
---- End output of vagrant up --no-provision --provider=virtualbox ----
Ran vagrant up --no-provision --provider=virtualbox returned 1]
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details
>>>>>> Also try running `kitchen diagnose --all` for configuration
我的配置中是否还缺少其他内容?
这是我的 .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:
我认为 box_url
在您的 .kitchen.yml
文件中是错误的。尝试使用 https://atlas.hashicorp.com/learningchef/boxes/centos65/versions/1.0.7/providers/virtualbox.box
或在 运行 厨房 (vagrant box add learningchef/centos65
) 之前添加框。
我认为 box_url 有问题,但我在下面注意到:`
$ kitchen create default-centos65
-----> Starting Kitchen (v1.4.2)
-----> Creating <default-centos65>...
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'learningchef/centos65'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'learningchef/centos65' is up to date...
==> default: Setting the name of the VM: kitchen-kitchen-default-centos65_default_1441979206253_97174
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 22 => 2222 (adapter 1)
==> 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:
default: Vagrant insecure key detected. Vagrant will automatically replace
default: this with a newly generated keypair for better security.
default:
default: Inserting generated public key within guest...
default: Removing insecure key from the guest if it's present...
default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Setting hostname...
==> default: Machine not provisioned because `--no-provision` is specified.
[SSH] Established
Vagrant instance <default-centos65> created.
Finished creating <default-centos65> (1m3.86s).
-----> Kitchen is finished. (1m4.43s)
zlib(finalizer): the stream was freed prematurely.
我看到 "Connection timeout",在更改 .kitchen.yml 中的 box_url 设置后,我仍然得到与之前相同的结果,这是一个错误配置的 basebox。我 运行 一次成功地安装了另一个系统并找到了工作。我认为该站点有问题,或者它是我正在使用的系统上的设置 network/interface。
由于 YAML 脚本不正确,我收到了这个错误;以下是正确的。
driver:
#box: learningchef/centos65 Original wrong spaces before box
box: learningchef/centos65
box_url: learningchef/centos65
我是 运行 命令 kitchen create default-centos65
但我无法拉入盒子和提供。无论出于何种原因,它一直说 URL 路径是 file:/Users/Guest/Git/chef/kitchen/.kitchen/kitchen-vagrant/default-centos65/learningchef/centos65
。我不确定为什么它认为应该从那里而不是从 vagrantcloud.com
.
这是输出。
-----> Starting Kitchen (v1.3.1)
-----> Creating <default-centos65>...
Bringing machine 'default' up with 'virtualbox' provider...[default] Box 'learningchef/centos65' was not found. Fetching box from specified URL for
the provider 'virtualbox'. Note that if the URL does not have
a box for this provider, you should interrupt Vagrant now and add
the box yourself. Otherwise Vagrant will attempt to download the
full box prior to discovering this error.
Downloading box from URL: file:/Users/Guest/Git/chef/kitchen/.kitchen/kitchen-vagrant/default-centos65/learningchef/centos65
Download failed. Will try another box URL if there is one.
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.
Couldn't open file /Users/Guest/Git/chef/kitchen/.kitchen/kitchen-vagrant/default-centos65/learningchef/centos65
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: 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] Box 'learningchef/centos65' was not found. Fetching box from specified URL for
the provider 'virtualbox'. Note that if the URL does not have
a box for this provider, you should interrupt Vagrant now and add
the box yourself. Otherwise Vagrant will attempt to download the
full box prior to discovering this error.
Downloading box from URL: file:/Users/Guest/Git/chef/kitchen/.kitchen/kitchen-vagrant/default-centos65/learningchef/centos65
STDERR: Download failed. Will try another box URL if there is one.
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.
Couldn't open file /Users/Guest/Git/chef/kitchen/.kitchen/kitchen-vagrant/default-centos65/learningchef/centos65
---- End output of vagrant up --no-provision --provider=virtualbox ----
Ran vagrant up --no-provision --provider=virtualbox returned 1]
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details
>>>>>> Also try running `kitchen diagnose --all` for configuration
我的配置中是否还缺少其他内容?
这是我的 .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:
我认为 box_url
在您的 .kitchen.yml
文件中是错误的。尝试使用 https://atlas.hashicorp.com/learningchef/boxes/centos65/versions/1.0.7/providers/virtualbox.box
或在 运行 厨房 (vagrant box add learningchef/centos65
) 之前添加框。
我认为 box_url 有问题,但我在下面注意到:`
$ kitchen create default-centos65
-----> Starting Kitchen (v1.4.2)
-----> Creating <default-centos65>...
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'learningchef/centos65'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'learningchef/centos65' is up to date...
==> default: Setting the name of the VM: kitchen-kitchen-default-centos65_default_1441979206253_97174
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 22 => 2222 (adapter 1)
==> 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:
default: Vagrant insecure key detected. Vagrant will automatically replace
default: this with a newly generated keypair for better security.
default:
default: Inserting generated public key within guest...
default: Removing insecure key from the guest if it's present...
default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Setting hostname...
==> default: Machine not provisioned because `--no-provision` is specified.
[SSH] Established
Vagrant instance <default-centos65> created.
Finished creating <default-centos65> (1m3.86s).
-----> Kitchen is finished. (1m4.43s)
zlib(finalizer): the stream was freed prematurely.
我看到 "Connection timeout",在更改 .kitchen.yml 中的 box_url 设置后,我仍然得到与之前相同的结果,这是一个错误配置的 basebox。我 运行 一次成功地安装了另一个系统并找到了工作。我认为该站点有问题,或者它是我正在使用的系统上的设置 network/interface。
由于 YAML 脚本不正确,我收到了这个错误;以下是正确的。
driver:
#box: learningchef/centos65 Original wrong spaces before box
box: learningchef/centos65
box_url: learningchef/centos65