Skip to content

Instantly share code, notes, and snippets.

@StefanScherer
Last active March 4, 2019 08:31
Show Gist options
  • Save StefanScherer/c325ae2fb66c87bd1b19e501bbb55150 to your computer and use it in GitHub Desktop.
Save StefanScherer/c325ae2fb66c87bd1b19e501bbb55150 to your computer and use it in GitHub Desktop.
packer inspec windows vmware-vmx test
#!/bin/bash
PACKER_LOG=debug packer build \
--only=vmware-vmx \
--var source_path=~/.vagrant.d/boxes/StefanScherer-VAGRANTSLASH-windows_10/2019.01.09/vmware_desktop/windows_10.vmx \
windows_10_test.json
# encoding: utf-8
# copyright: 2018, The Authors
title 'sample section'
# you can also use plain tests
control "Chocolatey" do
title 'Chocolatey installed'
describe file('C:/ProgramData/Chocolatey/bin/choco.exe') do
it { should be_file }
end
end
name: my_win10
title: InSpec Profile
maintainer: The Authors
copyright: The Authors
copyright_email: [email protected]
license: Apache-2.0
summary: An InSpec Compliance Profile
version: 0.1.0
supports:
- windows: windows
- os-family: windows
- os: windows
$ ./build_windows_10_test.sh
2019/03/04 09:09:58 [INFO] Packer version: 1.3.5
2019/03/04 09:09:58 Packer Target OS/Arch: darwin amd64
2019/03/04 09:09:58 Built with Go Version: go1.12
2019/03/04 09:09:58 Detected home directory from env var: /Users/stefan
2019/03/04 09:09:58 [DEBUG] Discovered plugin: serverspec = /Users/stefan/.packer.d/plugins/packer-provisioner-serverspec
2019/03/04 09:09:58 Using internal plugin for alicloud-ecs
2019/03/04 09:09:58 Using internal plugin for hyperone
2019/03/04 09:09:58 Using internal plugin for amazon-instance
2019/03/04 09:09:58 Using internal plugin for cloudstack
2019/03/04 09:09:58 Using internal plugin for openstack
2019/03/04 09:09:58 Using internal plugin for profitbricks
2019/03/04 09:09:58 Using internal plugin for virtualbox-iso
2019/03/04 09:09:58 Using internal plugin for virtualbox-ovf
2019/03/04 09:09:58 Using internal plugin for googlecompute
2019/03/04 09:09:58 Using internal plugin for hyperv-iso
2019/03/04 09:09:58 Using internal plugin for null
2019/03/04 09:09:58 Using internal plugin for tencentcloud-cvm
2019/03/04 09:09:58 Using internal plugin for vmware-iso
2019/03/04 09:09:58 Using internal plugin for amazon-ebs
2019/03/04 09:09:58 Using internal plugin for amazon-ebssurrogate
2019/03/04 09:09:58 Using internal plugin for amazon-ebsvolume
2019/03/04 09:09:58 Using internal plugin for azure-arm
2019/03/04 09:09:58 Using internal plugin for digitalocean
2019/03/04 09:09:58 Using internal plugin for hyperv-vmcx
2019/03/04 09:09:58 Using internal plugin for parallels-pvm
2019/03/04 09:09:58 Using internal plugin for lxc
2019/03/04 09:09:58 Using internal plugin for parallels-iso
2019/03/04 09:09:58 Using internal plugin for qemu
2019/03/04 09:09:58 Using internal plugin for vagrant
2019/03/04 09:09:58 Using internal plugin for vmware-vmx
2019/03/04 09:09:58 Using internal plugin for file
2019/03/04 09:09:58 Using internal plugin for lxd
2019/03/04 09:09:58 Using internal plugin for oneandone
2019/03/04 09:09:58 Using internal plugin for amazon-chroot
2019/03/04 09:09:58 Using internal plugin for docker
2019/03/04 09:09:58 Using internal plugin for hcloud
2019/03/04 09:09:58 Using internal plugin for triton
2019/03/04 09:09:58 Using internal plugin for ncloud
2019/03/04 09:09:58 Using internal plugin for oracle-classic
2019/03/04 09:09:58 Using internal plugin for oracle-oci
2019/03/04 09:09:58 Using internal plugin for scaleway
2019/03/04 09:09:58 Using internal plugin for ansible
2019/03/04 09:09:58 Using internal plugin for powershell
2019/03/04 09:09:58 Using internal plugin for puppet-server
2019/03/04 09:09:58 Using internal plugin for chef-client
2019/03/04 09:09:58 Using internal plugin for file
2019/03/04 09:09:58 Using internal plugin for shell
2019/03/04 09:09:58 Using internal plugin for chef-solo
2019/03/04 09:09:58 Using internal plugin for converge
2019/03/04 09:09:58 Using internal plugin for salt-masterless
2019/03/04 09:09:58 Using internal plugin for windows-shell
2019/03/04 09:09:58 Using internal plugin for windows-restart
2019/03/04 09:09:58 Using internal plugin for ansible-local
2019/03/04 09:09:58 Using internal plugin for breakpoint
2019/03/04 09:09:58 Using internal plugin for inspec
2019/03/04 09:09:58 Using internal plugin for puppet-masterless
2019/03/04 09:09:58 Using internal plugin for shell-local
2019/03/04 09:09:58 Using internal plugin for alicloud-import
2019/03/04 09:09:58 Using internal plugin for artifice
2019/03/04 09:09:58 Using internal plugin for docker-tag
2019/03/04 09:09:58 Using internal plugin for googlecompute-import
2019/03/04 09:09:58 Using internal plugin for manifest
2019/03/04 09:09:58 Using internal plugin for vsphere-template
2019/03/04 09:09:58 Using internal plugin for amazon-import
2019/03/04 09:09:58 Using internal plugin for vagrant-cloud
2019/03/04 09:09:58 Using internal plugin for compress
2019/03/04 09:09:58 Using internal plugin for docker-push
2019/03/04 09:09:58 Using internal plugin for googlecompute-export
2019/03/04 09:09:58 Using internal plugin for vagrant
2019/03/04 09:09:58 Using internal plugin for checksum
2019/03/04 09:09:58 Using internal plugin for digitalocean-import
2019/03/04 09:09:58 Using internal plugin for docker-import
2019/03/04 09:09:58 Using internal plugin for docker-save
2019/03/04 09:09:58 Using internal plugin for shell-local
2019/03/04 09:09:58 Using internal plugin for vsphere
2019/03/04 09:09:58 Detected home directory from env var: /Users/stefan
2019/03/04 09:09:58 Attempting to open config file: /Users/stefan/.packerconfig
2019/03/04 09:09:58 [WARN] Config file doesn't exist: /Users/stefan/.packerconfig
2019/03/04 09:09:58 Packer config: &{DisableCheckpoint:false DisableCheckpointSignature:false PluginMinPort:10000 PluginMaxPort:25000 Builders:map[alicloud-ecs:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-alicloud-ecs amazon-chroot:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-amazon-chroot amazon-ebs:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-amazon-ebs amazon-ebssurrogate:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-amazon-ebssurrogate amazon-ebsvolume:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-amazon-ebsvolume amazon-instance:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-amazon-instance azure-arm:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-azure-arm cloudstack:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-cloudstack digitalocean:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-digitalocean docker:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-docker file:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-file googlecompute:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-googlecompute hcloud:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-hcloud hyperone:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-hyperone hyperv-iso:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-hyperv-iso hyperv-vmcx:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-hyperv-vmcx lxc:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-lxc lxd:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-lxd ncloud:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-ncloud null:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-null oneandone:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-oneandone openstack:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-openstack oracle-classic:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-oracle-classic oracle-oci:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-oracle-oci parallels-iso:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-parallels-iso parallels-pvm:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-parallels-pvm profitbricks:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-profitbricks qemu:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-qemu scaleway:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-scaleway tencentcloud-cvm:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-tencentcloud-cvm triton:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-triton vagrant:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-vagrant virtualbox-iso:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-virtualbox-iso virtualbox-ovf:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-virtualbox-ovf vmware-iso:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-vmware-iso vmware-vmx:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-vmware-vmx] PostProcessors:map[alicloud-import:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-alicloud-import amazon-import:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-amazon-import artifice:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-artifice checksum:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-checksum compress:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-compress digitalocean-import:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-digitalocean-import docker-import:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-docker-import docker-push:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-docker-push docker-save:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-docker-save docker-tag:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-docker-tag googlecompute-export:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-googlecompute-export googlecompute-import:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-googlecompute-import manifest:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-manifest shell-local:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-shell-local vagrant:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-vagrant vagrant-cloud:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-vagrant-cloud vsphere:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-vsphere vsphere-template:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-vsphere-template] Provisioners:map[ansible:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-ansible ansible-local:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-ansible-local breakpoint:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-breakpoint chef-client:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-chef-client chef-solo:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-chef-solo converge:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-converge file:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-file inspec:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-inspec powershell:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-powershell puppet-masterless:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-puppet-masterless puppet-server:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-puppet-server salt-masterless:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-salt-masterless serverspec:/Users/stefan/.packer.d/plugins/packer-provisioner-serverspec shell:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-shell shell-local:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-shell-local windows-restart:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-windows-restart windows-shell:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-windows-shell]}
2019/03/04 09:09:58 Detected home directory from env var: /Users/stefan
2019/03/04 09:09:58 Setting cache directory: /Users/stefan/.packer_cache
2019/03/04 09:09:58 Detected home directory from env var: /Users/stefan
2019/03/04 09:09:58 Loading builder: vmware-vmx
2019/03/04 09:09:58 Plugin could not be found. Checking same directory as executable.
2019/03/04 09:09:58 Current exe path: /usr/local/bin/packer
2019/03/04 09:09:58 Creating plugin client for path: /usr/local/bin/packer
2019/03/04 09:09:58 Starting plugin: /usr/local/bin/packer []string{"/usr/local/bin/packer", "plugin", "packer-builder-vmware-vmx"}
2019/03/04 09:09:58 Waiting for RPC address for: /usr/local/bin/packer
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 [INFO] Packer version: 1.3.5
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 Packer Target OS/Arch: darwin amd64
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 Built with Go Version: go1.12
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 Detected home directory from env var: /Users/stefan
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 Attempting to open config file: /Users/stefan/.packerconfig
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 [WARN] Config file doesn't exist: /Users/stefan/.packerconfig
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 Packer config: &{DisableCheckpoint:false DisableCheckpointSignature:false PluginMinPort:10000 PluginMaxPort:25000 Builders:map[] PostProcessors:map[] Provisioners:map[]}
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 Detected home directory from env var: /Users/stefan
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 Setting cache directory: /Users/stefan/.packer_cache
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 Detected home directory from env var: /Users/stefan
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 args: []string{"packer-builder-vmware-vmx"}
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 Plugin minimum port: 10000
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 Plugin maximum port: 25000
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 Plugin address: unix /var/folders/m1/df_xl6zn0v737c5073zlxlc80000gn/T/packer-plugin092439717
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 Waiting for connection...
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 Serving a plugin connection...
2019/03/04 09:09:58 Loading provisioner: windows-shell
2019/03/04 09:09:58 Plugin could not be found. Checking same directory as executable.
2019/03/04 09:09:58 Current exe path: /usr/local/bin/packer
2019/03/04 09:09:58 Creating plugin client for path: /usr/local/bin/packer
2019/03/04 09:09:58 Starting plugin: /usr/local/bin/packer []string{"/usr/local/bin/packer", "plugin", "packer-provisioner-windows-shell"}
2019/03/04 09:09:58 Waiting for RPC address for: /usr/local/bin/packer
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 [INFO] Packer version: 1.3.5
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 Packer Target OS/Arch: darwin amd64
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 Built with Go Version: go1.12
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 Detected home directory from env var: /Users/stefan
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 Attempting to open config file: /Users/stefan/.packerconfig
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 [WARN] Config file doesn't exist: /Users/stefan/.packerconfig
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 Packer config: &{DisableCheckpoint:false DisableCheckpointSignature:false PluginMinPort:10000 PluginMaxPort:25000 Builders:map[] PostProcessors:map[] Provisioners:map[]}
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 Detected home directory from env var: /Users/stefan
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 Setting cache directory: /Users/stefan/.packer_cache
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 Detected home directory from env var: /Users/stefan
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 args: []string{"packer-provisioner-windows-shell"}
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 Plugin minimum port: 10000
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 Plugin maximum port: 25000
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 Plugin address: unix /var/folders/m1/df_xl6zn0v737c5073zlxlc80000gn/T/packer-plugin058437137
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 Waiting for connection...
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 Serving a plugin connection...
2019/03/04 09:09:58 Loading provisioner: inspec
2019/03/04 09:09:58 Plugin could not be found. Checking same directory as executable.
2019/03/04 09:09:58 Current exe path: /usr/local/bin/packer
2019/03/04 09:09:58 Creating plugin client for path: /usr/local/bin/packer
2019/03/04 09:09:58 Starting plugin: /usr/local/bin/packer []string{"/usr/local/bin/packer", "plugin", "packer-provisioner-inspec"}
2019/03/04 09:09:58 Waiting for RPC address for: /usr/local/bin/packer
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 [INFO] Packer version: 1.3.5
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 Packer Target OS/Arch: darwin amd64
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 Built with Go Version: go1.12
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 Detected home directory from env var: /Users/stefan
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 Attempting to open config file: /Users/stefan/.packerconfig
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 [WARN] Config file doesn't exist: /Users/stefan/.packerconfig
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 Packer config: &{DisableCheckpoint:false DisableCheckpointSignature:false PluginMinPort:10000 PluginMaxPort:25000 Builders:map[] PostProcessors:map[] Provisioners:map[]}
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 Detected home directory from env var: /Users/stefan
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 Setting cache directory: /Users/stefan/.packer_cache
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 Detected home directory from env var: /Users/stefan
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 args: []string{"packer-provisioner-inspec"}
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 Plugin minimum port: 10000
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 Plugin maximum port: 25000
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 Plugin address: unix /var/folders/m1/df_xl6zn0v737c5073zlxlc80000gn/T/packer-plugin833067901
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 Waiting for connection...
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 Serving a plugin connection...
2019/03/04 09:09:58 Loading post-processor: vagrant
2019/03/04 09:09:58 Plugin could not be found. Checking same directory as executable.
2019/03/04 09:09:58 Current exe path: /usr/local/bin/packer
2019/03/04 09:09:58 Creating plugin client for path: /usr/local/bin/packer
2019/03/04 09:09:58 Starting plugin: /usr/local/bin/packer []string{"/usr/local/bin/packer", "plugin", "packer-post-processor-vagrant"}
2019/03/04 09:09:58 Waiting for RPC address for: /usr/local/bin/packer
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 [INFO] Packer version: 1.3.5
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 Packer Target OS/Arch: darwin amd64
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 Built with Go Version: go1.12
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 Detected home directory from env var: /Users/stefan
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 Attempting to open config file: /Users/stefan/.packerconfig
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 [WARN] Config file doesn't exist: /Users/stefan/.packerconfig
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 Packer config: &{DisableCheckpoint:false DisableCheckpointSignature:false PluginMinPort:10000 PluginMaxPort:25000 Builders:map[] PostProcessors:map[] Provisioners:map[]}
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 Detected home directory from env var: /Users/stefan
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 Setting cache directory: /Users/stefan/.packer_cache
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 Detected home directory from env var: /Users/stefan
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 args: []string{"packer-post-processor-vagrant"}
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 Plugin minimum port: 10000
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 Plugin maximum port: 25000
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 Plugin address: unix /var/folders/m1/df_xl6zn0v737c5073zlxlc80000gn/T/packer-plugin317331561
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 Waiting for connection...
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 Serving a plugin connection...
2019/03/04 09:09:58 Build debug mode: false
2019/03/04 09:09:58 Force build: false
2019/03/04 09:09:58 On error:
2019/03/04 09:09:58 Preparing build: vmware-vmx
vmware-vmx output will be in this color.
2019/03/04 09:09:58 Waiting on builds to complete...
2019/03/04 09:09:58 Starting build run: vmware-vmx
2019/03/04 09:09:58 Running builder: vmware-vmx
2019/03/04 09:09:58 [INFO] (telemetry) Starting builder vmware-vmx
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 Detected VMware version: 11
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 Testing vmware driver *common.Fusion6Driver. Success: true
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 No floppy files specified. Floppy disk will not be made.
==> vmware-vmx: Cloning source VM...
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 Cloning from: /Users/stefan/.vagrant.d/boxes/StefanScherer-VAGRANTSLASH-windows_10/2019.01.09/vmware_desktop/windows_10.vmx
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 Cloning to: output-vmware-vmx/windows_10_test.vmx
2019/03/04 09:09:58 packer: 2019/03/04 09:09:58 Executing: /Applications/VMware Fusion.app/Contents/Library/vmrun -T fusion clone /Users/stefan/.vagrant.d/boxes/StefanScherer-VAGRANTSLASH-windows_10/2019.01.09/vmware_desktop/windows_10.vmx output-vmware-vmx/windows_10_test.vmx full
2019/03/04 09:10:34 packer: 2019/03/04 09:10:34 stdout:
2019/03/04 09:10:34 packer: 2019/03/04 09:10:34 stderr:
2019/03/04 09:10:34 packer: 2019/03/04 09:10:34 Found attached disk with filename: disk-cl1.vmdk
2019/03/04 09:10:34 packer: 2019/03/04 09:10:34 Defaulting to network type: nat
2019/03/04 09:10:34 packer: 2019/03/04 09:10:34 Configuring VMX...
2019/03/04 09:10:34 packer: 2019/03/04 09:10:34 Setting VMX: 'ethernet0.present' = 'TRUE'
2019/03/04 09:10:34 packer: 2019/03/04 09:10:34 Setting VMX: 'ethernet0.virtualdev' = 'vmxnet3'
2019/03/04 09:10:34 packer: 2019/03/04 09:10:34 Setting VMX: 'RemoteDisplay.vnc.enabled' = 'false'
2019/03/04 09:10:34 packer: 2019/03/04 09:10:34 Setting VMX: 'RemoteDisplay.vnc.port' = '5900'
2019/03/04 09:10:34 packer: 2019/03/04 09:10:34 Setting VMX: 'ethernet0.connectiontype' = 'nat'
2019/03/04 09:10:34 packer: 2019/03/04 09:10:34 Writing VMX to: output-vmware-vmx/windows_10_test.vmx
2019/03/04 09:10:34 packer: 2019/03/04 09:10:34 Suppressing messages in VMX
2019/03/04 09:10:34 packer: 2019/03/04 09:10:34 Looking for available port between 5900 and 5980
2019/03/04 09:10:34 packer: 2019/03/04 09:10:34 Trying port: 5909
2019/03/04 09:10:34 packer: 2019/03/04 09:10:34 Found available VNC port: 5909
2019/03/04 09:10:34 packer: 2019/03/04 09:10:34 Writing VMX to: output-vmware-vmx/windows_10_test.vmx
2019/03/04 09:10:34 packer: 2019/03/04 09:10:34 Executing: /Applications/VMware Fusion.app/Contents/Library/vmrun -T fusion start output-vmware-vmx/windows_10_test.vmx gui
==> vmware-vmx: Starting virtual machine...
2019/03/04 09:10:36 packer: 2019/03/04 09:10:36 stdout:
2019/03/04 09:10:36 packer: 2019/03/04 09:10:36 stderr:
==> vmware-vmx: Waiting 5s for boot...
==> vmware-vmx: Connecting to VM via VNC (127.0.0.1:5909)
2019/03/04 09:10:41 packer: 2019/03/04 09:10:41 Connected to VNC desktop: Clone of windows_10
2019/03/04 09:10:41 packer: 2019/03/04 09:10:41 Located networkmapper configuration file using Fusion6: /Library/Preferences/VMware Fusion/networking
2019/03/04 09:10:41 packer: 2019/03/04 09:10:41 Unable to parse command : Expected 5 arguments. Received only 7. [add_nat_portfwd 8 tcp 2213 192.168.65.131 3389 vagrant: /users/stefan/code/windows-docker-machine/.vagrant/machines/2019-box/vmware_fusion/83c5888f-9416-4ad7-9fc4-6edd56ffa793/windowsserver2019docker.vmx]
2019/03/04 09:10:41 packer: 2019/03/04 09:10:41 Unable to parse command : Expected 5 arguments. Received only 7. [add_nat_portfwd 8 tcp 2215 192.168.65.131 5985 vagrant: /users/stefan/code/windows-docker-machine/.vagrant/machines/2019-box/vmware_fusion/83c5888f-9416-4ad7-9fc4-6edd56ffa793/windowsserver2019docker.vmx]
2019/03/04 09:10:41 packer: 2019/03/04 09:10:41 Unable to parse command : Expected 5 arguments. Received only 7. [add_nat_portfwd 8 tcp 2216 192.168.65.131 5986 vagrant: /users/stefan/code/windows-docker-machine/.vagrant/machines/2019-box/vmware_fusion/83c5888f-9416-4ad7-9fc4-6edd56ffa793/windowsserver2019docker.vmx]
2019/03/04 09:10:41 packer: 2019/03/04 09:10:41 Unable to parse command : Expected 5 arguments. Received only 7. [add_nat_portfwd 8 tcp 2218 192.168.65.131 22 vagrant: /users/stefan/code/windows-docker-machine/.vagrant/machines/2019-box/vmware_fusion/83c5888f-9416-4ad7-9fc4-6edd56ffa793/windowsserver2019docker.vmx]
2019/03/04 09:10:41 packer: 2019/03/04 09:10:41 HostIP discovered device matching nat: vmnet8
2019/03/04 09:10:41 packer: 2019/03/04 09:10:41 Host IP for the VMware machine: 192.168.65.1
==> vmware-vmx: Typing the boot command over VNC...
2019/03/04 09:10:41 packer: 2019/03/04 09:10:41 Located networkmapper configuration file using Fusion6: /Library/Preferences/VMware Fusion/networking
2019/03/04 09:10:41 packer: 2019/03/04 09:10:41 Unable to parse command : Expected 5 arguments. Received only 7. [add_nat_portfwd 8 tcp 2213 192.168.65.131 3389 vagrant: /users/stefan/code/windows-docker-machine/.vagrant/machines/2019-box/vmware_fusion/83c5888f-9416-4ad7-9fc4-6edd56ffa793/windowsserver2019docker.vmx]
2019/03/04 09:10:41 packer: 2019/03/04 09:10:41 Unable to parse command : Expected 5 arguments. Received only 7. [add_nat_portfwd 8 tcp 2215 192.168.65.131 5985 vagrant: /users/stefan/code/windows-docker-machine/.vagrant/machines/2019-box/vmware_fusion/83c5888f-9416-4ad7-9fc4-6edd56ffa793/windowsserver2019docker.vmx]
2019/03/04 09:10:41 packer: 2019/03/04 09:10:41 Unable to parse command : Expected 5 arguments. Received only 7. [add_nat_portfwd 8 tcp 2216 192.168.65.131 5986 vagrant: /users/stefan/code/windows-docker-machine/.vagrant/machines/2019-box/vmware_fusion/83c5888f-9416-4ad7-9fc4-6edd56ffa793/windowsserver2019docker.vmx]
2019/03/04 09:10:41 packer: 2019/03/04 09:10:41 Unable to parse command : Expected 5 arguments. Received only 7. [add_nat_portfwd 8 tcp 2218 192.168.65.131 22 vagrant: /users/stefan/code/windows-docker-machine/.vagrant/machines/2019-box/vmware_fusion/83c5888f-9416-4ad7-9fc4-6edd56ffa793/windowsserver2019docker.vmx]
2019/03/04 09:10:41 packer: 2019/03/04 09:10:41 GuestIP discovered device matching nat: vmnet8
2019/03/04 09:10:41 packer: 2019/03/04 09:10:41 Lookup up IP information...
2019/03/04 09:10:41 packer: 2019/03/04 09:10:41 GuestAddress found MAC address in VMX: 00:0c:29:fb:8c:1c
2019/03/04 09:10:41 packer: 2019/03/04 09:10:41 Trying DHCP leases path: /var/db/vmware/vmnet-dhcpd-vmnet8.leases
2019/03/04 09:10:41 packer: 2019/03/04 09:10:41 Detected IP: 192.168.65.138
==> vmware-vmx: Using winrm communicator to connect: 192.168.65.138
2019/03/04 09:10:41 packer: 2019/03/04 09:10:41 Waiting for WinRM, up to timeout: 15m0s
==> vmware-vmx: Waiting for WinRM to become available...
2019/03/04 09:10:46 packer: 2019/03/04 09:10:46 Located networkmapper configuration file using Fusion6: /Library/Preferences/VMware Fusion/networking
2019/03/04 09:10:46 packer: 2019/03/04 09:10:46 Unable to parse command : Expected 5 arguments. Received only 7. [add_nat_portfwd 8 tcp 2213 192.168.65.131 3389 vagrant: /users/stefan/code/windows-docker-machine/.vagrant/machines/2019-box/vmware_fusion/83c5888f-9416-4ad7-9fc4-6edd56ffa793/windowsserver2019docker.vmx]
2019/03/04 09:10:46 packer: 2019/03/04 09:10:46 Unable to parse command : Expected 5 arguments. Received only 7. [add_nat_portfwd 8 tcp 2215 192.168.65.131 5985 vagrant: /users/stefan/code/windows-docker-machine/.vagrant/machines/2019-box/vmware_fusion/83c5888f-9416-4ad7-9fc4-6edd56ffa793/windowsserver2019docker.vmx]
2019/03/04 09:10:46 packer: 2019/03/04 09:10:46 Unable to parse command : Expected 5 arguments. Received only 7. [add_nat_portfwd 8 tcp 2216 192.168.65.131 5986 vagrant: /users/stefan/code/windows-docker-machine/.vagrant/machines/2019-box/vmware_fusion/83c5888f-9416-4ad7-9fc4-6edd56ffa793/windowsserver2019docker.vmx]
2019/03/04 09:10:46 packer: 2019/03/04 09:10:46 Unable to parse command : Expected 5 arguments. Received only 7. [add_nat_portfwd 8 tcp 2218 192.168.65.131 22 vagrant: /users/stefan/code/windows-docker-machine/.vagrant/machines/2019-box/vmware_fusion/83c5888f-9416-4ad7-9fc4-6edd56ffa793/windowsserver2019docker.vmx]
2019/03/04 09:10:46 packer: 2019/03/04 09:10:46 GuestIP discovered device matching nat: vmnet8
2019/03/04 09:10:46 packer: 2019/03/04 09:10:46 Lookup up IP information...
2019/03/04 09:10:46 packer: 2019/03/04 09:10:46 GuestAddress found MAC address in VMX: 00:0c:29:fb:8c:1c
2019/03/04 09:10:46 packer: 2019/03/04 09:10:46 Trying DHCP leases path: /var/db/vmware/vmnet-dhcpd-vmnet8.leases
2019/03/04 09:10:46 packer: 2019/03/04 09:10:46 Detected IP: 192.168.65.138
2019/03/04 09:10:46 packer: 2019/03/04 09:10:46 [INFO] Attempting WinRM connection...
2019/03/04 09:10:46 packer: 2019/03/04 09:10:46 [DEBUG] connecting to remote shell using WinRM
2019/03/04 09:11:03 packer: 2019/03/04 09:11:03 Checking that WinRM is connected with: 'powershell.exe -EncodedCommand aQBmACAAKABUAGUAcwB0AC0AUABhAHQAaAAgAHYAYQByAGkAYQBiAGwAZQA6AGcAbABvAGIAYQBsADoAUAByAG8AZwByAGUAcwBzAFAAcgBlAGYAZQByAGUAbgBjAGUAKQB7ACQAUAByAG8AZwByAGUAcwBzAFAAcgBlAGYAZQByAGUAbgBjAGUAPQAnAFMAaQBsAGUAbgB0AGwAeQBDAG8AbgB0AGkAbgB1AGUAJwB9ADsAIABlAGMAaABvACAAIgBXAGkAbgBSAE0AIABjAG8AbgBuAGUAYwB0AGUAZAAuACIA'
2019/03/04 09:11:03 packer: 2019/03/04 09:11:03 [INFO] starting remote command: powershell.exe -EncodedCommand aQBmACAAKABUAGUAcwB0AC0AUABhAHQAaAAgAHYAYQByAGkAYQBiAGwAZQA6AGcAbABvAGIAYQBsADoAUAByAG8AZwByAGUAcwBzAFAAcgBlAGYAZQByAGUAbgBjAGUAKQB7ACQAUAByAG8AZwByAGUAcwBzAFAAcgBlAGYAZQByAGUAbgBjAGUAPQAnAFMAaQBsAGUAbgB0AGwAeQBDAG8AbgB0AGkAbgB1AGUAJwB9ADsAIABlAGMAaABvACAAIgBXAGkAbgBSAE0AIABjAG8AbgBuAGUAYwB0AGUAZAAuACIA
2019/03/04 09:11:06 packer: 2019/03/04 09:11:06 [INFO] command 'powershell.exe -EncodedCommand aQBmACAAKABUAGUAcwB0AC0AUABhAHQAaAAgAHYAYQByAGkAYQBiAGwAZQA6AGcAbABvAGIAYQBsADoAUAByAG8AZwByAGUAcwBzAFAAcgBlAGYAZQByAGUAbgBjAGUAKQB7ACQAUAByAG8AZwByAGUAcwBzAFAAcgBlAGYAZQByAGUAbgBjAGUAPQAnAFMAaQBsAGUAbgB0AGwAeQBDAG8AbgB0AGkAbgB1AGUAJwB9ADsAIABlAGMAaABvACAAIgBXAGkAbgBSAE0AIABjAG8AbgBuAGUAYwB0AGUAZAAuACIA' exited with code: 0
vmware-vmx: WinRM connected.
vmware-vmx: #< CLIXML
2019/03/04 09:11:06 packer: 2019/03/04 09:11:06 Connected to machine
2019/03/04 09:11:06 packer: 2019/03/04 09:11:06 Running the provision hook
vmware-vmx: <Objs Version="1.1.0.1" xmlns="http://schemas.microsoft.com/powershell/2004/04"><Obj S="progress" RefId="0"><TN RefId="0"><T>System.Management.Automation.PSCustomObject</T><T>System.Object</T></TN><MS><I64 N="SourceId">1</I64><PR N="Record"><AV>Preparing modules for first use.</AV><AI>0</AI><Nil /><PI>-1</PI><PC>-1</PC><T>Completed</T><SR>-1</SR><SD> </SD></PR></MS></Obj><Obj S="progress" RefId="1"><TNRef RefId="0" /><MS><I64 N="SourceId">1</I64><PR N="Record"><AV>Preparing modules for first use.</AV><AI>0</AI><Nil /><PI>-1</PI><PC>-1</PC><T>Completed</T><SR>-1</SR><SD> </SD></PR></MS></Obj></Objs>
==> vmware-vmx: Connected to WinRM!
2019/03/04 09:11:06 [INFO] (telemetry) Starting provisioner windows-shell
==> vmware-vmx: Provisioning with windows-shell...
==> vmware-vmx: Provisioning with shell script: ../scripts/chocolatey.bat
2019/03/04 09:11:06 packer: 2019/03/04 09:11:06 Opening ../scripts/chocolatey.bat for reading
2019/03/04 09:11:06 packer: 2019/03/04 09:11:06 [INFO] 188 bytes written for 'uploadData'
2019/03/04 09:11:06 [INFO] 188 bytes written for 'uploadData'
2019/03/04 09:11:06 packer: 2019/03/04 09:11:06 Uploading file to 'c:/Windows/Temp/script.bat'
2019/03/04 09:11:07 packer: #< CLIXML
2019/03/04 09:11:07 packer: <Objs Version="1.1.0.1" xmlns="http://schemas.microsoft.com/powershell/2004/04"><Obj S="progress" RefId="0"><TN RefId="0"><T>System.Management.Automation.PSCustomObject</T><T>System.Object</T></TN><MS><I64 N="SourceId">1</I64><PR N="Record"><AV>Preparing modules for first use.</AV><AI>0</AI><Nil /><PI>-1</PI><PC>-1</PC><T>Completed</T><SR>-1</SR><SD> </SD></PR></MS></Obj></Objs>#< CLIXML
2019/03/04 09:11:07 packer: <Objs Version="1.1.0.1" xmlns="http://schemas.microsoft.com/powershell/2004/04"><Obj S="progress" RefId="0"><TN RefId="0"><T>System.Management.Automation.PSCustomObject</T><T>System.Object</T></TN><MS><I64 N="SourceId">1</I64><PR N="Record"><AV>Preparing modules for first use.</AV><AI>0</AI><Nil /><PI>-1</PI><PC>-1</PC><T>Completed</T><SR>-1</SR><SD> </SD></PR></MS></Obj></Objs>2019/03/04 09:11:07 [INFO] starting remote command: set "PACKER_BUILDER_TYPE=vmware-vmx" && set "PACKER_BUILD_NAME=vmware-vmx" && set "PACKER_HTTP_IP=192.168.65.1" && "c:/Windows/Temp/script.bat"
vmware-vmx:
vmware-vmx: C:\Users\vagrant>powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" 0<NUL
vmware-vmx: Getting latest version of the Chocolatey package for download.
vmware-vmx: Getting Chocolatey from https://chocolatey.org/api/v2/package/chocolatey/0.10.11.
vmware-vmx: Downloading 7-Zip commandline tool prior to extraction.
vmware-vmx: Extracting C:\Users\vagrant\AppData\Local\Temp\chocolatey\chocInstall\chocolatey.zip to C:\Users\vagrant\AppData\Local\Temp\chocolatey\chocInstall...
vmware-vmx: Installing chocolatey on this machine
vmware-vmx: Creating ChocolateyInstall as an environment variable (targeting 'Machine')
vmware-vmx: Setting ChocolateyInstall to 'C:\ProgramData\chocolatey'
vmware-vmx: WARNING: It's very likely you will need to close and reopen your shell
vmware-vmx: before you can use choco.
vmware-vmx: Restricting write permissions to Administrators
vmware-vmx: We are setting up the Chocolatey package repository.
vmware-vmx: The packages themselves go to 'C:\ProgramData\chocolatey\lib'
vmware-vmx: (i.e. C:\ProgramData\chocolatey\lib\yourPackageName).
vmware-vmx: A shim file for the command line goes to 'C:\ProgramData\chocolatey\bin'
vmware-vmx: and points to an executable in 'C:\ProgramData\chocolatey\lib\yourPackageName'.
vmware-vmx:
vmware-vmx: Creating Chocolatey folders if they do not already exist.
vmware-vmx:
vmware-vmx: WARNING: You can safely ignore errors related to missing log files when
vmware-vmx: upgrading from a version of Chocolatey less than 0.9.9.
vmware-vmx: 'Batch file could not be found' is also safe to ignore.
vmware-vmx: 'The system cannot find the file specified' - also safe.
vmware-vmx: chocolatey.nupkg file not installed in lib.
vmware-vmx: Attempting to locate it from bootstrapper.
vmware-vmx: PATH environment variable does not have C:\ProgramData\chocolatey\bin in it. Adding...
vmware-vmx: WARNING: Not setting tab completion: Profile file does not exist at
vmware-vmx: 'C:\Users\vagrant\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1'.
vmware-vmx: Chocolatey (choco.exe) is now ready.
vmware-vmx: You can call choco from anywhere, command line or powershell by typing choco.
vmware-vmx: Run choco /? for a list of functions.
2019/03/04 09:11:13 packer: 2019/03/04 09:11:13 [INFO] command 'set "PACKER_BUILDER_TYPE=vmware-vmx" && set "PACKER_BUILD_NAME=vmware-vmx" && set "PACKER_HTTP_IP=192.168.65.1" && "c:/Windows/Temp/script.bat"' exited with code: 0
vmware-vmx: You may need to shut down and restart powershell and/or consoles
2019/03/04 09:11:13 packer: 2019/03/04 09:11:13 [INFO] RPC endpoint: Communicator ended with: 0
vmware-vmx: first prior to using choco.
vmware-vmx: Ensuring chocolatey commands are on the path
vmware-vmx: Ensuring chocolatey.nupkg is in the lib folder
2019/03/04 09:11:13 [INFO] 2229 bytes written for 'stdout'
2019/03/04 09:11:13 [INFO] 0 bytes written for 'stderr'
vmware-vmx:
vmware-vmx: C:\Users\vagrant>rem powershell -Command Sleep 300
2019/03/04 09:11:13 [INFO] RPC client: Communicator ended with: 0
2019/03/04 09:11:13 [INFO] RPC endpoint: Communicator ended with: 0
==> vmware-vmx: Provisioning with Inspec...
2019/03/04 09:11:13 packer: 2019/03/04 09:11:13 [INFO] 0 bytes written for 'stderr'
2019/03/04 09:11:13 packer: 2019/03/04 09:11:13 [INFO] 2229 bytes written for 'stdout'
2019/03/04 09:11:13 packer: 2019/03/04 09:11:13 [INFO] RPC client: Communicator ended with: 0
2019/03/04 09:11:13 [INFO] (telemetry) ending windows-shell
2019/03/04 09:11:13 [INFO] (telemetry) Starting provisioner inspec
2019/03/04 09:11:13 packer: 2019/03/04 09:11:13 SSH proxy: serving on 127.0.0.1:62711
==> vmware-vmx: Executing Inspec: inspec exec my_win10 --backend ssh --host 127.0.0.1 --key-files /var/folders/m1/df_xl6zn0v737c5073zlxlc80000gn/T/packer-provisioner-inspec.019098808.key --user stefan --port 62711 --attrs /var/folders/m1/df_xl6zn0v737c5073zlxlc80000gn/T/packer-provisioner-inspec.109365431.yml
vmware-vmx: D, [2019-03-04T09:11:16.583300 #60715] DEBUG -- : [SSH] [email protected]<{:user_known_hosts_file=>"/dev/null", :port=>62711, :compression=>false, :compression_level=>0, :keepalive=>true, :keepalive_interval=>60, :timeout=>15, :auth_methods=>["none", "publickey"], :keys_only=>true, :keys=>["/var/folders/m1/df_xl6zn0v737c5073zlxlc80000gn/T/packer-provisioner-inspec.019098808.key"], :password=>"<hidden>", :forward_agent=>nil, :non_interactive=>false, :verify_host_key=>false}> (uname -s)
vmware-vmx: D, [2019-03-04T09:11:16.583850 #60715] DEBUG -- : [SSH] opening connection to [email protected]<{:user_known_hosts_file=>"/dev/null", :port=>62711, :compression=>false, :compression_level=>0, :keepalive=>true, :keepalive_interval=>60, :timeout=>15, :auth_methods=>["none", "publickey"], :keys_only=>true, :keys=>["/var/folders/m1/df_xl6zn0v737c5073zlxlc80000gn/T/packer-provisioner-inspec.019098808.key"], :password=>"<hidden>", :forward_agent=>nil, :non_interactive=>false, :verify_host_key=>false}>
2019/03/04 09:11:16 packer: 2019/03/04 09:11:16 SSH proxy: accepted connection
2019/03/04 09:11:16 packer: 2019/03/04 09:11:16 authentication attempt from 127.0.0.1:62713 to 127.0.0.1:62711 as stefan using none
2019/03/04 09:11:16 packer: 2019/03/04 09:11:16 authentication attempt from 127.0.0.1:62713 to 127.0.0.1:62711 as stefan using publickey
2019/03/04 09:11:16 packer: 2019/03/04 09:11:16 new env request: LANG=en_US
2019/03/04 09:11:16 packer: 2019/03/04 09:11:16 new env request: LC_ALL=en_US.UTF-8
2019/03/04 09:11:16 packer: 2019/03/04 09:11:16 new exec request: uname -s
2019/03/04 09:11:17 packer: 2019/03/04 09:11:17 [INFO] starting remote command: uname -s
2019/03/04 09:11:17 packer: 2019/03/04 09:11:17 [INFO] command 'uname -s' exited with code: 1
2019/03/04 09:11:17 packer: 2019/03/04 09:11:17 [INFO] RPC endpoint: Communicator ended with: 1
vmware-vmx: D, [2019-03-04T09:11:17.052532 #60715] DEBUG -- : [SSH] [email protected]<{:user_known_hosts_file=>"/dev/null", :port=>62711, :compression=>false, :compression_level=>0, :keepalive=>true, :keepalive_interval=>60, :timeout=>15, :auth_methods=>["none", "publickey"], :keys_only=>true, :keys=>["/var/folders/m1/df_xl6zn0v737c5073zlxlc80000gn/T/packer-provisioner-inspec.019098808.key"], :password=>"<hidden>", :forward_agent=>nil, :non_interactive=>false, :verify_host_key=>false}> (test -f /usr/bin/FastCli)
2019/03/04 09:11:17 [INFO] 96 bytes written for 'stderr'
2019/03/04 09:11:17 [INFO] 0 bytes written for 'stdout'
2019/03/04 09:11:17 [INFO] RPC client: Communicator ended with: 1
2019/03/04 09:11:17 [INFO] RPC endpoint: Communicator ended with: 1
2019/03/04 09:11:17 [INFO] 0 bytes written for 'stdin'
2019/03/04 09:11:17 packer: 2019/03/04 09:11:17 [INFO] 96 bytes written for 'stderr'
2019/03/04 09:11:17 packer: 2019/03/04 09:11:17 [INFO] 0 bytes written for 'stdout'
2019/03/04 09:11:17 packer: 2019/03/04 09:11:17 [INFO] RPC client: Communicator ended with: 1
2019/03/04 09:11:17 packer: 2019/03/04 09:11:17 [INFO] 0 bytes written for 'stdin'
2019/03/04 09:11:17 packer: 2019/03/04 09:11:17 new env request: LANG=en_US
2019/03/04 09:11:17 packer: 2019/03/04 09:11:17 new env request: LC_ALL=en_US.UTF-8
2019/03/04 09:11:17 packer: 2019/03/04 09:11:17 new exec request: test -f /usr/bin/FastCli
2019/03/04 09:11:17 packer: 2019/03/04 09:11:17 [INFO] starting remote command: test -f /usr/bin/FastCli
2019/03/04 09:11:17 packer: 2019/03/04 09:11:17 [INFO] command 'test -f /usr/bin/FastCli' exited with code: 1
2019/03/04 09:11:17 packer: 2019/03/04 09:11:17 [INFO] RPC endpoint: Communicator ended with: 1
vmware-vmx: D, [2019-03-04T09:11:17.136455 #60715] DEBUG -- : [SSH] [email protected]<{:user_known_hosts_file=>"/dev/null", :port=>62711, :compression=>false, :compression_level=>0, :keepalive=>true, :keepalive_interval=>60, :timeout=>15, :auth_methods=>["none", "publickey"], :keys_only=>true, :keys=>["/var/folders/m1/df_xl6zn0v737c5073zlxlc80000gn/T/packer-provisioner-inspec.019098808.key"], :password=>"<hidden>", :forward_agent=>nil, :non_interactive=>false, :verify_host_key=>false}> (show version | json)
2019/03/04 09:11:17 [INFO] 95 bytes written for 'stderr'
2019/03/04 09:11:17 [INFO] 0 bytes written for 'stdout'
2019/03/04 09:11:17 [INFO] RPC client: Communicator ended with: 1
2019/03/04 09:11:17 [INFO] RPC endpoint: Communicator ended with: 1
2019/03/04 09:11:17 [INFO] 0 bytes written for 'stdin'
2019/03/04 09:11:17 packer: 2019/03/04 09:11:17 [INFO] 95 bytes written for 'stderr'
2019/03/04 09:11:17 packer: 2019/03/04 09:11:17 [INFO] 0 bytes written for 'stdout'
2019/03/04 09:11:17 packer: 2019/03/04 09:11:17 [INFO] RPC client: Communicator ended with: 1
2019/03/04 09:11:17 packer: 2019/03/04 09:11:17 [INFO] 0 bytes written for 'stdin'
2019/03/04 09:11:17 packer: 2019/03/04 09:11:17 new env request: LANG=en_US
2019/03/04 09:11:17 packer: 2019/03/04 09:11:17 new env request: LC_ALL=en_US.UTF-8
2019/03/04 09:11:17 packer: 2019/03/04 09:11:17 new exec request: show version | json
2019/03/04 09:11:17 packer: 2019/03/04 09:11:17 [INFO] starting remote command: show version | json
2019/03/04 09:11:17 packer: 2019/03/04 09:11:17 [INFO] command 'show version | json' exited with code: 255
2019/03/04 09:11:17 packer: 2019/03/04 09:11:17 [INFO] RPC endpoint: Communicator ended with: 255
2019/03/04 09:11:17 [INFO] 0 bytes written for 'stdout'
vmware-vmx: D, [2019-03-04T09:11:17.213379 #60715] DEBUG -- : [SSH] [email protected]<{:user_known_hosts_file=>"/dev/null", :port=>62711, :compression=>false, :compression_level=>0, :keepalive=>true, :keepalive_interval=>60, :timeout=>15, :auth_methods=>["none", "publickey"], :keys_only=>true, :keys=>["/var/folders/m1/df_xl6zn0v737c5073zlxlc80000gn/T/packer-provisioner-inspec.019098808.key"], :password=>"<hidden>", :forward_agent=>nil, :non_interactive=>false, :verify_host_key=>false}> (show version)
2019/03/04 09:11:17 [INFO] 95 bytes written for 'stderr'
2019/03/04 09:11:17 [INFO] RPC client: Communicator ended with: 255
2019/03/04 09:11:17 [INFO] RPC endpoint: Communicator ended with: 255
2019/03/04 09:11:17 [INFO] 0 bytes written for 'stdin'
2019/03/04 09:11:17 packer: 2019/03/04 09:11:17 [INFO] 0 bytes written for 'stdout'
2019/03/04 09:11:17 packer: 2019/03/04 09:11:17 [INFO] 95 bytes written for 'stderr'
2019/03/04 09:11:17 packer: 2019/03/04 09:11:17 [INFO] RPC client: Communicator ended with: 255
2019/03/04 09:11:17 packer: 2019/03/04 09:11:17 [INFO] 0 bytes written for 'stdin'
2019/03/04 09:11:17 packer: 2019/03/04 09:11:17 new env request: LANG=en_US
2019/03/04 09:11:17 packer: 2019/03/04 09:11:17 new env request: LC_ALL=en_US.UTF-8
2019/03/04 09:11:17 packer: 2019/03/04 09:11:17 new exec request: show version
2019/03/04 09:11:17 packer: 2019/03/04 09:11:17 [INFO] starting remote command: show version
2019/03/04 09:11:17 packer: 2019/03/04 09:11:17 [INFO] command 'show version' exited with code: 1
2019/03/04 09:11:17 packer: 2019/03/04 09:11:17 [INFO] RPC endpoint: Communicator ended with: 1
2019/03/04 09:11:17 [INFO] 0 bytes written for 'stdout'
vmware-vmx: D, [2019-03-04T09:11:17.285122 #60715] DEBUG -- : [SSH] [email protected]<{:user_known_hosts_file=>"/dev/null", :port=>62711, :compression=>false, :compression_level=>0, :keepalive=>true, :keepalive_interval=>60, :timeout=>15, :auth_methods=>["none", "publickey"], :keys_only=>true, :keys=>["/var/folders/m1/df_xl6zn0v737c5073zlxlc80000gn/T/packer-provisioner-inspec.019098808.key"], :password=>"<hidden>", :forward_agent=>nil, :non_interactive=>false, :verify_host_key=>false}> (version)
2019/03/04 09:11:17 [INFO] 95 bytes written for 'stderr'
2019/03/04 09:11:17 [INFO] RPC client: Communicator ended with: 1
2019/03/04 09:11:17 [INFO] RPC endpoint: Communicator ended with: 1
2019/03/04 09:11:17 [INFO] 0 bytes written for 'stdin'
2019/03/04 09:11:17 packer: 2019/03/04 09:11:17 [INFO] 95 bytes written for 'stderr'
2019/03/04 09:11:17 packer: 2019/03/04 09:11:17 [INFO] 0 bytes written for 'stdout'
2019/03/04 09:11:17 packer: 2019/03/04 09:11:17 [INFO] RPC client: Communicator ended with: 1
2019/03/04 09:11:17 packer: 2019/03/04 09:11:17 [INFO] 0 bytes written for 'stdin'
2019/03/04 09:11:17 packer: 2019/03/04 09:11:17 new env request: LANG=en_US
2019/03/04 09:11:17 packer: 2019/03/04 09:11:17 new env request: LC_ALL=en_US.UTF-8
2019/03/04 09:11:17 packer: 2019/03/04 09:11:17 new exec request: version
2019/03/04 09:11:17 packer: 2019/03/04 09:11:17 [INFO] starting remote command: version
2019/03/04 09:11:17 packer: 2019/03/04 09:11:17 [INFO] command 'version' exited with code: 1
vmware-vmx: /opt/inspec/embedded/lib/ruby/gems/2.5.0/gems/train-1.7.2/lib/train/platforms/detect/scanner.rb:41:in `scan': Sorry, we are unable to detect your platform (Train::PlatformDetectionFailed)
2019/03/04 09:11:17 packer: 2019/03/04 09:11:17 [INFO] RPC endpoint: Communicator ended with: 1
vmware-vmx: from /opt/inspec/embedded/lib/ruby/gems/2.5.0/gems/train-1.7.2/lib/train/platforms/detect.rb:9:in `scan'
vmware-vmx: from /opt/inspec/embedded/lib/ruby/gems/2.5.0/gems/train-1.7.2/lib/train/plugins/base_connection.rb:109:in `platform'
2019/03/04 09:11:17 [INFO] 98 bytes written for 'stderr'
2019/03/04 09:11:17 [INFO] 0 bytes written for 'stdout'
2019/03/04 09:11:17 [INFO] RPC client: Communicator ended with: 1
2019/03/04 09:11:17 [INFO] RPC endpoint: Communicator ended with: 1
2019/03/04 09:11:17 [INFO] 0 bytes written for 'stdin'
2019/03/04 09:11:17 packer: 2019/03/04 09:11:17 [INFO] 98 bytes written for 'stderr'
2019/03/04 09:11:17 packer: 2019/03/04 09:11:17 [INFO] 0 bytes written for 'stdout'
2019/03/04 09:11:17 packer: 2019/03/04 09:11:17 [INFO] RPC client: Communicator ended with: 1
vmware-vmx: from /opt/inspec/embedded/lib/ruby/gems/2.5.0/gems/train-1.7.2/lib/train/extras/command_wrapper.rb:128:in `load'
vmware-vmx: from /opt/inspec/embedded/lib/ruby/gems/2.5.0/gems/train-1.7.2/lib/train/transports/ssh_connection.rb:53:in `initialize'
2019/03/04 09:11:17 packer: 2019/03/04 09:11:17 [INFO] 0 bytes written for 'stdin'
vmware-vmx: from /opt/inspec/embedded/lib/ruby/gems/2.5.0/gems/train-1.7.2/lib/train/transports/ssh.rb:208:in `new'
vmware-vmx: from /opt/inspec/embedded/lib/ruby/gems/2.5.0/gems/train-1.7.2/lib/train/transports/ssh.rb:208:in `create_new_connection'
vmware-vmx: from /opt/inspec/embedded/lib/ruby/gems/2.5.0/gems/train-1.7.2/lib/train/transports/ssh.rb:81:in `connection'
vmware-vmx: from /opt/inspec/embedded/lib/ruby/gems/2.5.0/gems/inspec-3.6.4/lib/inspec/backend.rb:52:in `create'
vmware-vmx: from /opt/inspec/embedded/lib/ruby/gems/2.5.0/gems/inspec-3.6.4/lib/inspec/runner.rb:66:in `configure_transport'
vmware-vmx: from /opt/inspec/embedded/lib/ruby/gems/2.5.0/gems/inspec-3.6.4/lib/inspec/runner.rb:58:in `initialize'
vmware-vmx: from /opt/inspec/embedded/lib/ruby/gems/2.5.0/gems/inspec-3.6.4/lib/inspec/cli.rb:262:in `new'
vmware-vmx: from /opt/inspec/embedded/lib/ruby/gems/2.5.0/gems/inspec-3.6.4/lib/inspec/cli.rb:262:in `exec'
vmware-vmx: from /opt/inspec/embedded/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
vmware-vmx: from /opt/inspec/embedded/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
vmware-vmx: from /opt/inspec/embedded/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
vmware-vmx: from /opt/inspec/embedded/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/base.rb:466:in `start'
vmware-vmx: from /opt/inspec/embedded/lib/ruby/gems/2.5.0/gems/inspec-3.6.4/bin/inspec:12:in `<top (required)>'
vmware-vmx: from /usr/local/bin/inspec:122:in `load'
vmware-vmx: from /usr/local/bin/inspec:122:in `<main>'
2019/03/04 09:11:17 packer: 2019/03/04 09:11:17 shutting down the SSH proxy
2019/03/04 09:11:17 [INFO] (telemetry) ending inspec
2019/03/04 09:11:17 packer: 2019/03/04 09:11:17 Executing: /Applications/VMware Fusion.app/Contents/Library/vmrun -T fusion list
==> vmware-vmx: Stopping virtual machine...
2019/03/04 09:11:17 packer: 2019/03/04 09:11:17 stdout: Total running VMs: 1
2019/03/04 09:11:17 packer: /Users/stefan/code/packer-windows/inspec/output-vmware-vmx/windows_10_test.vmx
2019/03/04 09:11:17 packer: 2019/03/04 09:11:17 stderr:
2019/03/04 09:11:17 packer: 2019/03/04 09:11:17 Executing: /Applications/VMware Fusion.app/Contents/Library/vmrun -T fusion stop output-vmware-vmx/windows_10_test.vmx hard
2019/03/04 09:11:19 packer: 2019/03/04 09:11:19 stdout:
2019/03/04 09:11:19 packer: 2019/03/04 09:11:19 stderr:
==> vmware-vmx: Deleting output directory...
2019/03/04 09:11:19 packer: 2019/03/04 09:11:19 Error removing output dir: directory not empty
2019/03/04 09:11:21 [INFO] (telemetry) ending vmware-vmx
2019/03/04 09:11:21 ui error: Build 'vmware-vmx' errored: Error executing Inspec: Non-zero exit status: exit status 1
2019/03/04 09:11:21 Builds completed. Waiting on interrupt barrier...
2019/03/04 09:11:21 machine readable: error-count []string{"1"}
2019/03/04 09:11:21 ui error:
==> Some builds didn't complete successfully and had errors:
2019/03/04 09:11:21 machine readable: vmware-vmx,error []string{"Error executing Inspec: Non-zero exit status: exit status 1"}
2019/03/04 09:11:21 ui error: --> vmware-vmx: Error executing Inspec: Non-zero exit status: exit status 1
==> Builds finished but no artifacts were created.
Build 'vmware-vmx' errored: Error executing Inspec: Non-zero exit status: exit status 1
2019/03/04 09:11:21 [INFO] (telemetry) Finalizing.
==> Some builds didn't complete successfully and had errors:
--> vmware-vmx: Error executing Inspec: Non-zero exit status: exit status 1
==> Builds finished but no artifacts were created.
2019/03/04 09:11:23 waiting for all plugin processes to complete...
2019/03/04 09:11:23 /usr/local/bin/packer: plugin process exited
2019/03/04 09:11:23 /usr/local/bin/packer: plugin process exited
2019/03/04 09:11:23 /usr/local/bin/packer: plugin process exited
2019/03/04 09:11:23 /usr/local/bin/packer: plugin process exited
==> vmware-vmx: Provisioning with shell script: ../scripts/chocolatey.bat
2019/03/04 01:14:43 packer: 2019/03/04 01:14:43 Opening ../scripts/chocolatey.bat for reading
2019/03/04 01:14:43 packer: 2019/03/04 01:14:43 [INFO] 188 bytes written for 'uploadData'
2019/03/04 01:14:43 packer: 2019/03/04 01:14:43 Uploading file to 'c:/Windows/Temp/script.bat'
2019/03/04 01:14:43 [INFO] 188 bytes written for 'uploadData'
2019/03/04 01:14:44 packer: #< CLIXML
2019/03/04 01:14:44 packer: <Objs Version="1.1.0.1" xmlns="http://schemas.microsoft.com/powershell/2004/04"><Obj S="progress" RefId="0"><TN RefId="0"><T>System.Management.Automation.PSCustomObject</T><T>System.Object</T></TN><MS><I64 N="SourceId">1</I64><PR N="Record"><AV>Preparing modules for first use.</AV><AI>0</AI><Nil /><PI>-1</PI><PC>-1</PC><T>Completed</T><SR>-1</SR><SD> </SD></PR></MS></Obj></Objs>#< CLIXML
2019/03/04 01:14:44 packer: <Objs Version="1.1.0.1" xmlns="http://schemas.microsoft.com/powershell/2004/04"><Obj S="progress" RefId="0"><TN RefId="0"><T>System.Management.Automation.PSCustomObject</T><T>System.Object</T></TN><MS><I64 N="SourceId">1</I64><PR N="Record"><AV>Preparing modules for first use.</AV><AI>0</AI><Nil /><PI>-1</PI><PC>-1</PC><T>Completed</T><SR>-1</SR><SD> </SD></PR></MS></Obj></Objs>2019/03/04 01:14:44 [INFO] starting remote command: set "PACKER_BUILDER_TYPE=vmware-vmx" && set "PACKER_BUILD_NAME=vmware-vmx" && set "PACKER_HTTP_IP=192.168.65.1" && "c:/Windows/Temp/script.bat"
vmware-vmx:
vmware-vmx: C:\Users\vagrant>powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" 0<NUL
vmware-vmx: Getting latest version of the Chocolatey package for download.
vmware-vmx: Getting Chocolatey from https://chocolatey.org/api/v2/package/chocolatey/0.10.11.
2019/03/04 01:15:18 packer: 2019/03/04 01:15:18 [INFO] command 'set "PACKER_BUILDER_TYPE=vmware-vmx" && set "PACKER_BUILD_NAME=vmware-vmx" && set "PACKER_HTTP_IP=192.168.65.1" && "c:/Windows/Temp/script.bat"' exited with code: 0
2019/03/04 01:15:18 packer: 2019/03/04 01:15:18 [INFO] RPC endpoint: Communicator ended with: 0
2019/03/04 01:15:18 [INFO] 587 bytes written for 'stdout'
2019/03/04 01:15:18 [INFO] 1266 bytes written for 'stderr'
vmware-vmx: Downloading 7-Zip commandline tool prior to extraction.
2019/03/04 01:15:18 [INFO] RPC client: Communicator ended with: 0
2019/03/04 01:15:18 [INFO] RPC endpoint: Communicator ended with: 0
2019/03/04 01:15:18 packer: 2019/03/04 01:15:18 [INFO] 1266 bytes written for 'stderr'
2019/03/04 01:15:18 packer: 2019/03/04 01:15:18 [INFO] 587 bytes written for 'stdout'
2019/03/04 01:15:18 packer: 2019/03/04 01:15:18 [INFO] RPC client: Communicator ended with: 0
vmware-vmx: Extracting C:\Users\vagrant\AppData\Local\Temp\chocolatey\chocInstall\chocolatey.zip to C:\Users\vagrant\AppData\Local\Temp\chocolatey\chocInstall...
vmware-vmx:
vmware-vmx: C:\Users\vagrant>rem powershell -Command Sleep 300
vmware-vmx: Exception calling "DownloadFile" with "2" argument(s): "The remote server returned an error: (522) Origin Connection
vmware-vmx: Time-out."
vmware-vmx: At line:167 char:3
vmware-vmx: + $downloader.DownloadFile($url, $file)
vmware-vmx: + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vmware-vmx: + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
vmware-vmx: + FullyQualifiedErrorId : WebException
vmware-vmx:
vmware-vmx:
vmware-vmx: ERROR: The system cannot find the file specified.
vmware-vmx: C:\Users\vagrant\AppData\Local\Temp\chocolatey\chocInstall\chocolatey.zip
vmware-vmx:
vmware-vmx:
vmware-vmx:
vmware-vmx: System ERROR:
vmware-vmx: The system cannot find the file specified.
vmware-vmx: Unable to unzip package using 7zip. Perhaps try setting $env:chocolateyUseWindowsCompression = 'true' and call install
vmware-vmx: again. Error: 7-Zip encountered a fatal error while extracting the files
vmware-vmx: At line:216 char:9
vmware-vmx: + 2 { throw "$errorMessage 7-Zip encountered a fatal error while ex ...
vmware-vmx: + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vmware-vmx: + CategoryInfo : OperationStopped: (Unable to unzip...cting the files:String) [], RuntimeException
vmware-vmx: + FullyQualifiedErrorId : Unable to unzip package using 7zip. Perhaps try setting $env:chocolateyUseWindowsCompres
vmware-vmx: sion = 'true' and call install again. Error: 7-Zip encountered a fatal error while extracting the files
vmware-vmx:
2019/03/04 01:15:18 [INFO] (telemetry) ending windows-shell
2019/03/04 01:15:18 [INFO] (telemetry) Starting provisioner inspec
==> vmware-vmx: Provisioning with Inspec...
2019/03/04 01:15:19 packer: 2019/03/04 01:15:19 SSH proxy: serving on 127.0.0.1:62408
==> vmware-vmx: Executing Inspec: inspec exec my_win10 --backend winrm --host 192.168.65.138 --attrs /var/folders/m1/df_xl6zn0v737c5073zlxlc80000gn/T/packer-provisioner-inspec.490278704.yml --user vagrant --password vagrant
vmware-vmx: D, [2019-03-04T01:15:22.296860 #60185] DEBUG -- : winrm-fs requested, loading WinRM::FS gem (~> 1.0)
vmware-vmx: D, [2019-03-04T01:15:22.563945 #60185] DEBUG -- : WinRM::FS library loaded
vmware-vmx: D, [2019-03-04T01:15:22.571519 #60185] DEBUG -- : [WinRM] @192.168.65.138<{:transport=>:negotiate, :disable_sspi=>false, :basic_auth_only=>false, :endpoint=>"http://192.168.65.138:5985/wsman", :user=>"vagrant", :password=>"<hidden>", :no_ssl_peer_verification=>false}> (cmd /c ver)
vmware-vmx: D, [2019-03-04T01:15:22.635099 #60185] DEBUG -- : [WinRM] opening remote shell on http://192.168.65.138:5985/wsman
vmware-vmx: D, [2019-03-04T01:15:22.661682 #60185] DEBUG -- : [WinRM] Endpoint doesn't support config request for MaxEnvelopsizekb
vmware-vmx: D, [2019-03-04T01:15:22.784183 #60185] DEBUG -- : [WinRM] Waiting for output...
vmware-vmx: D, [2019-03-04T01:15:22.899128 #60185] DEBUG -- : [WinRM] Processing output
vmware-vmx: D, [2019-03-04T01:15:22.899570 #60185] DEBUG -- : [WinRM] polling for pipeline state. message: #<WinRM::PSRP::Message:0x00007f8b866350b0 @data="\xEF\xBB\xBF<Obj RefId=\"0\"><MS><Version N=\"protocolversion\">2.3</Version><Version N=\"PSVersion\">2.0</Version><Version N=\"SerializationVersion\">1.1.0.1</Version></MS></Obj>", @destination=1, @type=65538, @pipeline_id="00000000-0000-0000-0000-000000000000", @runspace_pool_id="00000000-0000-0000-0000-000000000000">
vmware-vmx: D, [2019-03-04T01:15:22.899858 #60185] DEBUG -- : [WinRM] polling for pipeline state. message: #<WinRM::PSRP::Message:0x00007f8b86634250 @data="\xEF\xBB\xBF<Obj RefId=\"0\"><MS><Obj N=\"ApplicationPrivateData\" RefId=\"1\"><TN RefId=\"0\"><T>System.Management.Automation.PSPrimitiveDictionary</T><T>System.Collections.Hashtable</T><T>System.Object</T></TN><DCT><En><S N=\"Key\">BreakAll</S><B N=\"Value\">false</B></En><En><S N=\"Key\">DebugStop</S><B N=\"Value\">false</B></En><En><S N=\"Key\">UnhandledBreakpointMode</S><I32 N=\"Value\">1</I32></En><En><S N=\"Key\">PSVersionTable</S><Obj N=\"Value\" RefId=\"2\"><TNRef RefId=\"0\" /><DCT><En><S N=\"Key\">PSVersion</S><Version N=\"Value\">5.1.17763.134</Version></En><En><S N=\"Key\">PSEdition</S><S N=\"Value\">Desktop</S></En><En><S N=\"Key\">PSCompatibleVersions</S><Obj N=\"Value\" RefId=\"3\"><TN RefId=\"1\"><T>System.Version[]</T><T>System.Array</T><T>System.Object</T></TN><LST><Version>1.0</Version><Version>2.0</Version><Version>3.0</Version><Version>4.0</Version><Version>5.0</Version><Version>5.1.17763.134</Version></LST></Obj></En><En><S N=\"Key\">CLRVersion</S><Version N=\"Value\">4.0.30319.42000</Version></En><En><S N=\"Key\">BuildVersion</S><Version N=\"Value\">10.0.17763.134</Version></En><En><S N=\"Key\">WSManStackVersion</S><Version N=\"Value\">3.0</Version></En><En><S N=\"Key\">PSRemotingProtocolVersion</S><Version N=\"Value\">2.3</Version></En><En><S N=\"Key\">SerializationVersion</S><Version N=\"Value\">1.1.0.1</Version></En></DCT></Obj></En><En><S N=\"Key\">DebugMode</S><I32 N=\"Value\">1</I32></En><En><S N=\"Key\">DebugBreakpointCount</S><I32 N=\"Value\">0</I32></En></DCT></Obj></MS></Obj>", @destination=1, @type=135177, @pipeline_id="00000000-0000-0000-0000-000000000000", @runspace_pool_id="00000000-0000-0000-0000-000000000000">
vmware-vmx: D, [2019-03-04T01:15:22.899914 #60185] DEBUG -- : [WinRM] Waiting for output...
vmware-vmx: D, [2019-03-04T01:15:22.909647 #60185] DEBUG -- : [WinRM] Processing output
vmware-vmx: D, [2019-03-04T01:15:22.910066 #60185] DEBUG -- : [WinRM] polling for pipeline state. message: #<WinRM::PSRP::Message:0x00007f8b8659a3d0 @data="\xEF\xBB\xBF<Obj RefId=\"0\"><MS><I32 N=\"RunspaceState\">2</I32></MS></Obj>", @destination=1, @type=135173, @pipeline_id="00000000-0000-0000-0000-000000000000", @runspace_pool_id="00000000-0000-0000-0000-000000000000">
vmware-vmx: D, [2019-03-04T01:15:22.912610 #60185] DEBUG -- : [WinRM] remote shell created with shell_id: D4B62213-5587-4FB8-A29C-DB36299B13F6
vmware-vmx: D, [2019-03-04T01:15:22.931825 #60185] DEBUG -- : [WinRM] Command created for cmd /c ver
vmware-vmx: if (!$?) { if($LASTEXITCODE) { exit $LASTEXITCODE } else { exit 1 } } with id: 023877F9-6106-48D8-B2DC-085173085B1A
vmware-vmx: D, [2019-03-04T01:15:22.931873 #60185] DEBUG -- : [WinRM] creating command_id: 023877F9-6106-48D8-B2DC-085173085B1A on shell_id D4B62213-5587-4FB8-A29C-DB36299B13F6
vmware-vmx: D, [2019-03-04T01:15:22.931910 #60185] DEBUG -- : [WinRM] Waiting for output...
vmware-vmx: D, [2019-03-04T01:15:23.076124 #60185] DEBUG -- : [WinRM] Processing output
vmware-vmx: D, [2019-03-04T01:15:23.082684 #60185] DEBUG -- : [WinRM] cleaning up command_id: 023877F9-6106-48D8-B2DC-085173085B1A on shell_id D4B62213-5587-4FB8-A29C-DB36299B13F6
vmware-vmx: D, [2019-03-04T01:15:23.093406 #60185] DEBUG -- : [WinRM] @192.168.65.138<{:transport=>:negotiate, :disable_sspi=>false, :basic_auth_only=>false, :endpoint=>"http://192.168.65.138:5985/wsman", :user=>"vagrant", :password=>"<hidden>", :no_ssl_peer_verification=>false}> (wmic os get * /format:list)
vmware-vmx: D, [2019-03-04T01:15:23.107573 #60185] DEBUG -- : [WinRM] Command created for wmic os get * /format:list
vmware-vmx: if (!$?) { if($LASTEXITCODE) { exit $LASTEXITCODE } else { exit 1 } } with id: FFE3240E-3913-45EB-BB49-13519FBFBEF8
vmware-vmx: D, [2019-03-04T01:15:23.107629 #60185] DEBUG -- : [WinRM] creating command_id: FFE3240E-3913-45EB-BB49-13519FBFBEF8 on shell_id D4B62213-5587-4FB8-A29C-DB36299B13F6
vmware-vmx: D, [2019-03-04T01:15:23.107662 #60185] DEBUG -- : [WinRM] Waiting for output...
vmware-vmx: D, [2019-03-04T01:15:23.283940 #60185] DEBUG -- : [WinRM] Processing output
vmware-vmx: D, [2019-03-04T01:15:23.517438 #60185] DEBUG -- : [WinRM] cleaning up command_id: FFE3240E-3913-45EB-BB49-13519FBFBEF8 on shell_id D4B62213-5587-4FB8-A29C-DB36299B13F6
vmware-vmx: D, [2019-03-04T01:15:23.527376 #60185] DEBUG -- : [WinRM] @192.168.65.138<{:transport=>:negotiate, :disable_sspi=>false, :basic_auth_only=>false, :endpoint=>"http://192.168.65.138:5985/wsman", :user=>"vagrant", :password=>"<hidden>", :no_ssl_peer_verification=>false}> (wmic cpu get architecture /format:list)
vmware-vmx: D, [2019-03-04T01:15:23.540955 #60185] DEBUG -- : [WinRM] Command created for wmic cpu get architecture /format:list
vmware-vmx: if (!$?) { if($LASTEXITCODE) { exit $LASTEXITCODE } else { exit 1 } } with id: EBA5CA76-3CB4-4E1B-8002-FC307AB01A04
vmware-vmx: D, [2019-03-04T01:15:23.541001 #60185] DEBUG -- : [WinRM] creating command_id: EBA5CA76-3CB4-4E1B-8002-FC307AB01A04 on shell_id D4B62213-5587-4FB8-A29C-DB36299B13F6
vmware-vmx: D, [2019-03-04T01:15:23.541034 #60185] DEBUG -- : [WinRM] Waiting for output...
vmware-vmx: D, [2019-03-04T01:15:23.710926 #60185] DEBUG -- : [WinRM] Processing output
vmware-vmx: D, [2019-03-04T01:15:23.738764 #60185] DEBUG -- : [WinRM] cleaning up command_id: EBA5CA76-3CB4-4E1B-8002-FC307AB01A04 on shell_id D4B62213-5587-4FB8-A29C-DB36299B13F6
vmware-vmx: D, [2019-03-04T01:15:23.795147 #60185] DEBUG -- : [WinRM] @192.168.65.138<{:transport=>:negotiate, :disable_sspi=>false, :basic_auth_only=>false, :endpoint=>"http://192.168.65.138:5985/wsman", :user=>"vagrant", :password=>"<hidden>", :no_ssl_peer_verification=>false}> ((Get-ItemProperty -Path "C:/ProgramData/Chocolatey/bin/choco.exe").attributes.ToString())
vmware-vmx: D, [2019-03-04T01:15:23.809372 #60185] DEBUG -- : [WinRM] Command created for (Get-ItemProperty -Path "C:/ProgramData/Chocolatey/bin/choco.exe").attributes.ToString()
vmware-vmx: if (!$?) { if($LASTEXITCODE) { exit $LASTEXITCODE } else { exit 1 } } with id: B54AF20C-12F2-4D2B-8DB0-78F0B8A0974D
vmware-vmx: D, [2019-03-04T01:15:23.809419 #60185] DEBUG -- : [WinRM] creating command_id: B54AF20C-12F2-4D2B-8DB0-78F0B8A0974D on shell_id D4B62213-5587-4FB8-A29C-DB36299B13F6
vmware-vmx: D, [2019-03-04T01:15:23.809456 #60185] DEBUG -- : [WinRM] Waiting for output...
vmware-vmx: D, [2019-03-04T01:15:23.885576 #60185] DEBUG -- : [WinRM] Processing output
vmware-vmx: D, [2019-03-04T01:15:23.960527 #60185] DEBUG -- : [WinRM] cleaning up command_id: B54AF20C-12F2-4D2B-8DB0-78F0B8A0974D on shell_id D4B62213-5587-4FB8-A29C-DB36299B13F6
vmware-vmx:
vmware-vmx: Profile: InSpec Profile (my_win10)
vmware-vmx: Version: 0.1.0
vmware-vmx: Target: winrm://vagrant@http://192.168.65.138:5985/wsman:3389
vmware-vmx:
vmware-vmx: × Chocolatey: Chocolatey installed
vmware-vmx: × File C:/ProgramData/Chocolatey/bin/choco.exe should be file
vmware-vmx: expected `File C:/ProgramData/Chocolatey/bin/choco.exe.file?` to return true, got false
vmware-vmx:
vmware-vmx:
vmware-vmx: Profile Summary: 0 successful controls, 1 control failure, 0 controls skipped
vmware-vmx: Test Summary: 0 successful, 1 failure, 0 skipped
2019/03/04 01:15:24 packer: 2019/03/04 01:15:24 shutting down the SSH proxy
2019/03/04 01:15:24 [INFO] (telemetry) ending inspec
2019/03/04 01:15:24 packer: 2019/03/04 01:15:24 Executing: /Applications/VMware Fusion.app/Contents/Library/vmrun -T fusion list
2019/03/04 01:15:24 packer: 2019/03/04 01:15:24 stdout: Total running VMs: 1
2019/03/04 01:15:24 packer: /Users/stefan/code/packer-windows/inspec/output-vmware-vmx/windows_10_test.vmx
2019/03/04 01:15:24 packer: 2019/03/04 01:15:24 stderr:
==> vmware-vmx: Stopping virtual machine...
2019/03/04 01:15:24 packer: 2019/03/04 01:15:24 Executing: /Applications/VMware Fusion.app/Contents/Library/vmrun -T fusion stop output-vmware-vmx/windows_10_test.vmx hard
2019/03/04 01:15:26 packer: 2019/03/04 01:15:26 stdout:
2019/03/04 01:15:26 packer: 2019/03/04 01:15:26 stderr:
==> vmware-vmx: Deleting output directory...
{
"builders": [
{
"boot_command": "",
"boot_wait": "5s",
"communicator": "winrm",
"headless": false,
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
"source_path": "{{user `source_path`}}",
"type": "vmware-vmx",
"vm_name": "windows_10_test",
"vmx_data": {
"ethernet0.connectiontype": "nat",
"ethernet0.present": "TRUE",
"ethernet0.virtualdev": "vmxnet3",
"RemoteDisplay.vnc.enabled": "false",
"RemoteDisplay.vnc.port": "5900"
},
"vmx_remove_ethernet_interfaces": true,
"vnc_port_max": 5980,
"vnc_port_min": 5900,
"winrm_password": "vagrant",
"winrm_timeout": "15m",
"winrm_username": "vagrant"
}
],
"post-processors": [
{
"keep_input_artifact": false,
"output": "windows_10_test_{{.Provider}}.box",
"type": "vagrant",
"vagrantfile_template": "../vagrantfile-windows_10.template"
}
],
"provisioners": [
{
"scripts": [
"../scripts/chocolatey.bat"
],
"type": "windows-shell"
},
{
"type": "inspec",
"profile": "my_win10"
}
],
"variables": {
"source_path": "path-to.vmx"
}
}
{
"builders": [
{
"boot_command": "",
"boot_wait": "5s",
"communicator": "winrm",
"headless": false,
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
"source_path": "{{user `source_path`}}",
"type": "vmware-vmx",
"vm_name": "windows_10_test",
"vmx_data": {
"ethernet0.connectiontype": "nat",
"ethernet0.present": "TRUE",
"ethernet0.virtualdev": "vmxnet3",
"RemoteDisplay.vnc.enabled": "false",
"RemoteDisplay.vnc.port": "5900"
},
"vmx_remove_ethernet_interfaces": true,
"vnc_port_max": 5980,
"vnc_port_min": 5900,
"winrm_password": "vagrant",
"winrm_timeout": "15m",
"winrm_username": "vagrant"
}
],
"post-processors": [
{
"keep_input_artifact": false,
"output": "windows_10_test_{{.Provider}}.box",
"type": "vagrant",
"vagrantfile_template": "../vagrantfile-windows_10.template"
}
],
"provisioners": [
{
"scripts": [
"../scripts/chocolatey.bat"
],
"type": "windows-shell"
},
{
"type": "inspec",
"profile": "my_win10",
"backend": "winrm",
"host": "192.168.65.138",
"user": "vagrant",
"extra_arguments": [ "--user", "vagrant", "--password", "vagrant" ]
}
],
"variables": {
"source_path": "path-to.vmx"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment