我新来testing厨房的窗户
我正在使用Test Vagrant(virtualbox)testingWindows机器上的厨师食谱,
我有win-2012-r2盒子可以和Vagrant一起工作(winrm和rdp都可以)
但是,当使用与厨房相同,它试图连接SSH而不是winrm
这是我的.kitchen.yml文件
--- driver: name: vagrant provisioner: name: chef_zero verifier: name: inspec transport: name: winrm elevated: true platforms: - name: win-2012-r2 driver: box: win-2012-r2 communicator: 'winrm' winrm_username: 'admin' winrm_password: 'adminadmin' suites: - name: default run_list: - recipe[ttest::default]
运行kitchen test ,输出是
-----> Starting Kitchen (v1.11.1) -----> Cleaning up any prior instances of <default-win-2012-r2> -----> Destroying <default-win-2012-r2>... Finished destroying <default-win-2012-r2> (0m0.00s). -----> Testing <default-win-2012-r2> -----> Creating <default-win-2012-r2>... Bringing machine 'default' up with 'virtualbox' provider... ==> default: Importing base box 'win-2012-r2'... ==> default: Matching MAC address for NAT networking... ==> default: Setting the name of the VM: kitchen-ttest-default-win-2012-r2_default_1472129655910_94157 ==> default: Clearing any previously set network interfaces... ==> default: Preparing network interfaces based on configuration... default: Adapter 1: nat ==> default: Forwarding ports... default: 22 (guest) => 2222 (host) (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 ...................... STDERR: Timed out while waiting for the machine to boot. This means that Vagrant was unable to communicate with the guest machine within the configured ("config.vm.boot_timeout" value) time period. If you look above, you should be able to see the error(s) that Vagrant had when attempting to connect to the machine. These errors are usually good hints as to what may be wrong.
不知道我失踪的地方。
Test Kitchen version 1.11.1 Vagrant 1.8.5 VirtualBox 5.1
谢谢大家
尝试将port设置为5985(或任何您需要的端口。
例如:
platforms: - name: windows2016 transport: name: winrm elevated: true port: 5985
如果这不起作用,请尝试kitchen converge -l debug并获得有关为什么机器超时的更多信息。