Giter Club home page Giter Club logo

packer-templates's Issues

Access denied copying guess additions

Not sure if anyone else is having this issue but it seems like winrm always throws an access denied error when trying to upload the guest additions to the virtual machine. Any help is appreciated!

Boxstarter 2.6.25 requires chocolatey '-y' to proceed

I think the logic inside the Boxstarter bootstrapper where it checks for a -v to also decide if -y is needed isn't working. Attached is a screenshot of the bootstrapper hanging, I needed to capture focus then type a '1' and press Enter to continue...
2015-12-30_13-34-40

Could not get the storage format of the medium

I'm following a Chef tutorial (https://learn.chef.io/local-development/windows/get-set-up/get-set-up-vagrant/) and ran into a problem. It looks like Virtual Box is throwing an error when trying to attach the iso:

==> virtualbox-iso: Error attaching ISO: VBoxManage error: VBoxManage.exe: error: Could not get the storage format of the medium 'C:\iso\9600.17050.WINBLUE_REFRESH.140317-1640_X64FRE_SERVER_EVAL_EN-US-IR3_SSS_X64FREE_EN-US_DV9.iso' (VERR_NOT_SUPPORTED)

I'm using:

  • VBoxManage.exe version 5.04r102546
  • Packer.exe version 0.8.6

See my comment on Chef for more details: https://learn.chef.io/local-development/windows/get-set-up/get-set-up-vagrant/#comment-2280143771

Vagrant up fails on 2012r2

When I use a box in vagrant using virtual box, I sometimes get this error after vagrant up. It seems that winRM quits when the post unattend setup is running. (This is on a windows 7 host).

$ vagrant destroy -f 2012test && vagrant up 2012test
==> 2012test: Forcing shutdown of VM...
==> 2012test: Destroying VM and associated drives...
Bringing machine '2012test' up with 'virtualbox' provider...
==> 2012test: Importing base box 'windows_2012_r2_min'...
==> 2012test: Matching MAC address for NAT networking...
==> 2012test: Setting the name of the VM: TTX_2012test_1447369949350_97248
==> 2012test: Clearing any previously set forwarded ports...
==> 2012test: Fixed port collision for 3389 => 3389. Now on port 2200.
==> 2012test: Clearing any previously set network interfaces...
==> 2012test: Preparing network interfaces based on configuration...
    2012test: Adapter 1: nat
==> 2012test: Forwarding ports...
    2012test: 5985 => 5985 (adapter 1)
    2012test: 3389 => 2200 (adapter 1)
==> 2012test: Running 'pre-boot' VM customizations...
==> 2012test: Booting VM...
==> 2012test: Waiting for machine to boot. This may take a few minutes...
    2012test: WinRM address: 127.0.0.1:5985
    2012test: WinRM username: vagrant
    2012test: WinRM transport: plaintext
An error occurred executing a remote WinRM command.

Shell: powershell
Command: hostname
if ($?) { exit 0 } else { if($LASTEXITCODE) { exit $LASTEXITCODE } else { exit 1 } }
Message: [WSMAN ERROR CODE: 2147942421]: <f:WSManFault Code='2147942421' Machine='127.0.0.1' xmlns:f='http://schemas.microsoft.com/wbem/wsman/1/wsmanfault'><f:Message><f:ProviderFault path='%systemroot%\system32\winrscmd.dll' provider='Shell cmd plugin'>The device is not ready. </f:ProviderFault></f:Message></f:WSManFault>

Vagrant file snippet.

Vagrant.configure(2) do |config|
  config.vm.define '2012test' do |testvm|
    testvm.vm.box = 'windows_2012_r2_min'
    testvm.vm.provider :virtualbox do |v, override|
      v.gui = true
      v.customize ["modifyvm", :id, "--memory", 4096]
      v.customize ["modifyvm", :id, "--cpus", 2]
      v.customize ["setextradata", "global", "GUI/SuppressMessages", "all" ]
    end

    testvm.vm.network :forwarded_port, guest: 5985, host: 5985, id: "winrm", auto_correct: true
    testvm.vm.network :forwarded_port, guest: 3389, host: 3389, id: "rdp", auto_correct: true

    testvm.omnibus.chef_version = :latest

    testvm.vm.communicator = "winrm"
    testvm.winrm.max_tries = 40

    testvm.vm.guest = :windows
    testvm.windows.halt_timeout = 15
  end
end

Versions:

Vagrant 1.7.4
Virtualbox 4.3.28
packer 0.8.6

oracle.cer in git repo is expired

When installing using packer build -force -only virtualbox-iso ./vbox-2016.json there is a failure installing Windows Additions for Virtual Box:
virtualbox-iso: ================================================================================ virtualbox-iso: Error executing actioninstallon resource 'windows_package[virtual box guest additions]' virtualbox-iso: ================================================================================ virtualbox-iso: virtualbox-iso: Mixlib::ShellOut::ShellCommandFailed virtualbox-iso: ------------------------------------ virtualbox-iso: Expected process to exit with [0], but received '1' virtualbox-iso: ---- Begin output of start "" /wait "e:\vboxwindowsadditions.exe" /S & exit %%%%ERRORLEVEL%%%% ---- virtualbox-iso: STDOUT: virtualbox-iso: STDERR: virtualbox-iso: ---- End output of start "" /wait "e:\vboxwindowsadditions.exe" /S & exit %%%%ERRORLEVEL%%%% ---- virtualbox-iso: Ran start "" /wait "e:\vboxwindowsadditions.exe" /S & exit %%%%ERRORLEVEL%%%% returned 1 virtualbox-iso: virtualbox-iso: Resource Declaration: virtualbox-iso: --------------------- virtualbox-iso: # In c:/windows/temp/packer-chef-solo/local-mode-cache/cache/cookbooks/packer-templates/recipes/vbox_guest_additions.rb virtualbox-iso: virtualbox-iso: 13: package "virtual box guest additions" do virtualbox-iso: 14: source "e:/VBoxWindowsAdditions.exe" virtualbox-iso: 15: installer_type :custom virtualbox-iso: 16: options "/S" virtualbox-iso: 17: end virtualbox-iso: virtualbox-iso: Compiled Resource: virtualbox-iso: ------------------ virtualbox-iso: # Declared in c:/windows/temp/packer-chef-solo/local-mode-cache/cache/cookbooks/packer-templates/recipes/vbox_guest_additions.rb:13:infrom_file'`

Problem is that oracle.cer included with git repo expired 12/22/2016.

Solved by patching cookbooks/packer-templates/recipes/vbox_guest_additions.rb:
dsc_resource "Install Oracle Cert" do resource :xCertificateImport property :Thumbprint, "7e92b66be51b79d8ce3ff25c15c2df6ab8c7f2f2" property :Store, "TrustedPublisher" property :Location, "LocalMachine" property :Path, "E:/cert/vbox-sha1.cer" end

Note that I leverage the certificate automatically included by VirtualBox on the mounted E: drive for the running guest. Oracle actually provides three versions of certificates - SHA1, SHA256 and a SHA256-r3 but the SHA1 is the one that seems to work.

Build 'virtualbox-iso' errored: Timeout waiting for WinRM

Hi Matt,

Thanks for the awesome work on packer and boxstarter! I am running the packer-template for 2012r2 to get a current 90 day license. I left it running last night, but it errored out waiting on all the windows patching.

I'm in Seattle on Comcast 100mbps...is it possible to cache any of those window patches? Do I have any other options to get this to complete? I'm re-running now...

-Jimmy

Nano Server Domain?

Sorry, I have a question.

I use your vbox-nano.json build box.
But I can't login when I use the new box.

vbox2016 'xCertificateImport' not found.

host os: Windows 10
iso: en_windows_server_2016_x64_dvd_9327751 (with product key added)
packer: 0.12.2
vagrant: 1.9.1
virtualbox 5.1.18

I have successfully build 2016 boxes previously, but now I am always having the issue that module 'xCertificateImport' cannot be found when it runs the vbox_guest_additions recipe. if I remote in and quickly add it, it then works, but fails on the next powershell module required (xFirewall from memory)

Can't for the life of me work this out, the logs s uggest the xCertificate module was correctly installed by install_ps_modules.

I tried explicitly adding the module to the dsc_resource block:

dsc_resource "Install Oracle Cert" do
  resource :xCertificateImport
  module_name "xCertificate"
  property :Thumbprint, "7e92b66be51b79d8ce3ff25c15c2df6ab8c7f2f2"
  property :Store, "TrustedPublisher"
  property :Location, "LocalMachine"
  property :Path, "e:/cert/vbox-sha1.cer"
end

it fails slightly differently but still complaining about xCertificateImport not being found.

Logs below:

virtualbox-iso: [2017-03-25T00:38:05+00:00] INFO: powershell_script[install xCertificate module] ran successfully
   virtualbox-iso: [2017-03-25T00:38:05+00:00] INFO: Processing dsc_resource[Install Oracle Cert] action run (packer-templates::vbox_guest_additions line 1)
   virtualbox-iso:
   virtualbox-iso: ================================================================================
   virtualbox-iso: Error executing action `run` on resource 'dsc_resource[Install Oracle Cert]'
   virtualbox-iso: ================================================================================
   virtualbox-iso:
   virtualbox-iso: Chef::Exceptions::PowershellCmdletException
   virtualbox-iso: -------------------------------------------
   virtualbox-iso: Powershell Cmdlet failed: trap [Exception] {write-error -exception ($_.Exception.Message);exit 1};Invoke-DscResource -Method test -Name
   virtualbox-iso: xCertificateImport -Property @{Thumbprint='7e92b66be51b79d8ce3ff25c15c2df6ab8c7f2f2';Store='TrustedPublisher';Location=
   virtualbox-iso: 'LocalMachine';Path='e:/cert/vbox-sha1.cer'} -Module xCertificate -Verbose   4>
   virtualbox-iso: 'C:/Users/vagrant/AppData/Local/Temp/verbose20170325-5472-4fkpz9' | convertto-json -compress -depth 5 >
   virtualbox-iso: C:/Users/vagrant/AppData/Local/Temp/json20170325-5472-k72wdz;if ( ! $? ) { exit 1 } : Resource xCertificateImport was
   virtualbox-iso: not found.
   virtualbox-iso: + CategoryInfo          : NotSpecified: (:) [Write-Error], Exception
   virtualbox-iso: + FullyQualifiedErrorId : System.Exception
   virtualbox-iso:
   virtualbox-iso:
   virtualbox-iso: Resource Declaration:
   virtualbox-iso: ---------------------
   virtualbox-iso: # In c:/windows/temp/packer-chef-solo/local-mode-cache/cache/cookbooks/packer-templates/recipes/vbox_guest_additions.rb
   virtualbox-iso:
   virtualbox-iso: 1: dsc_resource "Install Oracle Cert" do
   virtualbox-iso: 2:   resource :xCertificateImport
   virtualbox-iso: 3:   module_name "xCertificate"
   virtualbox-iso: 4:   property :Thumbprint, "7e92b66be51b79d8ce3ff25c15c2df6ab8c7f2f2"
   virtualbox-iso: 5:   property :Store, "TrustedPublisher"
   virtualbox-iso: 6:   property :Location, "LocalMachine"
   virtualbox-iso: 7:   property :Path, "e:/cert/vbox-sha1.cer"
   virtualbox-iso: 8: end
   virtualbox-iso: 9:
   virtualbox-iso:
   virtualbox-iso: Compiled Resource:
   virtualbox-iso: ------------------
   virtualbox-iso: # Declared in c:/windows/temp/packer-chef-solo/local-mode-cache/cache/cookbooks/packer-templates/recipes/vbox_guest_additions.rb:1:in `from_file'
   virtualbox-iso:
   virtualbox-iso: dsc_resource("Install Oracle Cert") do
   virtualbox-iso: action [:run]
   virtualbox-iso: retries 0
   virtualbox-iso: retry_delay 2
   virtualbox-iso: default_guard_interpreter :default
   virtualbox-iso: properties {Thumbprint=>"7e92b66be51b79d8ce3ff25c15c2df6ab8c7f2f2", Store=>"TrustedPublisher", Location=>"LocalMachine", Path=>"e:/cert/vbox-sha1.cer"}
   virtualbox-iso: resource :xCertificateImport
   virtualbox-iso: reboot_action :nothing
   virtualbox-iso: declared_type :dsc_resource
   virtualbox-iso: cookbook_name "packer-templates"
   virtualbox-iso: recipe_name "vbox_guest_additions"
   virtualbox-iso: module_name "xCertificate"
   virtualbox-iso: end
   virtualbox-iso:
   virtualbox-iso: Platform:
   virtualbox-iso: ---------
   virtualbox-iso: x64-mingw32
   virtualbox-iso:
   virtualbox-iso: [2017-03-25T00:38:07+00:00] INFO: Running queued delayed notifications before re-raising exception
   virtualbox-iso: [2017-03-25T00:38:07+00:00] ERROR: Running exception handlers
   virtualbox-iso: [2017-03-25T00:38:07+00:00] ERROR: Exception handlers complete
   virtualbox-iso: [2017-03-25T00:38:07+00:00] FATAL: Stacktrace dumped to c:/windows/temp/packer-chef-solo/local-mode-cache/cache/chef-stacktrace.out
   virtualbox-iso: [2017-03-25T00:38:07+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
   virtualbox-iso: [2017-03-25T00:38:07+00:00] FATAL: Chef::Exceptions::PowershellCmdletException: dsc_resource[Install Oracle Cert] (packer-templates::vbox_guest_additions line 1) had an error: Chef::Exceptions::PowershellCmdletException: Powershell Cmdlet failed: trap [Exception] {write-error -exception ($_.Exception.Message);exit 1};Invoke-DscResource -Method test -Name
   virtualbox-iso: xCertificateImport -Property @{Thumbprint='7e92b66be51b79d8ce3ff25c15c2df6ab8c7f2f2';Store='TrustedPublisher';Location=
   virtualbox-iso: 'LocalMachine';Path='e:/cert/vbox-sha1.cer'} -Module xCertificate -Verbose   4>
   virtualbox-iso: 'C:/Users/vagrant/AppData/Local/Temp/verbose20170325-5472-4fkpz9' | convertto-json -compress -depth 5 >
   virtualbox-iso: C:/Users/vagrant/AppData/Local/Temp/json20170325-5472-k72wdz;if ( ! $? ) { exit 1 } : Resource xCertificateImport was
   virtualbox-iso: not found.
   virtualbox-iso: + CategoryInfo          : NotSpecified: (:) [Write-Error], Exception
   virtualbox-iso: + FullyQualifiedErrorId : System.Exception
   virtualbox-iso:
   virtualbox-iso:
==> virtualbox-iso: Unregistering and deleting virtual machine...
==> virtualbox-iso: Deleting output directory...
Build 'virtualbox-iso' errored: Error executing Chef: Non-zero exit status: 1

==> Some builds didn't complete successfully and had errors:
--> virtualbox-iso: Error executing Chef: Non-zero exit status: 1

==> Builds finished but no artifacts were created.


Low Memory Errors When Installing Windows Updates

I tried to run "packer build -force -only virtualbox-iso .\vbox-win7.json" and I keep getting popups from WIndows saying that the VM is running out of memory.On a similar note, the boxstarter.log file shows that things are failing.

What can I do to fix the problem?

I have already tried increasing the allocated RAM and hard drive space to no avail.

The boxstarter.log file is attached. I renamed the file extension to make GitHub happy.

2 boxstarter.txt

Add a windows Feature on windows 2016 needs a source

The installation of a windows feature ask for a source directory and is not able to download it from windows update. I tried using the gui and powershell with no success.

PS C:\Windows\system32> Add-WindowsFeature RSAT-DNS-Server
Add-WindowsFeature : The request to add or remove features on the specified server failed.
Installation of one or more roles, role services, or features failed.
The source files could not be found.
Use the "Source" option to specify the location of the files that are required to restore the feature. For more
information on specifying a source location, see http://go.microsoft.com/fwlink/?LinkId=243077. Error: 0x800f081f
At line:1 char:1
+ Add-WindowsFeature RSAT-DNS-Server
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (@{Vhd=; Credent...Name=localhost}:PSObject) [Install-WindowsFeature],
    Exception
    + FullyQualifiedErrorId : DISMAPI_Error__Failed_To_Enable_Updates,Microsoft.Windows.ServerManager.Commands.AddWind
   owsFeatureCommand

Success Restart Needed Exit Code      Feature Result
------- -------------- ---------      --------------
False   No             Failed         {}

Timeout waiting for WinRM

First, I just want to say that this is a great contribution, and something that will make it easy for folks to create Windows Server boxes that they can use with Vagrant and Test Kitchen.

I downloaded the .iso and ran packer. It was taking a long time (hours) for the Windows Updates to complete, so I walked away from my computer for awhile. When I came back, the process completed with errors.

Here's my output. Did I miss something along the way?

packer build -force vbox-2012r2.json
virtualbox-iso output will be in this color.

==> virtualbox-iso: Downloading or copying ISO
    virtualbox-iso: Downloading or copying: file:///iso/9600.17050.WINBLUE_REFRESH.140317-1640_X64FRE_SERVER_EVAL_EN-US-IR3_SSS_X64FREE_EN-US_DV9.ISO
==> virtualbox-iso: Creating floppy disk...
    virtualbox-iso: Copying: answer_files/2012_r2/Autounattend.xml
    virtualbox-iso: Copying: scripts/postunattend.xml
    virtualbox-iso: Copying: scripts/boxstarter.ps1
    virtualbox-iso: Copying: scripts/package.ps1
==> virtualbox-iso: Creating virtual machine...
==> virtualbox-iso: Creating hard drive...
==> virtualbox-iso: Attaching floppy disk...
==> virtualbox-iso: Creating forwarded port mapping for SSH (host port 2322)
==> virtualbox-iso: Executing custom VBoxManage commands...
    virtualbox-iso: Executing: modifyvm packer-virtualbox-iso-1438092104 --natpf1 guest_winrm,tcp,,55985,,5985
    virtualbox-iso: Executing: modifyvm packer-virtualbox-iso-1438092104 --memory 2048
    virtualbox-iso: Executing: modifyvm packer-virtualbox-iso-1438092104 --cpus 2
==> virtualbox-iso: Starting the virtual machine...
==> virtualbox-iso: Waiting 10s for boot...
==> virtualbox-iso: Typing the boot command...
==> virtualbox-iso: Waiting for WinRM to become available...
==> virtualbox-iso: Timeout waiting for WinRM.
==> virtualbox-iso: Unregistering and deleting virtual machine...
==> virtualbox-iso: Deleting output directory...
Build 'virtualbox-iso' errored: Timeout waiting for WinRM.

==> Some builds didn't complete successfully and had errors:
--> virtualbox-iso: Timeout waiting for WinRM.

==> Builds finished but no artifacts were created.

chef unable to install windows features on this image

I have a slightly modified fork of this repo generating windows 2012 R2 images.

Problem

In test kitchen, the windows cookbook is unable to install any windows features. However if I RDP into the vm and manually run dism.exe the windows features install without problem.

windows_feature 'IIS-ASPNET45' do
  action :install
  all true
end
       [2016-06-28T21:02:57+00:00] FATAL: Stacktrace dumped to C:/Users/ADMINI~1/AppData/Local/Temp/kitchen/cache/chef-stacktrace.out
       [2016-06-28T21:02:57+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
       [2016-06-28T21:02:57+00:00] FATAL: Mixlib::ShellOut::ShellCommandFailed: windows_feature[Application-Server-WAS-Support] (nd-web::windows_feature line 33) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0, 42, 127, 3010], but received '-2146498298'
       ---- Begin output of C:\Windows\system32\dism.exe /online /enable-feature /featurename:Application-Server-WAS-Support /norestart  /All ----
       STDOUT: Deployment Image Servicing and Management tool
       Version: 6.3.9600.17031

       Image Version: 6.3.9600.17031

       Enabling feature(s)

       Error: 0x800f0906

       The source files could not be downloaded.
       Use the "source" option to specify the location of the files that are required to restore the feature. For more information on specifying a source location, see http://go.microsoft.com/fwlink/?LinkId=243077.

       The DISM log file can be found at C:\Windows\Logs\DISM\dism.log
       STDERR:
       ---- End output of C:\Windows\system32\dism.exe /online /enable-feature /featurename:Application-Server-WAS-Support /norestart  /All ----

screenshot 2016-06-28 15 11 06

Cause

According to smurawski's comment here dism.exe won't use windows update as a source when executed from winrm. That would explain the symptoms.
I have other golden images (not built by this packer repo) that are able to install windows_features using the same chef cookbooks.
I don't understand what is different in this image that causes dism.exe to fail over winrm/chef.

Theories

I've tried running the following with no luck.

Dism.exe /online /Cleanup-Image /StartComponentCleanup
sfc /scannow
Dism /Online /Cleanup-Image /RestoreHealth
sfc /scannow
  • The package.ps1 step that removes unused windows features is removing something critical that prevents dism.exe from later working from chef

I'm making some boxes to try and test these theories. Do you have any other ideas or suggestions?

ISO contained updates are ignored

I patched my installation ISO with all current updates with NTLite. To check this I installed the Server 2012 R2 manually with this ISO. Then it finds only 5 additional updates after installation.

If I use the packer template with the same ISO, choco installs 159 updates. That's exactly the amount of updates it would install if the ISO would not be patched at all.

Am I missing here something or why are updates already applied to the ISO not respected during the packer process?

VBoxGuestAdditions.iso installation fails because oracle.cer is not valid anymore ?

I have failures when building boxes and installing the VBox Guest Additions. It looks like oracle.cer is not valid anymore which might be the cause:

thoth:packer-templates dom$ openssl x509 -in scripts/oracle.cer -inform DER -text | grep -A 2 Validity
        Validity
            Not Before: Dec 23 00:00:00 2013 GMT
            Not After : Dec 22 23:59:59 2016 GMT

When I install them by hand afterwards it works but I have to validate the package when running it.

chef provisioner within 2016 server template fails

Here's the debug output from running PACKER_LOG=1 packer build --only=virtualbox-iso -var 'iso_url=file:///Volumes/myusb/14393.0.160715-1616.RS1_RELEASE_SERVER_EVAL_X64FRE_EN-US.ISO' ./vbox-2016.json having patched in the winrm_port to the template as suggested via your blog:

2017/01/02 17:19:15 ui: ==> virtualbox-iso: Provisioning with chef-solo
2017/01/02 17:19:15 ui:     virtualbox-iso: Creating directory: C:/Windows/Temp/packer-chef-solo
    virtualbox-iso: <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="information" RefId="1"><TN RefId="1"><T>System.Management.Automation.InformationRecord</T><T>System.Object</T></TN><ToString>waiting 5 minutes</ToString><Props><Obj N="MessageData" RefId="2"><TN RefId="2"><T>System.Management.Automation.HostInformationMessage</T><T>System.Object</T></TN><ToString>waiting 5 minutes</ToString><Props><S N="Message">waiting 5 minutes</S><B N="NoNewLine">false</B><S N="ForegroundColor">Gray</S><S N="BackgroundColor">Black</S></Props></Obj><S N="Source">C:\Windows\Temp\script.ps1</S><DT N="TimeGenerated">2017-01-02T17:11:26.2658437+00:00</DT><Obj N="Tags" RefId="3"><TN RefId="3"><T>System.Collections.Generic.List`1[[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]</T><T>System.Object</T></TN><LST><S>PSHOST</S></LST></Obj><S N="User">VAGRANT-H1N2TDC\vagrant</S><S N="Computer">VAGRANT-H1N2TDC</S><U32 N="ProcessId">2364</U32><U32 N="NativeThreadId">2788</U32><U32 N="ManagedThreadId">9</U32></Props></Obj><Obj S="information" RefId="4"><TNRef RefId="1" /><ToString>Attempting to uninstall features...</ToString><Props><Obj N="MessageData" RefId="5"><TNRef RefId="2" /><ToString>Attempting to uninstall features...</ToString><Props><S N="Message">Attempting to uninstall features...</S><B N="NoNewLine">false</B><S N="ForegroundColor">Gray</S><S N="BackgroundColor">Black</S></Props></Obj><S N="Source">C:\Windows\Temp\script.ps1</S><DT N="TimeGenerated">2017-01-02T17:16:26.1814509+00:00</DT><Obj N="Tags" RefId="6"><TNRef RefId="3" /><LST><S>PSHOST</S></LST></Obj><S N="User">VAGRANT-H1N2TDC\vagrant</S><S N="Computer">VAGRANT-H1N2TDC</S><U32 N="ProcessId">2364</U32><U32 N="NativeThreadId">2788</U32><U32 N="ManagedThreadId">9</U32></Props></Obj><Obj S="information" RefId="7"><TNRef RefId="1" /><ToString>Uninstall succeeded!</ToString><Props><Obj N="MessageData" RefId="8"><TNRef RefId="2" /><ToString>Uninstall succeeded!</ToString><Props><S N="Message">Uninstall succeeded!</S><B N="NoNewLine">false</B><S N="ForegroundColor">Gray</S><S N="BackgroundColor">Black</S></Props></Obj><S N="Source">C:\Windows\Temp\script.ps1</S><DT N="TimeGenerated">2017-01-02T17:19:15.5164678+00:00</DT><Obj N="Tags" RefId="9"><TNRef RefId="3" /><LST><S>PSHOST</S></LST></Obj><S N="User">VAGRANT-H1N2TDC\vagrant</S><S N="Computer">VAGRANT-H1N2TDC</S><U32 N="ProcessId">2364</U32><U32 N="NativeThreadId">2788</U32><U32 N="ManagedThreadId">9</U32></Props></Obj></Objs>
==> virtualbox-iso: Provisioning with chef-solo
    virtualbox-iso: Creating directory: C:/Windows/Temp/packer-chef-solo
2017/01/02 17:19:15 packer: 2017/01/02 17:19:15 [INFO] starting remote command: powershell.exe -Command "New-Item -ItemType directory -Force -ErrorAction SilentlyContinue -Path C:/Windows/Temp/packer-chef-solo"
2017/01/02 17:19:17 packer: 2017/01/02 17:19:17 [INFO] command 'powershell.exe -Command "New-Item -ItemType directory -Force -ErrorAction SilentlyContinue -Path C:/Windows/Temp/packer-chef-solo"' exited with code: 0
2017/01/02 17:19:17 packer: 2017/01/02 17:19:17 [INFO] RPC endpoint: Communicator ended with: 0
2017/01/02 17:19:17 [INFO] 407 bytes written for 'stdout'
2017/01/02 17:19:17 [INFO] 0 bytes written for 'stderr'
2017/01/02 17:19:17 [INFO] RPC client: Communicator ended with: 0
2017/01/02 17:19:17 [INFO] RPC endpoint: Communicator ended with: 0
2017/01/02 17:19:17 ui:     virtualbox-iso:
2017/01/02 17:19:17 packer: 2017/01/02 17:19:17 [INFO] 407 bytes written for 'stdout'
2017/01/02 17:19:17 packer: 2017/01/02 17:19:17 [INFO] 0 bytes written for 'stderr'
    virtualbox-iso:
2017/01/02 17:19:17 packer: 2017/01/02 17:19:17 [INFO] RPC client: Communicator ended with: 0
2017/01/02 17:19:17 ui:     virtualbox-iso:
    virtualbox-iso:
2017/01/02 17:19:17 ui:     virtualbox-iso: Directory: C:\Windows\Temp
    virtualbox-iso: Directory: C:\Windows\Temp
2017/01/02 17:19:17 ui:     virtualbox-iso:
    virtualbox-iso:
2017/01/02 17:19:17 ui:     virtualbox-iso:
    virtualbox-iso:
2017/01/02 17:19:17 ui:     virtualbox-iso: Mode                LastWriteTime         Length Name
    virtualbox-iso: Mode                LastWriteTime         Length Name
2017/01/02 17:19:17 ui:     virtualbox-iso: ----                -------------         ------ ----
    virtualbox-iso: ----                -------------         ------ ----
2017/01/02 17:19:17 ui:     virtualbox-iso: d-----         1/2/2017   4:44 PM                packer-chef-solo
    virtualbox-iso: d-----         1/2/2017   4:44 PM                packer-chef-solo
2017/01/02 17:19:17 ui:     virtualbox-iso:
    virtualbox-iso:
2017/01/02 17:19:17 ui:     virtualbox-iso:
    virtualbox-iso:
2017/01/02 17:19:18 packer: 2017/01/02 17:19:18 [INFO] starting remote command: echo 'skipping chmod 0777 C:/Windows/Temp/packer-chef-solo'
2017/01/02 17:19:18 packer: 2017/01/02 17:19:18 [INFO] command 'echo 'skipping chmod 0777 C:/Windows/Temp/packer-chef-solo'' exited with code: 0
2017/01/02 17:19:18 packer: 2017/01/02 17:19:18 [INFO] RPC endpoint: Communicator ended with: 0
2017/01/02 17:19:18 [INFO] 56 bytes written for 'stdout'
2017/01/02 17:19:18 [INFO] 0 bytes written for 'stderr'
2017/01/02 17:19:18 [INFO] RPC client: Communicator ended with: 0
2017/01/02 17:19:18 [INFO] RPC endpoint: Communicator ended with: 0
2017/01/02 17:19:18 ui:     virtualbox-iso: 'skipping chmod 0777 C:/Windows/Temp/packer-chef-solo'
2017/01/02 17:19:18 packer: 2017/01/02 17:19:18 [INFO] 56 bytes written for 'stdout'
2017/01/02 17:19:18 packer: 2017/01/02 17:19:18 [INFO] 0 bytes written for 'stderr'
2017/01/02 17:19:18 packer: 2017/01/02 17:19:18 [INFO] RPC client: Communicator ended with: 0
    virtualbox-iso: 'skipping chmod 0777 C:/Windows/Temp/packer-chef-solo'
2017/01/02 17:19:18 ui:     virtualbox-iso: Creating configuration file 'solo.rb'
    virtualbox-iso: Creating configuration file 'solo.rb'
2017/01/02 17:19:18 packer: 2017/01/02 17:19:18 [INFO] 120 bytes written for 'uploadData'
2017/01/02 17:19:18 [INFO] 120 bytes written for 'uploadData'
2017/01/02 17:19:18 packer: 2017/01/02 17:19:18 Uploading file to 'C:/Windows/Temp/packer-chef-solo/solo.rb'
2017/01/02 17:19:19 packer: #< CLIXML
2017/01/02 17:19:21 ui:     virtualbox-iso: Creating JSON attribute file
    virtualbox-iso: Creating JSON attribute file
2017/01/02 17:19:21 packer: 2017/01/02 17:19:21 [INFO] 366 bytes written for 'uploadData'
2017/01/02 17:19:21 [INFO] 366 bytes written for 'uploadData'
2017/01/02 17:19:21 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>2017/01/02 17:19:21 Uploading file to 'C:/Windows/Temp/packer-chef-solo/node.json'
2017/01/02 17:19:23 packer: #< CLIXML
2017/01/02 17:19:25 ui:     virtualbox-iso: Executing Chef: c:/opscode/chef/bin/chef-solo.bat --no-color -c C:/Windows/Temp/packer-chef-solo/solo.rb -j C:/Windows/Temp/packer-chef-solo/node.json
    virtualbox-iso: Executing Chef: c:/opscode/chef/bin/chef-solo.bat --no-color -c C:/Windows/Temp/packer-chef-solo/solo.rb -j C:/Windows/Temp/packer-chef-solo/node.json
2017/01/02 17:19:25 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>2017/01/02 17:19:25 [INFO] starting remote command: c:/opscode/chef/bin/chef-solo.bat --no-color -c C:/Windows/Temp/packer-chef-solo/solo.rb -j C:/Windows/Temp/packer-chef-solo/node.json
2017/01/02 17:19:37 ui:     virtualbox-iso: [2017-01-02T17:19:37+00:00] INFO: Started chef-zero at chefzero://localhost:8889 with repository at c:/windows/temp/packer-chef-client, c:/windows/temp/packer-chef-client
    virtualbox-iso: [2017-01-02T17:19:37+00:00] INFO: Started chef-zero at chefzero://localhost:8889 with repository at c:/windows/temp/packer-chef-client, c:/windows/temp/packer-chef-client
2017/01/02 17:19:37 ui:     virtualbox-iso: One version per cookbook
    virtualbox-iso: One version per cookbook
2017/01/02 17:19:37 ui:     virtualbox-iso:
    virtualbox-iso:
2017/01/02 17:19:37 ui:     virtualbox-iso: [2017-01-02T17:19:37+00:00] INFO: *** Chef 12.17.44 ***
    virtualbox-iso: [2017-01-02T17:19:37+00:00] INFO: *** Chef 12.17.44 ***
2017/01/02 17:19:37 ui:     virtualbox-iso: [2017-01-02T17:19:37+00:00] INFO: Platform: x64-mingw32
    virtualbox-iso: [2017-01-02T17:19:37+00:00] INFO: Platform: x64-mingw32
2017/01/02 17:19:37 ui:     virtualbox-iso: [2017-01-02T17:19:37+00:00] INFO: Chef-client pid: 3420
    virtualbox-iso: [2017-01-02T17:19:37+00:00] INFO: Chef-client pid: 3420
2017/01/02 17:19:45 packer: 2017/01/02 17:19:45 [INFO] command 'c:/opscode/chef/bin/chef-solo.bat --no-color -c C:/Windows/Temp/packer-chef-solo/solo.rb -j C:/Windows/Temp/packer-chef-solo/node.json' exited with code: 1
2017/01/02 17:19:45 packer: 2017/01/02 17:19:45 [INFO] RPC endpoint: Communicator ended with: 1
2017/01/02 17:19:45 [INFO] 13989 bytes written for 'stdout'
2017/01/02 17:19:45 [INFO] 0 bytes written for 'stderr'
2017/01/02 17:19:45 [INFO] RPC client: Communicator ended with: 1
2017/01/02 17:19:45 [INFO] RPC endpoint: Communicator ended with: 1
2017/01/02 17:19:45 packer: 2017/01/02 17:19:45 [INFO] 0 bytes written for 'stderr'
2017/01/02 17:19:45 ui:     virtualbox-iso: [2017-01-02T17:19:45+00:00] INFO: HTTP Request Returned 404 Not Found: Object not found: chefzero://localhost:8889/nodes/VAGRANT-H1N2TDC
2017/01/02 17:19:45 packer: 2017/01/02 17:19:45 [INFO] RPC client: Communicator ended with: 1
    virtualbox-iso: [2017-01-02T17:19:45+00:00] INFO: HTTP Request Returned 404 Not Found: Object not found: chefzero://localhost:8889/nodes/VAGRANT-H1N2TDC
2017/01/02 17:19:45 ui:     virtualbox-iso: [2017-01-02T17:19:45+00:00] ERROR: #<Errno::ENOENT: No such file or directory @ dir_s_mkdir - c:/windows/temp/packer-chef-client/nodes>
    virtualbox-iso: [2017-01-02T17:19:45+00:00] ERROR: #<Errno::ENOENT: No such file or directory @ dir_s_mkdir - c:/windows/temp/packer-chef-client/nodes>
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_root_dir.rb:113:in `mkdir'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_root_dir.rb:113:in `mkdir'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_root_dir.rb:113:in `block in create_child'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_root_dir.rb:111:in `each'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_root_dir.rb:113:in `block in create_child'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_root_dir.rb:111:in `create_child'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_root_dir.rb:111:in `each'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_root_dir.rb:111:in `create_child'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/chef_fs/chef_fs_data_store.rb:822:in `get_dir'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/chef_fs/chef_fs_data_store.rb:822:in `get_dir'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/chef_fs/chef_fs_data_store.rb:796:in `with_parent_dir'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/chef_fs/chef_fs_data_store.rb:796:in `with_parent_dir'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/chef_fs/chef_fs_data_store.rb:253:in `create'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/chef_fs/chef_fs_data_store.rb:253:in `create'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-zero-5.1.0/lib/chef_zero/data_store/v1_to_v2_adapter.rb:34:in `block in create'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-zero-5.1.0/lib/chef_zero/data_store/v1_to_v2_adapter.rb:34:in `block in create'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-zero-5.1.0/lib/chef_zero/data_store/v1_to_v2_adapter.rb:113:in `fix_exceptions'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-zero-5.1.0/lib/chef_zero/data_store/v1_to_v2_adapter.rb:113:in `fix_exceptions'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-zero-5.1.0/lib/chef_zero/data_store/v1_to_v2_adapter.rb:33:in `create'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-zero-5.1.0/lib/chef_zero/data_store/v1_to_v2_adapter.rb:33:in `create'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-zero-5.1.0/lib/chef_zero/rest_base.rb:183:in `create_data'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-zero-5.1.0/lib/chef_zero/rest_base.rb:183:in `create_data'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-zero-5.1.0/lib/chef_zero/endpoints/rest_list_endpoint.rb:31:in `post'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-zero-5.1.0/lib/chef_zero/endpoints/rest_list_endpoint.rb:31:in `post'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-zero-5.1.0/lib/chef_zero/endpoints/nodes_endpoint.rb:24:in `post'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-zero-5.1.0/lib/chef_zero/endpoints/nodes_endpoint.rb:24:in `post'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-zero-5.1.0/lib/chef_zero/rest_base.rb:62:in `call'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-zero-5.1.0/lib/chef_zero/rest_base.rb:62:in `call'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-zero-5.1.0/lib/chef_zero/rest_router.rb:24:in `call'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-zero-5.1.0/lib/chef_zero/rest_router.rb:24:in `call'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-zero-5.1.0/lib/chef_zero/server.rb:665:in `block in app'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-zero-5.1.0/lib/chef_zero/server.rb:665:in `block in app'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-zero-5.1.0/lib/chef_zero/server.rb:337:in `handle_socketless_request'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-zero-5.1.0/lib/chef_zero/server.rb:337:in `handle_socketless_request'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-zero-5.1.0/lib/chef_zero/socketless_server_map.rb:87:in `request'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-zero-5.1.0/lib/chef_zero/socketless_server_map.rb:87:in `request'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-zero-5.1.0/lib/chef_zero/socketless_server_map.rb:33:in `request'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/http/socketless_chef_zero_client.rb:154:in `request'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/http.rb:340:in `block in send_http_request'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/http.rb:372:in `block in retrying_http_errors'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/http.rb:370:in `loop'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/http.rb:370:in `retrying_http_errors'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/http.rb:333:in `send_http_request'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/http.rb:148:in `request'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/http.rb:131:in `post'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/node.rb:616:in `create'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/node.rb:569:in `rescue in find_or_create'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/node.rb:565:in `find_or_create'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/policy_builder/dynamic.rb:72:in `load_node'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/client.rb:468:in `load_node'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/client.rb:270:in `run'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/application.rb:276:in `run_with_graceful_exit_option'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/application.rb:252:in `block in run_chef_client'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/local_mode.rb:44:in `with_server_connectivity'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/application.rb:235:in `run_chef_client'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/application/client.rb:464:in `sleep_then_run_chef_client'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/application/client.rb:451:in `block in interval_run_chef_client'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/application/client.rb:450:in `loop'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/application/client.rb:450:in `interval_run_chef_client'    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-zero-5.1.0/lib/chef_zero/socketless_server_map.rb:33:in `request'

2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/application/client.rb:434:in `run_application'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/application.rb:59:in `run'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/application/solo.rb:226:in `run'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/bin/chef-solo:25:in `<top (required)>'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/bin/chef-solo:68:in `load'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/bin/chef-solo:68:in `<main>'
2017/01/02 17:19:45 ui:     virtualbox-iso: [2017-01-02T17:19:45+00:00] INFO: HTTP Request Returned 500 Internal Server Error: error
2017/01/02 17:19:45 ui:     virtualbox-iso:
2017/01/02 17:19:45 ui:     virtualbox-iso: ================================================================================
2017/01/02 17:19:45 ui:     virtualbox-iso: Chef encountered an error attempting to load the node data for "VAGRANT-H1N2TDC"
2017/01/02 17:19:45 ui:     virtualbox-iso: ================================================================================
2017/01/02 17:19:45 ui:     virtualbox-iso:
2017/01/02 17:19:45 ui:     virtualbox-iso: Unknown Server Error:
2017/01/02 17:19:45 ui:     virtualbox-iso: ---------------------
2017/01/02 17:19:45 ui:     virtualbox-iso: The server had a fatal error attempting to load the node data.
2017/01/02 17:19:45 ui:     virtualbox-iso:
2017/01/02 17:19:45 ui:     virtualbox-iso: Server Response:
2017/01/02 17:19:45 ui:     virtualbox-iso: ----------------    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/http/socketless_chef_zero_client.rb:154:in `request'

2017/01/02 17:19:45 ui:     virtualbox-iso: Exception raised! #<Errno::ENOENT: No such file or directory @ dir_s_mkdir - c:/windows/temp/packer-chef-client/nodes>
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_root_dir.rb:113:in `mkdir'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_root_dir.rb:113:in `block in create_child'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_root_dir.rb:111:in `each'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_root_dir.rb:111:in `create_child'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/chef_fs/chef_fs_data_store.rb:822:in `get_dir'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/chef_fs/chef_fs_data_store.rb:796:in `with_parent_dir'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/chef_fs/chef_fs_data_store.rb:253:in `create'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-zero-5.1.0/lib/chef_zero/data_store/v1_to_v2_adapter.rb:34:in `block in create'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-zero-5.1.0/lib/chef_zero/data_store/v    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/http.rb:340:in `block in send_http_request'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/http.rb:372:in `block in retrying_http_errors'
1_to_v2_adapter.rb:113:in `fix_exceptions'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-zero-5.1.0/lib/chef_zero/data_store/v1_to_v2_adapter.rb:33:in `create'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-zero-5.1.0/lib/chef_zero/rest_base.rb:183:in `create_data'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-zero-5.1.0/lib/chef_zero/endpoints/rest_list_endpoint.rb:31:in `post'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-zero-5.1.0/lib/chef_zero/endpoints/nodes_endpoint.rb:24:in `post'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-zero-5.1.0/lib/chef_zero/rest_base.rb:62:in `call'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-zero-5.1.0/lib/chef_zero/rest_router.rb:24:in `call'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-zero-5.1.0/lib/chef_zero/server.rb:665:in `block in app'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-zero-5.1.0/lib/chef_zero/server.rb:337:in `handle_socketless_request'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/http.rb:370:in `loop'
3.0/gems/chef-zero-5.1.0/lib/chef_zero/socketless_server_map.rb:87:in `request'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-zero-5.1.0/lib/chef_zero/socketless_server_map.rb:33:in `request'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/http/socketless_chef_zero_client.rb:154:in `request'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/http.rb:340:in `block in send_http_request'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/http.rb:372:in `block in retrying_http_errors'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/http.rb:370:in `loop'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/http.rb:370:in `retrying_http_errors'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/http.rb:370:in `retrying_http_errors'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/http.rb:333:in `send_http_request'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/http.rb:333:in `send_http_request'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/http.rb:148:in `request'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/http.rb:148:in `request'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/http.rb:131:in `post'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/http.rb:131:in `post'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/node.rb:616:in `create'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/node.rb:569:in `rescue in find_or_create'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/node.rb:616:in `create'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/node.rb:565:in `find_or_create'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/node.rb:569:in `rescue in find_or_create'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/policy_builder/dynamic.rb:72:in `load_node'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/client.rb:468:in `load_node'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/node.rb:565:in `find_or_create'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/client.rb:270:in `run'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/policy_builder/dynamic.rb:72:in `load_node'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/application.rb:276:in `run_with_graceful_exit_option'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/client.rb:468:in `load_node'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/application.rb:252:in `block in run_chef_client'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/local_mode.rb:44:in `with_server_connectivity'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/client.rb:270:in `run'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/application.rb:235:in `run_chef_client'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/application.rb:276:in `run_with_graceful_exit_option'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/application/client.rb:464:in `sleep_then_run_chef_client'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/application.rb:252:in `block in run_chef_client'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/application/client.rb:451:in `block in interval_run_chef_client'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/application/client.rb:450:in `loop'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/local_mode.rb:44:in `with_server_connectivity'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/application/client.rb:450:in `interval_run_chef_client'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/application.rb:235:in `run_chef_client'
2017/01/02 17:19:45 packer: 2017/01/02 17:19:45 [INFO] 13989 bytes written for 'stdout'
2017/01/02 17:19:45 packer: 2017/01/02 17:19:45 [ERR] 'stdout' copy error: io: read/write on closed pipe
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/application/client.rb:434:in `run_application'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/application/client.rb:464:in `sleep_then_run_chef_client'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/application.rb:59:in `run'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/application/solo.rb:226:in `run'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/application/client.rb:451:in `block in interval_run_chef_client'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/bin/chef-solo:25:in `<top (required)>'
    virtualbox-iso: c:/opscode/chef/bin/chef-solo:68:in `load'
    virtualbox-iso: c:/opscode/chef/bin/chef-solo:68:in `<main>'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/application/client.rb:450:in `loop'
    virtualbox-iso: [2017-01-02T17:19:45+00:00] INFO: HTTP Request Returned 500 Internal Server Error: error
    virtualbox-iso:
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/application/client.rb:450:in `interval_run_chef_client'
    virtualbox-iso: ================================================================================
    virtualbox-iso: Chef encountered an error attempting to load the node data for "VAGRANT-H1N2TDC"
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/application/client.rb:434:in `run_application'
    virtualbox-iso: ================================================================================
    virtualbox-iso:
    virtualbox-iso: Unknown Server Error:
    virtualbox-iso: ---------------------
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/application.rb:59:in `run'
    virtualbox-iso: The server had a fatal error attempting to load the node data.
    virtualbox-iso:
    virtualbox-iso: Server Response:
    virtualbox-iso: ----------------
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/application/solo.rb:226:in `run'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/bin/chef-solo:25:in `<top (required)>'
    virtualbox-iso: Exception raised! #<Errno::ENOENT: No such file or directory @ dir_s_mkdir - c:/windows/temp/packer-chef-client/nodes>
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_root_dir.rb:113:in `mkdir'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/bin/chef-solo:68:in `load'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_root_dir.rb:113:in `block in create_child'
2017/01/02 17:19:45 ui:     virtualbox-iso: c:/opscode/chef/bin/chef-solo:68:in `<main>'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_root_dir.rb:111:in `each'
2017/01/02 17:19:45 ui:     virtualbox-iso:
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_root_dir.rb:111:in `create_child'
2017/01/02 17:19:45 ui:     virtualbox-iso: Platform:
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/chef_fs/chef_fs_data_store.rb:822:in `get_dir'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/chef_fs/chef_fs_data_store.rb:796:in `with_parent_dir'
2017/01/02 17:19:45 ui:     virtualbox-iso: ---------
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/chef_fs/chef_fs_data_store.rb:253:in `create'
2017/01/02 17:19:45 ui:     virtualbox-iso: x64-mingw32
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-zero-5.1.0/lib/chef_zero/data_store/v1_to_v2_adapter.rb:34:in `block in create'
2017/01/02 17:19:45 ui:     virtualbox-iso:
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-zero-5.1.0/lib/chef_zero/data_store/v1_to_v2_adapter.rb:113:in `fix_exceptions'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-zero-5.1.0/lib/chef_zero/data_store/v1_to_v2_adapter.rb:33:in `create'
2017/01/02 17:19:45 ui:     virtualbox-iso: [2017-01-02T17:19:45+00:00] ERROR: Running exception handlers
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-zero-5.1.0/lib/chef_zero/rest_base.rb:183:in `create_data'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-zero-5.1.0/lib/chef_zero/endpoints/rest_list_endpoint.rb:31:in `post'
2017/01/02 17:19:45 ui:     virtualbox-iso: [2017-01-02T17:19:45+00:00] ERROR: Exception handlers complete
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-zero-5.1.0/lib/chef_zero/endpoints/nodes_endpoint.rb:24:in `post'
2017/01/02 17:19:45 ui:     virtualbox-iso: [2017-01-02T17:19:45+00:00] FATAL: Stacktrace dumped to c:/windows/temp/packer-chef-solo/local-mode-cache/cache/chef-stacktrace.out
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-zero-5.1.0/lib/chef_zero/rest_base.rb:62:in `call'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-zero-5.1.0/lib/chef_zero/rest_router.rb:24:in `call'
2017/01/02 17:19:45 ui:     virtualbox-iso: [2017-01-02T17:19:45+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-zero-5.1.0/lib/chef_zero/server.rb:665:in `block in app'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-zero-5.1.0/lib/chef_zero/server.rb:337:in `handle_socketless_request'
2017/01/02 17:19:45 ui:     virtualbox-iso: [2017-01-02T17:19:45+00:00] FATAL: Net::HTTPFatalError: 500 "Internal Server Error"
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-zero-5.1.0/lib/chef_zero/socketless_server_map.rb:87:in `request'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-zero-5.1.0/lib/chef_zero/socketless_server_map.rb:33:in `request'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/http/socketless_chef_zero_client.rb:154:in `request'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/http.rb:340:in `block in send_http_request'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/http.rb:372:in `block in retrying_http_errors'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/http.rb:370:in `loop'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/http.rb:370:in `retrying_http_errors'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/http.rb:333:in `send_http_request'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/http.rb:148:in `request'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/http.rb:131:in `post'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/node.rb:616:in `create'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/node.rb:569:in `rescue in find_or_create'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/node.rb:565:in `find_or_create'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/policy_builder/dynamic.rb:72:in `load_node'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/client.rb:468:in `load_node'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/client.rb:270:in `run'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/application.rb:276:in `run_with_graceful_exit_option'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/application.rb:252:in `block in run_chef_client'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/local_mode.rb:44:in `with_server_connectivity'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/application.rb:235:in `run_chef_client'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/application/client.rb:464:in `sleep_then_run_chef_client'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/application/client.rb:451:in `block in interval_run_chef_client'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/application/client.rb:450:in `loop'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/application/client.rb:450:in `interval_run_chef_client'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/application/client.rb:434:in `run_application'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/application.rb:59:in `run'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/application/solo.rb:226:in `run'
    virtualbox-iso: c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/bin/chef-solo:25:in `<top (required)>'
    virtualbox-iso: c:/opscode/chef/bin/chef-solo:68:in `load'
    virtualbox-iso: c:/opscode/chef/bin/chef-solo:68:in `<main>'
    virtualbox-iso:
    virtualbox-iso: Platform:
    virtualbox-iso: ---------
    virtualbox-iso: x64-mingw32
    virtualbox-iso:
    virtualbox-iso: [2017-01-02T17:19:45+00:00] ERROR: Running exception handlers
    virtualbox-iso: [2017-01-02T17:19:45+00:00] ERROR: Exception handlers complete
    virtualbox-iso: [2017-01-02T17:19:45+00:00] FATAL: Stacktrace dumped to c:/windows/temp/packer-chef-solo/local-mode-cache/cache/chef-stacktrace.out
    virtualbox-iso: [2017-01-02T17:19:45+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
    virtualbox-iso: [2017-01-02T17:19:45+00:00] FATAL: Net::HTTPFatalError: 500 "Internal Server Error"

Run boxstarter from google cloud windows-startup-script-ps1 fails

When trying to copy how you run boxstarter from a startup script in https://github.com/mwrock/packer-templates/blob/master/scripts/boxstarter.ps1 when baking an image with Packer on Google Cloud this fails on Import-Module.

The startup script is executed by a service called GCEAgent that runs as local system. That's where the misery starts

Running Import-Module $env:appdata\boxstarter\boxstarter.chocolatey\boxstarter.chocolatey.psd1 results in the following error:

Import-Module : The given assembly name or codebase was invalid. (Exception 
from HRESULT: 0x80131047)
At C:\windows\system32\config\systemprofile\AppData\Roaming\Boxstarter\Boxstart
erShell.ps1:3 char:9
+     % { Import-Module $_.ProviderPath -DisableNameChecking -Force -Er ...
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : NotSpecified: (:) [Import-Module], FileLoadException
+ FullyQualifiedErrorId : System.IO.FileLoadException,Microsoft.PowerShell.Commands.ImportModuleCommand

Alternatives I tested but failed with the same error are

# install chocolatey and boxstarter
$env:chocolateyVersion = "0.10.0"
iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))
cinst BoxStarter.Common --yes --accept-license --version=2.8.29
cinst BoxStarter.WinConfig --yes --accept-license --version=2.8.29
cinst boxstarter.bootstrapper --yes --accept-license --version=2.8.29
cinst boxstarter.chocolatey --yes --accept-license --version=2.8.29
cinst Boxstarter.HyperV --yes --accept-license --version=2.8.29
cinst boxstarter --yes --accept-license --version=2.8.29

# run boxstarter shell
& "C:\ProgramData\chocolatey\lib\boxstarter.chocolatey\tools\BoxstarterShell.ps1"
Import-Module "C:\ProgramData\chocolatey\lib\BoxStarter.Common\tools\Boxstarter.Common\boxstarter.common.psd1"

and

# install chocolatey and boxstarter
$env:chocolateyVersion = "0.10.0"
iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))
cinst BoxStarter.Common --yes --accept-license --version=2.8.29
cinst BoxStarter.WinConfig --yes --accept-license --version=2.8.29
cinst boxstarter.bootstrapper --yes --accept-license --version=2.8.29
cinst boxstarter.chocolatey --yes --accept-license --version=2.8.29
cinst Boxstarter.HyperV --yes --accept-license --version=2.8.29
cinst boxstarter --yes --accept-license --version=2.8.29

# run boxstarter shell
& "${env:AppData}\Boxstarter\BoxstarterShell.ps1"
Import-Module "$($Boxstarter.BaseDir)\Boxstarter.Common\boxstarter.common.psd1"

How can I import the commands to run Install-BoxstarterPackage from this script executed by local system? If I log in with the credentials I create in the script and use to run Install-BoxstarterPackage all works fine.

Error uploading guest additions - breaks building Win7

Trying to build a Windows 7 box I get the following error:

gliverma@green-lizard /storage/repos/mwrock_packer-templates $ packer build vbox-win7-ent.json 
virtualbox-iso output will be in this color.

==> virtualbox-iso: Downloading or copying Guest additions
    virtualbox-iso: Downloading or copying: file:///usr/share/virtualbox/VBoxGuestAdditions.iso
==> virtualbox-iso: Downloading or copying ISO
    virtualbox-iso: Downloading or copying: file:///data/Downloads/_ISOs/Windows/en_windows_7_enterprise_with_sp1_x64_dvd_620201.iso
==> virtualbox-iso: Creating floppy disk...
    virtualbox-iso: Copying: answer_files/win7/Autounattend.xml
    virtualbox-iso: Copying: answer_files/win7/postunattend.xml
    virtualbox-iso: Copying: scripts/boxstarter.ps1
    virtualbox-iso: Copying: scripts/package.ps1
    virtualbox-iso: Copying: scripts/Test-Command.ps1
==> virtualbox-iso: Creating virtual machine...
==> virtualbox-iso: Creating hard drive...
==> virtualbox-iso: Attaching floppy disk...
==> virtualbox-iso: Creating forwarded port mapping for SSH (host port 2476)
==> virtualbox-iso: Executing custom VBoxManage commands...
    virtualbox-iso: Executing: modifyvm packer-virtualbox-iso-1449544140 --natpf1 winrm,tcp,,55985,,5985
    virtualbox-iso: Executing: modifyvm packer-virtualbox-iso-1449544140 --memory 5120
    virtualbox-iso: Executing: modifyvm packer-virtualbox-iso-1449544140 --vram 36
    virtualbox-iso: Executing: modifyvm packer-virtualbox-iso-1449544140 --cpus 2
==> virtualbox-iso: Starting the virtual machine...
==> virtualbox-iso: Waiting 10s for boot...
==> virtualbox-iso: Typing the boot command...
==> virtualbox-iso: Waiting for WinRM to become available...
==> virtualbox-iso: Connected to WinRM!
==> virtualbox-iso: Uploading VirtualBox version info (5.0.10)
==> virtualbox-iso: Uploading VirtualBox guest additions ISO...
==> virtualbox-iso: Unregistering and deleting virtual machine...
==> virtualbox-iso: Deleting output directory...
Build 'virtualbox-iso' errored: Error uploading guest additions: Error uploading file to $env:TEMP\winrmcp-56664c8e-4bda-7dff-10fd-2b2f6d4c06ae.tmp: Couldn't create shell: http error: 500 - <s:Envelope xml:lang="en-US" xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:x="http://schemas.xmlsoap.org/ws/2004/09/transfer" xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:n="http://schemas.xmlsoap.org/ws/2004/09/enumeration" xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" xmlns:p="http://schemas.microsoft.com/wbem/wsman/1/wsman.xsd"><s:Header><a:Action>http://schemas.dmtf.org/wbem/wsman/1/wsman/fault</a:Action><a:MessageID>uuid:2DC4F698-E9B3-4BA4-BD5C-45E97A60D300</a:MessageID><a:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:To><a:RelatesTo>uuid:4a00c3b5-18d3-461e-6bf1-f1ab9c2cb2e5</a:RelatesTo></s:Header><s:Body><s:Fault><s:Code><s:Value>s:Receiver</s:Value><s:Subcode><s:Value>w:InternalError</s:Value></s:Subcode></s:Code><s:Reason><s:Text xml:lang="en-US">Server execution failed </s:Text></s:Reason><s:Detail><f:WSManFault xmlns:f="http://schemas.microsoft.com/wbem/wsman/1/wsmanfault" Code="2148007941" Machine="127.0.0.1"><f:Message><f:ProviderFault provider="Shell cmd plugin" path="%systemroot%\system32\winrscmd.dll">Server execution failed </f:ProviderFault></f:Message></f:WSManFault></s:Detail></s:Fault></s:Body></s:Envelope>

==> Some builds didn't complete successfully and had errors:
--> virtualbox-iso: Error uploading guest additions: Error uploading file to $env:TEMP\winrmcp-56664c8e-4bda-7dff-10fd-2b2f6d4c06ae.tmp: Couldn't create shell: http error: 500 - <s:Envelope xml:lang="en-US" xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:x="http://schemas.xmlsoap.org/ws/2004/09/transfer" xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:n="http://schemas.xmlsoap.org/ws/2004/09/enumeration" xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" xmlns:p="http://schemas.microsoft.com/wbem/wsman/1/wsman.xsd"><s:Header><a:Action>http://schemas.dmtf.org/wbem/wsman/1/wsman/fault</a:Action><a:MessageID>uuid:2DC4F698-E9B3-4BA4-BD5C-45E97A60D300</a:MessageID><a:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:To><a:RelatesTo>uuid:4a00c3b5-18d3-461e-6bf1-f1ab9c2cb2e5</a:RelatesTo></s:Header><s:Body><s:Fault><s:Code><s:Value>s:Receiver</s:Value><s:Subcode><s:Value>w:InternalError</s:Value></s:Subcode></s:Code><s:Reason><s:Text xml:lang="en-US">Server execution failed </s:Text></s:Reason><s:Detail><f:WSManFault xmlns:f="http://schemas.microsoft.com/wbem/wsman/1/wsmanfault" Code="2148007941" Machine="127.0.0.1"><f:Message><f:ProviderFault provider="Shell cmd plugin" path="%systemroot%\system32\winrscmd.dll">Server execution failed </f:ProviderFault></f:Message></f:WSManFault></s:Detail></s:Fault></s:Body></s:Envelope>

==> Builds finished but no artifacts were created.

Installation of AD-Domain-Services fails on win2016 RTM

The Installation of the AD-Domain-Services fails on windows 2016 RTM box. Using the source option does not help.

A Vagrantfile exmplains this best:

# -*- mode: ruby -*-
# vi: set ft=ruby :

$shell_script = <<SCRIPT
  $win2016isoFileName = "14393.0.160715-1616.RS1_RELEASE_SERVER_EVAL_X64FRE_EN-US.ISO"
  $localIso = "C:\\$win2016isoFileName"
  $url = "http://care.dlservice.microsoft.com/dl/download/1/6/F/16FA20E6-4662-482A-920B-1A45CF5AAE3C/14393.0.160715-1616.RS1_RELEASE_SERVER_EVAL_X64FRE_EN-US.ISO"
  Invoke-WebRequest $url -OutFile $localIso
  Mount-DiskImage -ImagePath $localIso

  # Does not work (as expected)
  Install-WindowsFeature -Name RSAT-DNS-Server
  # Works (as expected)
  Install-WindowsFeature -Name RSAT-DNS-Server -Source "WIM:D:\\sources\\install.wim:4"
  # Does not work
  Install-WindowsFeature -Name AD-Domain-Services -Source "WIM:D:\\sources\\install.wim:4"
SCRIPT

VAGRANTFILE_API_VERSION = "2"

# linked clone feature requires 1.8
Vagrant.require_version ">= 1.8" 
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.box = "mwrock/Windows2016"
  config.vm.guest = :windows
  config.vm.communicator = "winrm"
  config.winrm.execution_time_limit = "P1D"

  config.vm.provider "virtualbox" do |v|
    v.linked_clone = true
    v.customize ["modifyvm", :id, "--clipboard", "bidirectional"]
  end

  config.vm.provision "shell", inline: $shell_script
end

Starting this file I got:

    default: Running: inline PowerShell script
==> default: Install-WindowsFeature : The request to add or remove features on the specified server failed.
==> default: Installation of one or more roles, role services, or features failed.
==> default: The source files could not be found.
==> default: Use the "Source" option to specify the location of the files that are required to restore the feature. F
more
==> default: information on specifying a source location, see http://go.microsoft.com/fwlink/?LinkId=243077. Error: 0
0f081f
==> default: At C:\tmp\vagrant-shell.ps1:8 char:3
==> default: +   Install-WindowsFeature -Name RSAT-DNS-Server
==> default: +   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
==> default:     + CategoryInfo          : InvalidOperation: (@{Vhd=; Credent...Name=localhost}:PSObject) [Install-Wi
wsFeature],
==> default:     Exception
==> default:     + FullyQualifiedErrorId : DISMAPI_Error__Failed_To_Enable_Updates,Microsoft.Windows.ServerManager.Co
nds.AddWind
==> default:    owsFeatureCommand
==> default:
==> default: Success Restart Needed Exit Code      Feature Result
==> default: ------- -------------- ---------      --------------
==> default: False   No             Failed         {}
==> default: True    No             Success        {Remote Server Administration Tools, DNS S...
==> default: Install-WindowsFeature : The request to add or remove features on the specified server failed.
==> default:
==> default: Installation of one or more roles, role services, or features failed.
==> default: The source files could not be downloaded.
==> default: Use the "source" option to specify the location of the files that are required to restore the feature. F
more
==> default: information on specifying a source location, see http://go.microsoft.com/fwlink/?LinkId=243077. Error: 0
0f0906
==> default: At C:\tmp\vagrant-shell.ps1:12 char:3
==> default: +   Install-WindowsFeature -Name AD-Domain-Services -Source "WIM:D:\sou ...
==> default: +   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
==> default:     + CategoryInfo          : InvalidOperation: (@{Vhd=; Credent...Name=localhost}:PSObject) [Install-Wi
wsFeature],
==> default:     Exception
==> default:     + FullyQualifiedErrorId : DISMAPI_Error__Cbs_Download_Failure,Microsoft.Windows.ServerManager.Comman
AddWindowsF
==> default:    eatureCommand
==> default: False   No             Failed         {}

Maybe this has something to with 4773174

On the TP5 I had this working.

The term 'virtualbox-iso' is not recognized as the name of a cmdlet, function, script file, or operable program.

I've checked out your repo and ran the following command:

packer build -force -only virtualbox-iso vbox-2012r2.json

As you can see at the end of the output below, there are no lines in the begining of the ps1 script that would generate this kind of output (before the first Write-Host?), so I think it has to do with Packer, right?

This is what I'm getting in the Windows Command Prompt:

==> virtualbox-iso: Provisioning with shell script: scripts/provision.ps1
virtualbox-iso: virtualbox-iso : The term 'virtualbox-iso' is not recognized as the name of a
virtualbox-iso: cmdlet, function, script file, or operable program. Check the spelling of the
virtualbox-iso: name, or if a path was included, verify that the path is correct and try again.
virtualbox-iso: At line:1 char:30
virtualbox-iso: + & { $env:PACKER_BUILDER_TYPE=virtualbox-iso;
virtualbox-iso: $env:PACKER_BUILD_NAME=virtualbox-i ...
virtualbox-iso: + ~~~~~~~~~~~~~~
virtualbox-iso: + CategoryInfo : ObjectNotFound: (virtualbox-iso:String) [], Comm
virtualbox-iso: andNotFoundException
virtualbox-iso: + FullyQualifiedErrorId : CommandNotFoundException
virtualbox-iso:
virtualbox-iso: virtualbox-iso : The term 'virtualbox-iso' is not recognized as the name of a
virtualbox-iso: cmdlet, function, script file, or operable program. Check the spelling of the
virtualbox-iso: name, or if a path was included, verify that the path is correct and try again.
virtualbox-iso: At line:1 char:69
virtualbox-iso: + & { $env:PACKER_BUILDER_TYPE=virtualbox-iso;
virtualbox-iso: $env:PACKER_BUILD_NAME=virtualbox-i ...
virtualbox-iso: +
virtualbox-iso: ~~~~~~~~~~~~
virtualbox-iso: + CategoryInfo : ObjectNotFound: (virtualbox-iso:String) [], Comm
virtualbox-iso: andNotFoundException
virtualbox-iso: + FullyQualifiedErrorId : CommandNotFoundException
virtualbox-iso:
virtualbox-iso: Enabling file sharing firewall rules

Can't login to Nano as of today

This is odd. Today, I updated Virtualbox to the latest version and I can no longer use vagrant / vagrant to log into Windows Nano Server. It tells me I have incorrect credentials. I realize that it is unlikely that the version of Virtualbox has anything to do with it but that is all that has changed, from what I can tell. I tried deleting / re-downloading the box but I get the same error. Any ideas?

patching improvements?

Hi,

Thanks very much for putting this together. I've noticed that the patching functionality downloads and installs patches one-at-a-time until done. Is it possible to download all outstanding patches prior, and then installing them as a bundle?

I think this is controlled by this line in the package.ps1 script:
Install-WindowsUpdate -AcceptEula

I'm not sure where that utility is coming from, or if it's configurable, but it'd be nice if it could be made to download all the patches before installing them. Below is a code snippet that might do the job if it could be incorporated, perhaps with a script parameters to enable/disable WSUS and point to a particular WSUS repo.

Thanks.

-Dave

New-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name "WUServer" -PropertyType "String" -Value 'http://wsus0864.nordstrom.net:80'
New-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate -Name "WUStatusServer" -PropertyType "String" -Value 'http://wsus0864.nordstrom.net:80'

$Criteria = "IsInstalled=0 and Type='Software'"
$Searcher = New-Object -ComObject Microsoft.Update.Searcher
$SearchResult = $Searcher.Search($Criteria).Updates
if ($SearchResult.Count -eq 0) {
exit 0
}
$Session = New-Object -ComObject Microsoft.Update.Session
$Downloader = $Session.CreateUpdateDownloader()
$Downloader.Updates = $SearchResult
$Downloader.Download()
$Installer = New-Object -ComObject Microsoft.Update.Installer
$Installer.Updates = $SearchResult
$Result = $Installer.Install()
if ($Result.rebootRequired) {
Restart-Computer -force
}

Why would installing updates invalidate a password in autounattend?

The windows 2012r2 template work great except for one weird corner case. Matt, do you have any idea whats going on here?

If I change the username to something other than vagrant, AND I install windows updates, then on the first boxstarter reboot, I get "invalid password".

Note that If I do one or the other (change username OR install windows updates), packer builds correctly.

Autounattend has called boxstarter.ps1 and boxstarter has called package.ps1
inside package.ps1, boxstarter is running Install-WindowsUpdate -AcceptEula

screenshot 2016-06-01 13 01 35

package.ps1 has completed and boxstarter is about to reboot
Note the line "Securely Storing installer credentials for automatic login"

screenshot 2016-06-01 13 02 36

Yet on the first boot

screenshot 2016-06-01 13 05 12

I take the exact same configs and replace my username & password with 'vagrant', and autologon works.

screenshot 2016-06-01 13 58 26

  • Vagrant username & windows updates = Success
  • Custom username without windows updates = Success
  • Custom username & windows updates = Failure

I know the user is setup correctly, because I can click ok and type in the password manually. Boxstarter then resumes.

To make sure It isn't a problem with the autounattend.xml, I've tried both plain text and base64 encoded passwords. Both work fine.

  <AutoLogon>
       <Enabled>true</Enabled>
       <Username>installer</Username>
       <Password>
            <Value>xxxxxxxxxxxxxxxxxxxxx</Value>
            <PlainText>false</PlainText>
        </Password>
    </AutoLogon>
  <AutoLogon>
        <Enabled>true</Enabled>
        <Username>installer
</Username>
        <Password>
            <Value>correct-horse-battery-staple</Value>
            <PlainText>true</PlainText>
        </Password>
   </AutoLogon>

I've searched every script for any hard coded references to 'vagrant', I can find none.
I've also checked the external scripts boxstarter calls for any hard coded 'vagrant' references.
It can't be a windows update breaking this since it works with the 'vagrant' user.

I've also tried the following in package.ps1

Install-WindowsUpdate -AcceptEula -SuppressReboots

I can reproduce this 100% of the time. Going on 10 times with the exact same results. Any ideas?

winrm timeout on build

Hi Matt - I just tried to build win2016 again with your latest changes and ran into a winrm timeout. So I used:

PACKER_LOG=1 PACKER_LOG_PATH=~/vbox-2016.log packer build -force -only virtualbox-iso ./vbox-2016.json

In the log file I saw:

2017/01/04 23:59:36 packer: 2017/01/04 23:59:36 Executing VBoxManage: []string{"modifyvm", "packer-virtualbox-iso-1483592365", "--natpf1", "packercomm,tcp,127.0.0.1,3091,,55985"}

Whoa. That isn't what we want!

It appears that when you set winrm_port in the json file, it should be the actual port on the guest not the host (the host port is dynamically calculated via the packercomm forwarding). Thus, there's really no need to allocate the guest_winrm port forwarding rule unless other scripts in the buildchain require it.

I modified the json file to use port 5985, restarted the build, and all is well. FWIW - you could also tell your users to use VBoxManage to discover the dynamic packercomm localhost port forward created by packer (in the above case, 3091) to connect via winrm directly (e.g. pywinrm and friends).

These packer tickets helped me:

Specifically, in vbox-2016.json:

"winrm_port": 5985,

is the Fix.

I'm still waiting for win updates to complete so I can finish by testing creating a build box. Will let you know if I need to do any other patches.

Wrock on...

win2016 virtualbox: Failure with install-oracle-cert during virtualbox guest additions

I'm trying again to build the win2016 virtualbox, and getting a failure. Here's the output as a gist https://gist.github.com/petemounce/64303bde389c2b726b3ddf1ea729687b. I ran it against 9af4b46 on an OSX 10.12 host with packer 0.12.1 and virtualbox 5.1.8.

Log excerpt:

    virtualbox-iso: [2017-01-17T14:13:54+00:00] INFO: Processing powershell_script[Guard resource] action run (dynamically defined)
    virtualbox-iso: [2017-01-17T14:14:00+00:00] INFO: powershell_script[install xCertificate module] ran successfully
    virtualbox-iso: [2017-01-17T14:14:00+00:00] INFO: Processing dsc_resource[Install Oracle Cert] action run (packer-templates::vbox_guest_additions line 1)
    virtualbox-iso:
    virtualbox-iso: ================================================================================
    virtualbox-iso: Error executing action `run` on resource 'dsc_resource[Install Oracle Cert]'
    virtualbox-iso: ================================================================================
    virtualbox-iso:
    virtualbox-iso: Chef::Exceptions::PowershellCmdletException
    virtualbox-iso: -------------------------------------------
    virtualbox-iso: Powershell Cmdlet failed: PowerShell DSC resource MSFT_xCertificateImport  failed to execute Test-TargetResource functionality with error
    virtualbox-iso: message: Cannot validate argument on parameter 'Path'. File 'e:/cert/vbox-sha1.cer' not found.
    virtualbox-iso: + CategoryInfo          : InvalidOperation: (root/Microsoft/...gurationManager:String) [], CimException
    virtualbox-iso: + FullyQualifiedErrorId : ProviderOperationExecutionFailure
    virtualbox-iso: + PSComputerName        : localhost
    virtualbox-iso:
    virtualbox-iso:
    virtualbox-iso: Resource Declaration:
    virtualbox-iso: ---------------------
    virtualbox-iso: # In c:/windows/temp/packer-chef-solo/local-mode-cache/cache/cookbooks/packer-templates/recipes/vbox_guest_additions.rb
    virtualbox-iso:
    virtualbox-iso: 1: dsc_resource "Install Oracle Cert" do
    virtualbox-iso: 2:   resource :xCertificateImport
    virtualbox-iso: 3:   property :Thumbprint, "7e92b66be51b79d8ce3ff25c15c2df6ab8c7f2f2"
    virtualbox-iso: 4:   property :Store, "TrustedPublisher"
    virtualbox-iso: 5:   property :Location, "LocalMachine"
    virtualbox-iso: 6:   property :Path, "e:/cert/vbox-sha1.cer"
    virtualbox-iso: 7: end
    virtualbox-iso: 8:
    virtualbox-iso:
    virtualbox-iso: Compiled Resource:
    virtualbox-iso: ------------------
    virtualbox-iso: # Declared in c:/windows/temp/packer-chef-solo/local-mode-cache/cache/cookbooks/packer-templates/recipes/vbox_guest_additions.rb:1:in `from_file'
    virtualbox-iso:
    virtualbox-iso: dsc_resource("Install Oracle Cert") do
    virtualbox-iso: action [:run]
    virtualbox-iso: retries 0
    virtualbox-iso: retry_delay 2
    virtualbox-iso: default_guard_interpreter :default
    virtualbox-iso: properties {Thumbprint=>"7e92b66be51b79d8ce3ff25c15c2df6ab8c7f2f2", Store=>"TrustedPublisher", Location=>"LocalMachine", Path=>"e:/cert/vbox-sha1.cer"}
    virtualbox-iso: resource :xCertificateImport
    virtualbox-iso: reboot_action :nothing
    virtualbox-iso: declared_type :dsc_resource
    virtualbox-iso: cookbook_name "packer-templates"
    virtualbox-iso: recipe_name "vbox_guest_additions"
    virtualbox-iso: end
    virtualbox-iso:
    virtualbox-iso: Platform:
    virtualbox-iso: ---------
    virtualbox-iso: x64-mingw32
    virtualbox-iso:
    virtualbox-iso: [2017-01-17T14:14:07+00:00] INFO: Running queued delayed notifications before re-raising exception
    virtualbox-iso: [2017-01-17T14:14:07+00:00] ERROR: Running exception handlers
    virtualbox-iso: [2017-01-17T14:14:07+00:00] ERROR: Exception handlers complete
    virtualbox-iso: [2017-01-17T14:14:07+00:00] FATAL: Stacktrace dumped to c:/windows/temp/packer-chef-solo/local-mode-cache/cache/chef-stacktrace.out
    virtualbox-iso: [2017-01-17T14:14:07+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
    virtualbox-iso: [2017-01-17T14:14:07+00:00] FATAL: Chef::Exceptions::PowershellCmdletException: dsc_resource[Install Oracle Cert] (packer-templates::vbox_guest_additions line 1) had an error: Chef::Exceptions::PowershellCmdletException: Powershell Cmdlet failed: PowerShell DSC resource MSFT_xCertificateImport  failed to execute Test-TargetResource functionality with error
    virtualbox-iso: message: Cannot validate argument on parameter 'Path'. File 'e:/cert/vbox-sha1.cer' not found.
    virtualbox-iso: + CategoryInfo          : InvalidOperation: (root/Microsoft/...gurationManager:String) [], CimException
    virtualbox-iso: + FullyQualifiedErrorId : ProviderOperationExecutionFailure
    virtualbox-iso: + PSComputerName        : localhost
    virtualbox-iso:
    virtualbox-iso:
==> virtualbox-iso: Unregistering and deleting virtual machine...
==> virtualbox-iso: Deleting output directory...
Build 'virtualbox-iso' errored: Error executing Chef: Non-zero exit status: 1

vboxmanage convert to VHD

Got some weird error when running the psake build. When it tries to convert the disk to a vhd it does complete only psake thinks the returned progress is an exception.

Error: 21-12-2015 09:26:25:
At D:\TFS\Work\Development\Packer-Templates\psakeBuild.ps1:32 char:3 + ."$env:programfiles\oracle\VirtualBox\VBoxManage.exe" -q clonemediu ... + ~~~~~~~~~~~~~~~~~~~~


I see the disk in the output directory. When I run the command via a dos prompt it all runs fine. Tried to debug the powershell but I am kinda new with Psake.

Seen this before? dunno if it's Psake or just powershell jet. (WMF 5 on Windows 10)

Change in chocolatey install breaks boxstarter.ps1 for 2012 core

Hello,

I encountered an issue while using the win2012 packer template to build an image. Long story short, chocolatey made a change detailed in this issue https://github.com/chocolatey/chocolatey.org/issues/432 that broke the install of chocolatey on win2012 core servers.

To fix this, I add to add this line to the beginning of boxstarter.ps1, prior to it downloading and calling bootstrap.ps1:

$env:chocolateyUseWindowsCompression = "false"

Hope that helps other people who encounter this.

Additional nice-to-have

Hi,
2 things that would be nice to have in a next version:

  • ability to have the shutdown button visible in the login screen (GUI) as enabled by policy "Shutdown: Allow system to be shut down without having to log on"
  • Guest drivers (in my case, Virtual Box extensions) already installed in the machine.

Thanks

Typo in vbox-2016.json?

Line 35:
"cookbook_paths": ["cookbooks", "./vendor/cookbooks"],

When I clone from github, there is no "vendor" folder. Changing line to:
"cookbook_paths": ["cookbooks", "./cookbooks"],

and the packer build command is now working.

Minor Issue

In the release notes for Windows Server 2012R2 (https://atlas.hashicorp.com/mwrock/boxes/Windows2012R2/versions/0.6.0) you use US date format ( ... 12/17/2016 .... This is such a small issue, but it makes it harder to read for those not in the US. Would prefer either written in full (16th Dec 2016) or a more sortable format (2016-12-17).

PS I feel petty raising such a small issue :-(

`Type ENTER to exit` Windows 2012R2

Morning
When I use

packer build -force -only virtualbox-iso .\vbox-2012r2.json

I get the following within the VirtualBox image.

C:\Windows\system32>Call PowerShell -NoProfile -ExecutionPolicy bypass -command
"Import-Module 'C:\Users\vagrant\AppData\Roaming\boxstarter\Boxstarter.Bootstrap
per\boxstarter.bootstrapper.psd1';Invoke-Boxstarter -RebootOk -NoPassword:$True"

Boxstarter Version 2.8.29
(c) 2016 Matt Wrock. http://boxstarter.org

Boxstarter: Disabling Automatic Updates from Windows Update
Attempting to build package from 'temp_BoxstarterPackage.nuspec'.
Successfully created package 'temp_BoxstarterPackage.1.0.0.nupkg'
Boxstarter: Created a temporary package temp_BoxstarterPackage from a:\package.p
s1 in C:\Users\vagrant\AppData\Roaming\boxstarter\BuildPackages
++ Boxstarter starting Calling Chocolatey to install temp_BoxstarterPackage. Thi
s may take several minutes to complete...
Installing the following packages:
temp_BoxstarterPackage
By installing you accept licenses for the packages.

temp_BoxstarterPackage v1.0.0 (forced)
 Boxstarter: Enabling Remote Desktop...
 Boxstarter: Enabling Remote Desktop NLA ...
 Ok.
 Boxstarter: Setting PowerShell execution context to Unrestricted
 Boxstarter: Removing unused features...
 Success Restart Needed Exit Code      Feature Result

 ------- -------------- ---------      --------------

 True    No             NoChangeNeeded {}

 True    No             NoChangeNeeded {}

 + Boxstarter starting Checking for updates...
 Restarting windows update service
 + Boxstarter finished Checking for updates... 00:01:31.6466989
 There is no update applicable to this machine
 Boxstarter: Removing page file
 Boxstarter: Setting up winrm
 Ok.
 Configured LocalAccountTokenFilterPolicy to grant administrative rights remotel
y to local users.
 cfg               : http://schemas.microsoft.com/wbem/wsman/1/config/service/au

                     th
 lang              : en-US
 Basic             : false
 Kerberos          : true
 Negotiate         : true
 Certificate       : false
 CredSSP           : true
 CbtHardeningLevel : Relaxed
 Auth
     Basic = true
     Digest = true
     Kerberos = true
     Negotiate = true
     Certificate = true
     CredSSP = false
 Auth
     Basic = true
     Kerberos = true
     Negotiate = true
     Certificate = false
     CredSSP = true
     CbtHardeningLevel = Relaxed
 Service
     RootSDDL = O:NSG:BAD:P(A;;GA;;;BA)(A;;GR;;;IU)S:P(AU;FA;GA;;;WD)(AU;SA;GXGW
;;;WD)
     MaxConcurrentOperations = 4294967295
     MaxConcurrentOperationsPerUser = 1500
     EnumerationTimeoutms = 240000
     MaxConnections = 300
     MaxPacketRetrievalTimeSeconds = 120
     AllowUnencrypted = true
     Auth
         Basic = true
         Kerberos = true
         Negotiate = true
         Certificate = false
         CredSSP = true
         CbtHardeningLevel = Relaxed
     DefaultPorts
         HTTP = 5985
         HTTPS = 5986
     IPv4Filter = *
     IPv6Filter = *
     EnableCompatibilityHttpListener = false
     EnableCompatibilityHttpsListener = false
     CertificateThumbprint
     AllowRemoteAccess = true
 Boxstarter: winrm setup complete
 The install of temp_boxstarterpackage was successful.

Chocolatey installed 1/1 package(s). 0 package(s) failed.
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
++ Boxstarter finished Calling Chocolatey to install temp_BoxstarterPackage. Thi
s may take several minutes to complete... 00:02:00.2439570
True
Boxstarter: Restore Automatic Updates from Windows Update
Boxstarter: Enabling UAC
Type ENTER to exit:

Not sure what to do next, as pressing ENTER does not do anything other than closing the prompt.

Tried with the WMF5 version and it gets stuck at the same point.

Any ideas?

Shutdown via VBox and Boxstarter not working

  • even with guest additions installed, selecting the "send shutdown signal" or "ACPI Shutdown" actions does nothing.
  • not sure if related, but running if (Test-PendingReboot) { Invoke-Reboot } after installing updates doesn't shutdown the server

README and optional notes

This repo is really great. Since I have an official ISO with a product key, I'd love to add instructions for add the key to your autoattend. Do you have a README draft that I can open a PR against?

Running Packer build version (0.12.0) fails with chef-client-12.17.44

Issue with running remote cookbook
"type": "chef-solo",
"remote_cookbook_paths": [
"c:/windows/temp/packer-chef-client/cookbooks-0",
"c:/windows/temp/packer-chef-client/cookbooks-1"

PS C:\Windows\Temp\packer-chef-solo\local-mode-cache\cache> cat .\chef-stacktrace.out
Generated at 2016-12-13 14:53:45 +0000
Net::HTTPFatalError: 500 "Internal Server Error"
c:/opscode/chef/embedded/lib/ruby/2.3.0/net/http/response.rb:120:in error!' c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/http.rb:150:in request'
c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/http.rb:131:in post' c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/node.rb:616:in create'
c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/node.rb:569:in rescue in find_or_create' c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/node.rb:565:in find_or_create'
c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/policy_builder/dynamic.rb:72:in load_node' c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/client.rb:468:in load_node'
c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/client.rb:270:in run' c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/application.rb:276:in run_with_graceful_exit_option'
c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/application.rb:252:in block in run_chef_client' c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/local_mode.rb:44:in with_server_connectivity'
c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/application.rb:235:in run_chef_client' c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/application/client.rb:464:in sleep_then_run_chef_client'
c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/application/client.rb:451:in block in interval_run_chef_client' c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/application/client.rb:450:in loop'
c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/application/client.rb:450:in interval_run_chef_client' c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/application/client.rb:434:in run_application'
c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/application.rb:59:in run' c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/application/solo.rb:226:in run'
c:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/bin/chef-solo:25:in <top (required)>'c:/opscode/chef/bin/chef-solo:68:in load'
c:/opscode/chef/bin/chef-solo:68:in `

'

Windows2012R2 box and RDP?

Sorry, I realize this project is for dealing with the code and not end-user box usage, but I thought I'd give it a shot as I'm stuck: I'm using mwrock/Windows2012R2 with VirtualBox and can't seem to get into the box after getting it up fine. Any thoughts would be appreciated. This is my first time trying to use a Windows box with Vagrant.

C:\Users\Jeff>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'mwrock/Windows2012R2'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'mwrock/Windows2012R2' is up to date...
==> default: Setting the name of the VM: Jeff_default_1442527095955_80171
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
==> default: Forwarding ports...
    default: 5985 => 55985 (adapter 1)
    default: 5986 => 55986 (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: WinRM address: 127.0.0.1:55985
    default: WinRM username: vagrant
    default: WinRM transport: plaintext
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
    default: No guest additions were detected on the base box for this VM! Guest

    default: additions are required for forwarded ports, shared folders, host on
ly
    default: networking, and more. If SSH fails on this machine, please install
    default: the guest additions and repackage the box to continue.
    default:
    default: This is not an error message; everything may continue to work prope
rly,
    default: in which case you may ignore this message.
==> default: Mounting shared folders...
    default: /vagrant => C:/Users/Jeff

C:\Users\Jeff>vagrant rdp
==> default: Detecting RDP info...
RDP connection information for this machine could not be
detected. This is typically caused when we can't find the IP
or port to connect to for RDP. Please verify you're forwarding
an RDP port and that your machine is accessible.

Either set "ssh_skip_nat_mapping" or let Packer select a WinRM port dynamically

In the current version of Packer (0.12.3), the virtualbox-iso builder tries to discover a suitable port for forwarding winrm (and ssh) traffic dynamically. Unfortunately Packer also overwrites an explicitly configured winrm_port with the discovered port, unless ssh_skip_nat_mapping is also set to true (default is false).

As a consequence, the vbox builds will eventually time out since Packer cannot connect to the Virtualbox VM successfully. I suggest to either add the "ssh_skip_nat_mapping": "true" option to the vbox-<os>.json config files or remove the explicitly configured winrm_port and the corresponding VBox port forwarding rule entirely and let Packer find a suitable port.

Relevant code references in Packer:

Remove-Item can not remove non empty directories

The clean-winsxs step will attempt to remove directories and logs

@(
    "$env:localappdata\Nuget",
    "$env:localappdata\temp\*",
    "$env:windir\logs",
    "$env:windir\panther",
    "$env:windir\temp\*",
    "$env:windir\winsxs\manifestcache"
) | % {
        if(Test-Path $_) {
            Write-Host "Removing $_"
            try {
              Takeown /d Y /R /f $_
              Icacls $_ /GRANT:r administrators:F /T /c /q  2>&1 | Out-Null
              Remove-Item $_ -Recurse -Force | Out-Null 
            } catch { $global:error.RemoveAt(0) }
        }
    }

I find that many of the directories fail to be emptied because of these errors:

Remove-Item : Cannot remove item C:\Windows\logs\CBS: The directory is not empty.
 vmware-iso: SUCCESS: The file (or folder): "C:\Windows\winsxs\manifestcache\b3507e8d4a1eae00_blobs.bin" now owned by user "VAGRANT-3JOB2HR\vagrant".
    vmware-iso: +               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    vmware-iso: + CategoryInfo          : WriteError: (CBS.log:FileInfo) [Remove-Item], IO
    vmware-iso: Exception
    vmware-iso: + FullyQualifiedErrorId : RemoveFileSystemItemIOError,Microsoft.PowerShell
    vmware-iso: .Commands.RemoveItemCommand
    vmware-iso: Remove-Item : Cannot remove item C:\Windows\logs\CBS: The directory is not
    vmware-iso: empty.
    vmware-iso: At C:\Windows\Temp\script.ps1:21 char:15
    vmware-iso: +               Remove-Item $_ -Recurse -Force | Out-Null
    vmware-iso: +               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    vmware-iso: + CategoryInfo          : WriteError: (CBS:DirectoryInfo) [Remove-Item], I
    vmware-iso: OException
    vmware-iso: + FullyQualifiedErrorId : RemoveFileSystemItemIOError,Microsoft.PowerShell
    vmware-iso: .Commands.RemoveItemCommand
    vmware-iso: Remove-Item : Cannot remove item C:\Windows\logs: The directory is not empty.
    vmware-iso: At C:\Windows\Temp\script.ps1:21 char:15
    vmware-iso: +               Remove-Item $_ -Recurse -Force | Out-Null
    vmware-iso: +               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    vmware-iso: + CategoryInfo          : WriteError: (C:\Windows\logs:DirectoryInfo) [Rem
    vmware-iso: ove-Item], IOException
    vmware-iso: + FullyQualifiedErrorId : RemoveFileSystemItemIOError,Microsoft.PowerShell
    vmware-iso: .Commands.RemoveItemCommand
    vmware-iso: Remove-Item : Cannot remove item C:\Windows\winsxs\manifestcache: The
    vmware-iso: directory is not empty.
    vmware-iso: At C:\Windows\Temp\script.ps1:21 char:15
    vmware-iso: +               Remove-Item $_ -Recurse -Force | Out-Null
    vmware-iso: +               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    vmware-iso: + CategoryInfo          : WriteError: (C:\Windows\winsxs\manifestcache:Dir
    vmware-iso: ectoryInfo) [Remove-Item], IOException
    vmware-iso: + FullyQualifiedErrorId : RemoveFileSystemItemIOError,Microsoft.PowerShell
    vmware-iso: .Commands.RemoveItemCommand

I suspect that this is because of the known problems with Remove-Item -Recurse discussed in this stack overflow

http://serverfault.com/a/199994/169180

Windows 7 Installer Shows Setup Wizard

After running "packer build -force -only virtualbox-iso .\vbox-win7.json", Windows asks me to pick an edition of Windows to install and ignore the Autounattend.xml file.

I am running packer version 0.10.1 on Windows 7 SP1 x64 EN-US.

Packer hangs on "Gracefully halting" when WinRM is disabled in the PackerShutdown.bat

I've ran into an issue when packer tries to shutdown the VM when it issues the shutdown command which executes PackerShutdown.bat It will stay stuck on Gracefully halting virtual machine... and will never proceed. I have tested by placing a comment line for the part that disables WinRM by typing REM in front of the line and it then works. However that causes another problem when using vagrant to start the machine it starts up connects to WinRM and then when sys prep reboots the machine vagrant looses the connection and forcibly removes the machine (I think vagrant thinks something went wrong and removes it).

Debug output with "netsh advfirewall firewall set rule name="WinRM-HTTP" new action=block" commented out on the PackerShutdown.bat. This will allow packer to complete but seems to cause issues with vagrant when WinRM is enabled during sys prep.

2016/08/02 23:39:19 ui:     parallels-iso: Directory: C:\Windows\Panther
    parallels-iso: Directory: C:\Windows\Panther
2016/08/02 23:39:19 ui:     parallels-iso:
    parallels-iso:
2016/08/02 23:39:19 ui:     parallels-iso:
    parallels-iso:
2016/08/02 23:39:19 ui:     parallels-iso: Mode                LastWriteTime     Length Name
    parallels-iso: Mode                LastWriteTime     Length Name
2016/08/02 23:39:19 ui:     parallels-iso: ----                -------------     ------ ----
    parallels-iso: ----                -------------     ------ ----
2016/08/02 23:39:19 ui:     parallels-iso: d----          8/2/2016  11:39 PM            Unattend
    parallels-iso: d----          8/2/2016  11:39 PM            Unattend
2016/08/02 23:39:19 ui: ==> parallels-iso: Gracefully halting virtual machine...
==> parallels-iso: Gracefully halting virtual machine...
2016/08/02 23:39:19 packer: 2016/08/02 23:39:19 Executing shutdown command: a:/PackerShutdown.bat
2016/08/02 23:39:19 packer: 2016/08/02 23:39:19 [INFO] starting remote command: a:/PackerShutdown.bat
2016/08/02 23:39:19 ui:     parallels-iso:
    parallels-iso:
2016/08/02 23:39:19 ui:     parallels-iso: C:\Users\vagrant>REM netsh advfirewall firewall set rule name="WinRM-HTTP" new action=block
    parallels-iso: C:\Users\vagrant>REM netsh advfirewall firewall set rule name="WinRM-HTTP" new action=block
2016/08/02 23:39:19 ui:     parallels-iso:
    parallels-iso:
2016/08/02 23:39:19 ui:     parallels-iso: C:\Users\vagrant>C:/windows/system32/sysprep/sysprep.exe /generalize /oobe /unattend:C:/Windows/Panther/Unattend/unattend.xml /quiet /shutdown
    parallels-iso: C:\Users\vagrant>C:/windows/system32/sysprep/sysprep.exe /generalize /oobe /unattend:C:/Windows/Panther/Unattend/unattend.xml /quiet /shutdown
2016/08/02 23:40:29 packer: 2016/08/02 23:40:29 [INFO] command 'a:/PackerShutdown.bat' exited with code: 0
2016/08/02 23:40:29 packer: 2016/08/02 23:40:29 Waiting max 15m0s for shutdown to complete
2016/08/02 23:40:30 packer: 2016/08/02 23:40:30 Checking VM state: running
2016/08/02 23:40:31 packer: 2016/08/02 23:40:31 Checking VM state: running
2016/08/02 23:40:32 packer: 2016/08/02 23:40:32 Checking VM state: running
2016/08/02 23:40:32 packer: 2016/08/02 23:40:32 Checking VM state: running
2016/08/02 23:40:33 packer: 2016/08/02 23:40:33 Checking VM state: running
2016/08/02 23:40:34 packer: 2016/08/02 23:40:34 Checking VM state: running
2016/08/02 23:40:35 packer: 2016/08/02 23:40:35 Checking VM state: running
2016/08/02 23:40:36 packer: 2016/08/02 23:40:36 Checking VM state: running
2016/08/02 23:40:37 packer: 2016/08/02 23:40:37 Checking VM state: running
2016/08/02 23:40:37 packer: 2016/08/02 23:40:37 Checking VM state: running
2016/08/02 23:40:38 packer: 2016/08/02 23:40:38 Checking VM state: running
2016/08/02 23:40:39 packer: 2016/08/02 23:40:39 Checking VM state: running
2016/08/02 23:40:40 packer: 2016/08/02 23:40:40 Checking VM state: stopping
2016/08/02 23:40:41 packer: 2016/08/02 23:40:41 Checking VM state: stopped
2016/08/02 23:40:41 packer: 2016/08/02 23:40:41 VM shut down.
2016/08/02 23:40:41 ui: ==> parallels-iso: Compacting the disk image

Debug output with "netsh advfirewall firewall set rule name="WinRM-HTTP" new action=block". This gets hung on Gracefully halting virtual machine...

2016/08/03 09:13:52 ui:     parallels-iso: copying auto unattend file
    parallels-iso: copying auto unattend file
2016/08/03 09:13:52 [INFO] 0 bytes written for 'stderr'
2016/08/03 09:13:52 [INFO] 664 bytes written for 'stdout'
2016/08/03 09:13:52 [INFO] RPC client: Communicator ended with: 0
2016/08/03 09:13:52 [INFO] RPC endpoint: Communicator ended with: 0
2016/08/03 09:13:52 packer: 2016/08/03 09:13:52 [INFO] command 'powershell "& { $env:PACKER_BUILDER_TYPE=\"parallels-iso\"; $env:PACKER_BUILD_NAME=\"parallels-iso\"; c:/Windows/Temp/script.ps1; exit $LastExitCode}"' exited with code: 0
2016/08/03 09:13:52 packer: 2016/08/03 09:13:52 [INFO] RPC endpoint: Communicator ended with: 0
2016/08/03 09:13:52 packer: 2016/08/03 09:13:52 [INFO] 0 bytes written for 'stderr'
2016/08/03 09:13:52 packer: 2016/08/03 09:13:52 [INFO] RPC client: Communicator ended with: 0
2016/08/03 09:13:52 packer: 2016/08/03 09:13:52 [INFO] 664 bytes written for 'stdout'
2016/08/03 09:13:52 ui:     parallels-iso:
    parallels-iso:
2016/08/03 09:13:52 ui:     parallels-iso:
    parallels-iso:
    parallels-iso: Directory: C:\Windows\setup
    parallels-iso:
2016/08/03 09:13:52 ui:     parallels-iso: Directory: C:\Windows\setup
2016/08/03 09:13:52 ui:     parallels-iso:
2016/08/03 09:13:52 ui:     parallels-iso:
2016/08/03 09:13:52 ui:     parallels-iso: Mode                LastWriteTime     Length Name
2016/08/03 09:13:52 ui:     parallels-iso: ----                -------------     ------ ----
2016/08/03 09:13:52 ui:     parallels-iso: d----          8/3/2016   9:13 AM            scripts
2016/08/03 09:13:52 ui:     parallels-iso:
2016/08/03 09:13:52 ui:     parallels-iso:
2016/08/03 09:13:52 ui:     parallels-iso: Directory: C:\Windows\Panther
2016/08/03 09:13:52 ui:     parallels-iso:
2016/08/03 09:13:52 ui:     parallels-iso:
2016/08/03 09:13:52 ui:     parallels-iso: Mode                LastWriteTime     Length Name
2016/08/03 09:13:52 ui:     parallels-iso: ----                -------------     ------ ----
2016/08/03 09:13:52 ui:     parallels-iso: d----          8/3/2016   9:13 AM            Unattend
2016/08/03 09:13:52 ui: ==> parallels-iso: Gracefully halting virtual machine...
2016/08/03 09:13:52 packer: 2016/08/03 09:13:52 Executing shutdown command: a:/PackerShutdown.bat
    parallels-iso:
    parallels-iso: Mode                LastWriteTime     Length Name
    parallels-iso: ----                -------------     ------ ----
    parallels-iso: d----          8/3/2016   9:13 AM            scripts
    parallels-iso:
    parallels-iso:
    parallels-iso: Directory: C:\Windows\Panther
    parallels-iso:
    parallels-iso:
    parallels-iso: Mode                LastWriteTime     Length Name
    parallels-iso: ----                -------------     ------ ----
    parallels-iso: d----          8/3/2016   9:13 AM            Unattend
==> parallels-iso: Gracefully halting virtual machine...
2016/08/03 09:13:52 packer: 2016/08/03 09:13:52 [INFO] starting remote command: a:/PackerShutdown.bat

It doesn't ever get pass the last line. The VM does get powered down though it just seems like packer never knows this

Any ideas of what is causing this? it seems like if it looses connection to WinRM during shutdown before it gets a successful return code from the PackerShutdown.bat it hangs

I am using the vbox-2012r2.json i've modified it to work with parallels.

{
  "builders": [
    {
      "type": "parallels-iso",
      "prlctl": [
        [ "set", "{{.Name}}", "--memsize", "1536" ],
        [ "set", "{{.Name}}", "--cpus", "1" ],
        [ "set", "{{.Name}}", "--efi-boot", "off" ]
      ],
      "guest_os_type": "win-2012",
      "parallels_tools_flavor": "win",
      "parallels_tools_mode": "attach",
      "iso_url": "{{ user `iso_url` }}",
      "iso_checksum": "{{ user `iso_checksum` }}",
      "iso_checksum_type": "md5",
      "communicator": "winrm",
      "winrm_username": "vagrant",
      "winrm_password": "vagrant",
      "winrm_timeout": "12h",
      "shutdown_command": "a:/PackerShutdown.bat",
      "shutdown_timeout": "15m",
      "floppy_files": [
        "answer_files/2012_r2{{user `core`}}/Autounattend.xml",
        "scripts/oracle.cer",
        "scripts/postunattend.xml",
        "scripts/boxstarter.ps1",
        "scripts/PackerShutdown.bat",
        "scripts/package.ps1",
        "scripts/SetupComplete-2012.cmd",
        "scripts/Test-Command.ps1"
      ]      
    }
  ],
  "provisioners": [
    {
      "type": "powershell",
      "script": "scripts/provision.ps1"
    }
  ],
  "post-processors": [
    [{
      "type": "vagrant",
      "keep_input_artifact": false,
      "output": "windows2012r2min-{{.Provider}}.box",
      "vagrantfile_template": "vagrantfile-windows.template"
    }]
  ],
  "variables": {
    "core": "",
    "guest_additions_mode": "attach",
    "headless": "false",
    "iso_checksum": "5b5e08c490ad16b59b1d9fab0def883a",
    "iso_url": "/Users/xbob/Software/_Trial Software/2012 R2/9600.17050.WINBLUE_REFRESH.140317-1640_X64FRE_SERVER_EVAL_EN-US-IR3_SSS_X64FREE_EN-US_DV9.ISO"
  }
}

No Resource for "windows_feature_dism" for Windows 2016 Template

I'm not sure if I should post the issue here or on the Windows cookbook repository on Github. For me, the Windows Server 2016 build fails with the following message: "Cannot find a resource for windows_feature_dism on windows version 10.0.14393".

I doubt that this will make a difference, but I do use a local copy of the Windows Server 2016 ISO file to keep from having to download and re-download the ISO file every time I do a build when running across errors.

If this issue needs to be reported on the Windows cookbook Github repository, please let me know and close this issue out.

And here is the log file of the build: Windows2106BuildLog.txt

Building server 2012, I get a "Language to install" dialog

When I run the vbox2012-r2.json template, Windows Setup pauses with a "Language to install" dialog. Is this to be expected?

I have made some changes to the template to match my configuration - I switched to a local ISO, and added my license key to the autounattend.xml. I also changed the locale to en-GB and the timezone to GMT Standard. Could these changes be the issue (I thought autounattend.xml was used later in the build, so would not affect this part of the build, but I'm not very familiar with Windows provisioning, so I could easily be mistaken)?

Alternatively, is there a better way to switch the language/timezone and use an activation key, that I should be using rather than hacking the install scripts?

Boxstarter.ps1 failed to invoke expression

Hey I tried to setup a Windows 2012 R2 (x64) Server. It worked properly until my VM restarted after installing, executing the boxstarter.ps1 script.

It fails there somehow to execute the Get-Boxstarter cmdlet as shown in the picture below.
boxstarter_error

This is german and translates to:

The expression after "." in a pipeline element created an invalid object. The expression must be a command name, script block or a CommandInfo object.
In row:1 char:3
[...]

Get-Boxstarter: The definition "Get-Boxstarter" was not recognised as the name of a Cmdlet, a function, or a script file. Check the spelling of the name, wether the path is valid and repeat the process.
[...]

Issues installing 7zip to finish install

packer build -force -only virtualbox-iso vbox-2012r2.json

This seems to work, but then there is an error installing 7zip.commandline. This is with eea6e05. I'm running from a Mac.

    virtualbox-iso: Installing the following packages:
    virtualbox-iso: 7zip.commandline
    virtualbox-iso: By installing you accept licenses for the packages.
    virtualbox-iso: 7zip.commandline not installed. The package was not found with the source(s) listed.
    virtualbox-iso: If you specified a particular version and are receiving this message, it is possible that the package name exists but the version does not.
    virtualbox-iso: 7z : The term '7z' is not recognized as the name of a cmdlet, function, script
    virtualbox-iso: Version: ""
    virtualbox-iso: Source(s): "https://chocolatey.org/api/v2/"
    virtualbox-iso:
    virtualbox-iso: Chocolatey installed 0/1 package(s). 1 package(s) failed.
    virtualbox-iso: See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
    virtualbox-iso: Failures:
    virtualbox-iso: - 7zip.commandline
    virtualbox-iso: file, or operable program. Check the spelling of the name, or if a path was
    virtualbox-iso: included, verify that the path is correct and try again.
    virtualbox-iso: At C:\Windows\Temp\script.ps1:12 char:5
    virtualbox-iso: +     7z x C:\Windows\Temp\VBoxGuestAdditions.iso -oC:\Windows\Temp\virtualbox
    virtualbox-iso: +     ~~
    virtualbox-iso: + CategoryInfo          : ObjectNotFound: (7z:String) [], ParentContainsEr
    virtualbox-iso: rorRecordException
    virtualbox-iso: + FullyQualifiedErrorId : CommandNotFoundException
    virtualbox-iso:
==> virtualbox-iso: Unregistering and deleting virtual machine...
==> virtualbox-iso: Deleting output directory...
Build 'virtualbox-iso' errored: Script exited with non-zero exit status: 1. Allowed exit codes are: [0]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.