Last active
June 5, 2020 18:48
-
-
Save amaltson/f763531bb2689ad311ed to your computer and use it in GitHub Desktop.
Kitchen.yml for Windows
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
driver: | |
name: vagrant | |
provisioner: | |
name: chef_zero | |
platforms: | |
- name: windows-7 | |
transport: | |
name: winrm | |
driver: | |
guest: :windows | |
box: windows-7-test-kitchen | |
box_url: http://internal-url | |
winrm: | |
username: <some username> | |
password: <some password> | |
gui: true | |
suites: | |
- name: default | |
run_list: | |
- recipe[some-recipes] | |
attributes: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'https://rubygems.org' | |
group :development do | |
# ChefDK | |
gem 'berkshelf', '3.1.3' | |
gem 'nokogiri', '1.6.4.1' | |
gem 'pry', '~> 0.10.1' | |
end | |
group :test do | |
# ChefDK | |
gem 'chefspec', '4.0.1' | |
gem 'foodcritic', '4.0.0' | |
gem 'test-kitchen', git: 'https://github.com/mwrock/test-kitchen', branch: 'WinRM' | |
gem 'kitchen-vagrant', git: 'https://github.com/afiune/kitchen-vagrant', branch: 'WinRM' | |
gem 'kitchen-docker', '~> 1.5' | |
gem 'rake', '~> 10.3' | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vagrant up | |
Bringing machine 'default' up with 'virtualbox' provider... | |
==> default: Importing base box 'windows-7-test-kitchen'... | |
==> default: Matching MAC address for NAT networking... | |
==> default: Setting the name of the VM: test_default_1422970648952_22381 | |
==> default: Fixed port collision for 5985 => 55985. Now on port 2200. | |
==> default: Clearing any previously set network interfaces... | |
==> default: Preparing network interfaces based on configuration... | |
default: Adapter 1: nat | |
==> default: Forwarding ports... | |
default: 5985 => 2200 (adapter 1) | |
==> default: Booting VM... | |
==> default: Waiting for machine to boot. This may take a few minutes... | |
==> default: Machine booted and ready! | |
==> default: Checking for guest additions in VM... | |
==> default: Mounting shared folders... | |
default: /vagrant => /Users/arthur/vms/test | |
==> default: Running provisioner: shell... | |
default: Running: inline PowerShell script |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is the Vagrantfile that 'vagrant package' made that's bundled with the Vagrant box | |
Vagrant::Config.run do |config| | |
# This Vagrantfile is auto-generated by `vagrant package` to contain | |
# the MAC address of the box. Custom configuration should be placed in | |
# the actual `Vagrantfile` in this box. | |
config.vm.base_mac = "0800275297C3" | |
end | |
# Load include vagrant file if it exists after the auto-generated | |
# so it can override any of the settings | |
include_vagrantfile = File.expand_path("../include/_Vagrantfile", __FILE__) | |
load include_vagrantfile if File.exist?(include_vagrantfile) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = "windows-7-test-kitchen" | |
config.vm.guest = :windows | |
config.vm.communicator = "winrm" | |
config.vm.base_mac = "080027527704" | |
config.vm.provider "virtualbox" do |v| | |
v.gui = true | |
end | |
config.winrm.username = "<account>" | |
config.winrm.password = "<password>" | |
config.vm.provision "shell", inline: '"Hello World" | Out-File C:\chef.txt' | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I got the exact same error when using Vagrant 1.7.2. kitchen create works fine, but converge fails. I downgraded to Vagrant 1.6.3 and the issue didn't seem to manifest anymore.