boxcutter / windows

Virtual machine templates for Windows written in legacy JSON and Batch Scripting/JScript
Apache License 2.0
756 stars 264 forks source link

VirtualBox build failure (vmtool.bat related?) #34

Closed tcarmean closed 8 years ago

tcarmean commented 9 years ago

It appears as though there is a bug in vmtool.bat that is causing Packer to exit (hitting exit1 in the script), but I'm far from a bat expert and can't spot it. It seems to fail after downloading the Guest Additions ISO.

Operating System: Mac OS X 10.9 (Mavericks) running on 15" Retina MacBook Pro VirtualBox Version: 4.3.28

Tool Versions

08:08 AM [tcarmean@MGC000000425]
[~/src/windows]$ packer --version
0.8.5
08:08 AM [tcarmean@MGC000000425]
[~/src/windows]$ vagrant --version
Vagrant 1.7.4

Makefile.local

# Makefile.local
# Set Chef as the provisioner

CM := chef
WIN7_X64_PRO := file:///Users/tcarmean/iso/en_windows_7_professional_with_sp1_vl_build_x64_dvd_u_677791.iso

Make Target

$make virtualbox/win7x64-pro

Packer Log

2015/08/13 13:50:51 [INFO] Packer version: 0.8.5  60bbe850ef0b7fec19eba1929d83e7267ca1572b
2015/08/13 13:50:51 Packer Target OS/Arch: darwin amd64
2015/08/13 13:50:51 Built with Go Version: go1.4.2
2015/08/13 13:50:51 [DEBUG] Discovered plugin: amazon-chroot = /Users/tcarmean/packer/packer-builder-amazon-chroot
2015/08/13 13:50:51 [DEBUG] Discovered plugin: amazon-ebs = /Users/tcarmean/packer/packer-builder-amazon-ebs
2015/08/13 13:50:51 [DEBUG] Discovered plugin: amazon-instance = /Users/tcarmean/packer/packer-builder-amazon-instance
2015/08/13 13:50:51 [DEBUG] Discovered plugin: digitalocean = /Users/tcarmean/packer/packer-builder-digitalocean
2015/08/13 13:50:51 [DEBUG] Discovered plugin: docker = /Users/tcarmean/packer/packer-builder-docker
2015/08/13 13:50:51 [DEBUG] Discovered plugin: file = /Users/tcarmean/packer/packer-builder-file
2015/08/13 13:50:51 [DEBUG] Discovered plugin: googlecompute = /Users/tcarmean/packer/packer-builder-googlecompute
2015/08/13 13:50:51 [DEBUG] Discovered plugin: null = /Users/tcarmean/packer/packer-builder-null
2015/08/13 13:50:51 [DEBUG] Discovered plugin: openstack = /Users/tcarmean/packer/packer-builder-openstack
2015/08/13 13:50:51 [DEBUG] Discovered plugin: parallels-iso = /Users/tcarmean/packer/packer-builder-parallels-iso
2015/08/13 13:50:51 [DEBUG] Discovered plugin: parallels-pvm = /Users/tcarmean/packer/packer-builder-parallels-pvm
2015/08/13 13:50:51 [DEBUG] Discovered plugin: qemu = /Users/tcarmean/packer/packer-builder-qemu
2015/08/13 13:50:51 [DEBUG] Discovered plugin: virtualbox-iso = /Users/tcarmean/packer/packer-builder-virtualbox-iso
2015/08/13 13:50:51 [DEBUG] Discovered plugin: virtualbox-ovf = /Users/tcarmean/packer/packer-builder-virtualbox-ovf
2015/08/13 13:50:51 [DEBUG] Discovered plugin: vmware-iso = /Users/tcarmean/packer/packer-builder-vmware-iso
2015/08/13 13:50:51 [DEBUG] Discovered plugin: vmware-vmx = /Users/tcarmean/packer/packer-builder-vmware-vmx
2015/08/13 13:50:51 [DEBUG] Discovered plugin: artifice = /Users/tcarmean/packer/packer-post-processor-artifice
2015/08/13 13:50:51 [DEBUG] Discovered plugin: atlas = /Users/tcarmean/packer/packer-post-processor-atlas
2015/08/13 13:50:51 [DEBUG] Discovered plugin: compress = /Users/tcarmean/packer/packer-post-processor-compress
2015/08/13 13:50:51 [DEBUG] Discovered plugin: docker-import = /Users/tcarmean/packer/packer-post-processor-docker-import
2015/08/13 13:50:51 [DEBUG] Discovered plugin: docker-push = /Users/tcarmean/packer/packer-post-processor-docker-push
2015/08/13 13:50:51 [DEBUG] Discovered plugin: docker-save = /Users/tcarmean/packer/packer-post-processor-docker-save
2015/08/13 13:50:51 [DEBUG] Discovered plugin: docker-tag = /Users/tcarmean/packer/packer-post-processor-docker-tag
2015/08/13 13:50:51 [DEBUG] Discovered plugin: vagrant = /Users/tcarmean/packer/packer-post-processor-vagrant
2015/08/13 13:50:51 [DEBUG] Discovered plugin: vagrant-cloud = /Users/tcarmean/packer/packer-post-processor-vagrant-cloud
2015/08/13 13:50:51 [DEBUG] Discovered plugin: vsphere = /Users/tcarmean/packer/packer-post-processor-vsphere
2015/08/13 13:50:51 [DEBUG] Discovered plugin: ansible-local = /Users/tcarmean/packer/packer-provisioner-ansible-local
2015/08/13 13:50:51 [DEBUG] Discovered plugin: chef-client = /Users/tcarmean/packer/packer-provisioner-chef-client
2015/08/13 13:50:51 [DEBUG] Discovered plugin: chef-solo = /Users/tcarmean/packer/packer-provisioner-chef-solo
2015/08/13 13:50:51 [DEBUG] Discovered plugin: file = /Users/tcarmean/packer/packer-provisioner-file
2015/08/13 13:50:51 [DEBUG] Discovered plugin: powershell = /Users/tcarmean/packer/packer-provisioner-powershell
2015/08/13 13:50:51 [DEBUG] Discovered plugin: puppet-masterless = /Users/tcarmean/packer/packer-provisioner-puppet-masterless
2015/08/13 13:50:51 [DEBUG] Discovered plugin: puppet-server = /Users/tcarmean/packer/packer-provisioner-puppet-server
2015/08/13 13:50:51 [DEBUG] Discovered plugin: salt-masterless = /Users/tcarmean/packer/packer-provisioner-salt-masterless
2015/08/13 13:50:51 [DEBUG] Discovered plugin: shell = /Users/tcarmean/packer/packer-provisioner-shell
2015/08/13 13:50:51 [DEBUG] Discovered plugin: shell-local = /Users/tcarmean/packer/packer-provisioner-shell-local
2015/08/13 13:50:51 [DEBUG] Discovered plugin: windows-restart = /Users/tcarmean/packer/packer-provisioner-windows-restart
2015/08/13 13:50:51 [DEBUG] Discovered plugin: windows-shell = /Users/tcarmean/packer/packer-provisioner-windows-shell
2015/08/13 13:50:51 Detected home directory from env var: /Users/tcarmean
2015/08/13 13:50:51 Detected home directory from env var: /Users/tcarmean
2015/08/13 13:50:51 Attempting to open config file: /Users/tcarmean/.packerconfig
2015/08/13 13:50:51 [WARN] Config file doesn't exist: /Users/tcarmean/.packerconfig
2015/08/13 13:50:51 Packer config: &{DisableCheckpoint:false DisableCheckpointSignature:false PluginMinPort:10000 PluginMaxPort:25000 Builders:map[amazon-chroot:/Users/tcarmean/packer/packer-builder-amazon-chroot docker:/Users/tcarmean/packer/packer-builder-docker amazon-ebs:/Users/tcarmean/packer/packer-builder-amazon-ebs googlecompute:/Users/tcarmean/packer/packer-builder-googlecompute parallels-iso:/Users/tcarmean/packer/packer-builder-parallels-iso virtualbox-iso:/Users/tcarmean/packer/packer-builder-virtualbox-iso virtualbox-ovf:/Users/tcarmean/packer/packer-builder-virtualbox-ovf vmware-iso:/Users/tcarmean/packer/packer-builder-vmware-iso amazon-instance:/Users/tcarmean/packer/packer-builder-amazon-instance digitalocean:/Users/tcarmean/packer/packer-builder-digitalocean file:/Users/tcarmean/packer/packer-builder-file null:/Users/tcarmean/packer/packer-builder-null openstack:/Users/tcarmean/packer/packer-builder-openstack parallels-pvm:/Users/tcarmean/packer/packer-builder-parallels-pvm qemu:/Users/tcarmean/packer/packer-builder-qemu vmware-vmx:/Users/tcarmean/packer/packer-builder-vmware-vmx] PostProcessors:map[atlas:/Users/tcarmean/packer/packer-post-processor-atlas docker-import:/Users/tcarmean/packer/packer-post-processor-docker-import vagrant:/Users/tcarmean/packer/packer-post-processor-vagrant vagrant-cloud:/Users/tcarmean/packer/packer-post-processor-vagrant-cloud vsphere:/Users/tcarmean/packer/packer-post-processor-vsphere artifice:/Users/tcarmean/packer/packer-post-processor-artifice compress:/Users/tcarmean/packer/packer-post-processor-compress docker-push:/Users/tcarmean/packer/packer-post-processor-docker-push docker-save:/Users/tcarmean/packer/packer-post-processor-docker-save docker-tag:/Users/tcarmean/packer/packer-post-processor-docker-tag] Provisioners:map[ansible-local:/Users/tcarmean/packer/packer-provisioner-ansible-local chef-solo:/Users/tcarmean/packer/packer-provisioner-chef-solo file:/Users/tcarmean/packer/packer-provisioner-file puppet-masterless:/Users/tcarmean/packer/packer-provisioner-puppet-masterless puppet-server:/Users/tcarmean/packer/packer-provisioner-puppet-server shell-local:/Users/tcarmean/packer/packer-provisioner-shell-local chef-client:/Users/tcarmean/packer/packer-provisioner-chef-client powershell:/Users/tcarmean/packer/packer-provisioner-powershell salt-masterless:/Users/tcarmean/packer/packer-provisioner-salt-masterless shell:/Users/tcarmean/packer/packer-provisioner-shell windows-restart:/Users/tcarmean/packer/packer-provisioner-windows-restart windows-shell:/Users/tcarmean/packer/packer-provisioner-windows-shell]}
2015/08/13 13:50:51 Setting cache directory: /Users/tcarmean/src/windows/packer_cache
2015/08/13 13:50:51 Detected home directory from env var: /Users/tcarmean
2015/08/13 13:50:51 Loading builder: virtualbox-iso
2015/08/13 13:50:51 Creating plugin client for path: /Users/tcarmean/packer/packer-builder-virtualbox-iso
2015/08/13 13:50:51 Starting plugin: /Users/tcarmean/packer/packer-builder-virtualbox-iso []string{"/Users/tcarmean/packer/packer-builder-virtualbox-iso"}
2015/08/13 13:50:51 Waiting for RPC address for: /Users/tcarmean/packer/packer-builder-virtualbox-iso
2015/08/13 13:50:51 packer-builder-virtualbox-iso: 2015/08/13 13:50:51 Plugin minimum port: 10000
2015/08/13 13:50:51 packer-builder-virtualbox-iso: 2015/08/13 13:50:51 Plugin maximum port: 25000
2015/08/13 13:50:51 packer-builder-virtualbox-iso: 2015/08/13 13:50:51 Plugin address: unix /var/folders/9v/hxjs3gjj6c55n7mt7skqm6fn7f3p74/T/packer-plugin700443962
2015/08/13 13:50:51 packer-builder-virtualbox-iso: 2015/08/13 13:50:51 Waiting for connection...
2015/08/13 13:50:51 packer-builder-virtualbox-iso: 2015/08/13 13:50:51 Serving a plugin connection...
2015/08/13 13:50:51 Loading provisioner: windows-shell
2015/08/13 13:50:51 Creating plugin client for path: /Users/tcarmean/packer/packer-provisioner-windows-shell
2015/08/13 13:50:51 Starting plugin: /Users/tcarmean/packer/packer-provisioner-windows-shell []string{"/Users/tcarmean/packer/packer-provisioner-windows-shell"}
2015/08/13 13:50:51 Waiting for RPC address for: /Users/tcarmean/packer/packer-provisioner-windows-shell
2015/08/13 13:50:51 packer-provisioner-windows-shell: 2015/08/13 13:50:51 Plugin minimum port: 10000
2015/08/13 13:50:51 packer-provisioner-windows-shell: 2015/08/13 13:50:51 Plugin maximum port: 25000
2015/08/13 13:50:51 packer-provisioner-windows-shell: 2015/08/13 13:50:51 Plugin address: unix /var/folders/9v/hxjs3gjj6c55n7mt7skqm6fn7f3p74/T/packer-plugin178351131
2015/08/13 13:50:51 packer-provisioner-windows-shell: 2015/08/13 13:50:51 Waiting for connection...
2015/08/13 13:50:51 packer-provisioner-windows-shell: 2015/08/13 13:50:51 Serving a plugin connection...
2015/08/13 13:50:51 Loading post-processor: vagrant
2015/08/13 13:50:51 Creating plugin client for path: /Users/tcarmean/packer/packer-post-processor-vagrant
2015/08/13 13:50:51 Starting plugin: /Users/tcarmean/packer/packer-post-processor-vagrant []string{"/Users/tcarmean/packer/packer-post-processor-vagrant"}
2015/08/13 13:50:51 Waiting for RPC address for: /Users/tcarmean/packer/packer-post-processor-vagrant
2015/08/13 13:50:51 packer-post-processor-vagrant: 2015/08/13 13:50:51 Plugin minimum port: 10000
2015/08/13 13:50:51 packer-post-processor-vagrant: 2015/08/13 13:50:51 Plugin maximum port: 25000
2015/08/13 13:50:51 packer-post-processor-vagrant: 2015/08/13 13:50:51 Plugin address: unix /var/folders/9v/hxjs3gjj6c55n7mt7skqm6fn7f3p74/T/packer-plugin323755945
2015/08/13 13:50:51 packer-post-processor-vagrant: 2015/08/13 13:50:51 Waiting for connection...
2015/08/13 13:50:51 packer-post-processor-vagrant: 2015/08/13 13:50:51 Serving a plugin connection...
2015/08/13 13:50:51 ui: virtualbox-iso output will be in this color.
2015/08/13 13:50:51 ui: 
2015/08/13 13:50:51 Build debug mode: false
2015/08/13 13:50:51 Force build: false
2015/08/13 13:50:51 Preparing build: virtualbox-iso
2015/08/13 13:50:51 Waiting on builds to complete...
2015/08/13 13:50:51 Starting build run: virtualbox-iso
2015/08/13 13:50:51 Running builder: virtualbox-iso
2015/08/13 13:50:51 packer-builder-virtualbox-iso: 2015/08/13 13:50:51 VBoxManage path: /usr/bin/VBoxManage
2015/08/13 13:50:51 packer-builder-virtualbox-iso: 2015/08/13 13:50:51 VBoxManage --version output: 4.3.28r100309
2015/08/13 13:50:51 packer-builder-virtualbox-iso: 2015/08/13 13:50:51 VirtualBox version: 4.3.28
2015/08/13 13:50:52 packer-builder-virtualbox-iso: 2015/08/13 13:50:52 Found Default Guest Additions ISO: /Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso
2015/08/13 13:50:52 packer-builder-virtualbox-iso: 2015/08/13 13:50:52 Guest additions URL: file:///Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso
2015/08/13 13:50:52 ui: ==> virtualbox-iso: Downloading or copying Guest additions
2015/08/13 13:50:52 ui:     virtualbox-iso: Downloading or copying: file:///Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso
2015/08/13 13:50:52 packer-builder-virtualbox-iso: 2015/08/13 13:50:52 Acquiring lock to download: file:///Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso
2015/08/13 13:50:52 packer-builder-virtualbox-iso: 2015/08/13 13:50:52 Parsed URL: &url.URL{Scheme:"file", Opaque:"", User:(*url.Userinfo)(nil), Host:"", Path:"/Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso", RawQuery:"", Fragment:""}
2015/08/13 13:50:52 ui: ==> virtualbox-iso: Downloading or copying ISO
2015/08/13 13:50:52 ui:     virtualbox-iso: Downloading or copying: file:///Users/tcarmean/iso/en_windows_7_professional_with_sp1_vl_build_x64_dvd_u_677791.iso
2015/08/13 13:50:52 packer-builder-virtualbox-iso: 2015/08/13 13:50:52 Acquiring lock to download: file:///Users/tcarmean/iso/en_windows_7_professional_with_sp1_vl_build_x64_dvd_u_677791.iso
2015/08/13 13:50:52 packer-builder-virtualbox-iso: 2015/08/13 13:50:52 Parsed URL: &url.URL{Scheme:"file", Opaque:"", User:(*url.Userinfo)(nil), Host:"", Path:"/Users/tcarmean/iso/en_windows_7_professional_with_sp1_vl_build_x64_dvd_u_677791.iso", RawQuery:"", Fragment:""}
2015/08/13 13:50:52 packer-builder-virtualbox-iso: 2015/08/13 13:50:52 Verifying checksum of /Users/tcarmean/iso/en_windows_7_professional_with_sp1_vl_build_x64_dvd_u_677791.iso
2015/08/13 13:50:57 ui: ==> virtualbox-iso: Creating floppy disk...
2015/08/13 13:50:57 packer-builder-virtualbox-iso: 2015/08/13 13:50:57 Floppy path: /var/folders/9v/hxjs3gjj6c55n7mt7skqm6fn7f3p74/T/packer807048017
2015/08/13 13:50:57 packer-builder-virtualbox-iso: 2015/08/13 13:50:57 Initializing block device backed by temporary file
2015/08/13 13:50:57 packer-builder-virtualbox-iso: 2015/08/13 13:50:57 Formatting the block device with a FAT filesystem...
2015/08/13 13:50:57 packer-builder-virtualbox-iso: 2015/08/13 13:50:57 Initializing FAT filesystem on block device
2015/08/13 13:50:57 packer-builder-virtualbox-iso: 2015/08/13 13:50:57 Reading the root directory from the filesystem
2015/08/13 13:50:57 ui:     virtualbox-iso: Copying: floppy/00-run-all-scripts.cmd
2015/08/13 13:50:57 packer-builder-virtualbox-iso: 2015/08/13 13:50:57 Adding file to floppy: floppy/00-run-all-scripts.cmd
2015/08/13 13:50:57 ui:     virtualbox-iso: Copying: floppy/01-install-wget.cmd
2015/08/13 13:50:57 packer-builder-virtualbox-iso: 2015/08/13 13:50:57 Adding file to floppy: floppy/01-install-wget.cmd
2015/08/13 13:50:57 ui:     virtualbox-iso: Copying: floppy/_download.cmd
2015/08/13 13:50:57 packer-builder-virtualbox-iso: 2015/08/13 13:50:57 Adding file to floppy: floppy/_download.cmd
2015/08/13 13:50:57 ui:     virtualbox-iso: Copying: floppy/_packer_config.cmd
2015/08/13 13:50:57 packer-builder-virtualbox-iso: 2015/08/13 13:50:57 Adding file to floppy: floppy/_packer_config.cmd
2015/08/13 13:50:57 ui:     virtualbox-iso: Copying: floppy/fixnetwork.ps1
2015/08/13 13:50:57 packer-builder-virtualbox-iso: 2015/08/13 13:50:57 Adding file to floppy: floppy/fixnetwork.ps1
2015/08/13 13:50:57 ui:     virtualbox-iso: Copying: floppy/install-winrm.cmd
2015/08/13 13:50:57 packer-builder-virtualbox-iso: 2015/08/13 13:50:57 Adding file to floppy: floppy/install-winrm.cmd
2015/08/13 13:50:57 ui:     virtualbox-iso: Copying: floppy/networkprompt.bat
2015/08/13 13:50:57 packer-builder-virtualbox-iso: 2015/08/13 13:50:57 Adding file to floppy: floppy/networkprompt.bat
2015/08/13 13:50:57 ui:     virtualbox-iso: Copying: floppy/oracle-cert.cer
2015/08/13 13:50:57 packer-builder-virtualbox-iso: 2015/08/13 13:50:57 Adding file to floppy: floppy/oracle-cert.cer
2015/08/13 13:50:57 ui:     virtualbox-iso: Copying: floppy/passwordchange.bat
2015/08/13 13:50:57 packer-builder-virtualbox-iso: 2015/08/13 13:50:57 Adding file to floppy: floppy/passwordchange.bat
2015/08/13 13:50:57 ui:     virtualbox-iso: Copying: floppy/powerconfig.bat
2015/08/13 13:50:57 packer-builder-virtualbox-iso: 2015/08/13 13:50:57 Adding file to floppy: floppy/powerconfig.bat
2015/08/13 13:50:57 ui:     virtualbox-iso: Copying: floppy/win7x64-pro/Autounattend.xml
2015/08/13 13:50:57 packer-builder-virtualbox-iso: 2015/08/13 13:50:57 Adding file to floppy: floppy/win7x64-pro/Autounattend.xml
2015/08/13 13:50:57 ui:     virtualbox-iso: Copying: floppy/zz-start-sshd.cmd
2015/08/13 13:50:57 packer-builder-virtualbox-iso: 2015/08/13 13:50:57 Adding file to floppy: floppy/zz-start-sshd.cmd
2015/08/13 13:50:57 packer-builder-virtualbox-iso: 2015/08/13 13:50:57 Suppressing annoying messages in VirtualBox
2015/08/13 13:50:57 packer-builder-virtualbox-iso: 2015/08/13 13:50:57 Executing VBoxManage: []string{"setextradata", "global", "GUI/RegistrationData", "triesLeft=0"}
2015/08/13 13:50:58 packer-builder-virtualbox-iso: 2015/08/13 13:50:58 stdout:
2015/08/13 13:50:58 packer-builder-virtualbox-iso: 2015/08/13 13:50:58 stderr:
2015/08/13 13:50:58 packer-builder-virtualbox-iso: 2015/08/13 13:50:58 Executing VBoxManage: []string{"setextradata", "global", "GUI/SuppressMessages", "confirmInputCapture,remindAboutAutoCapture,remindAboutMouseIntegrationOff,remindAboutMouseIntegrationOn,remindAboutWrongColorDepth"}
2015/08/13 13:50:58 packer-builder-virtualbox-iso: 2015/08/13 13:50:58 stdout:
2015/08/13 13:50:58 packer-builder-virtualbox-iso: 2015/08/13 13:50:58 stderr:
2015/08/13 13:50:58 packer-builder-virtualbox-iso: 2015/08/13 13:50:58 Executing VBoxManage: []string{"setextradata", "global", "GUI/UpdateCheckCount", "60"}
2015/08/13 13:50:58 packer-builder-virtualbox-iso: 2015/08/13 13:50:58 stdout:
2015/08/13 13:50:58 packer-builder-virtualbox-iso: 2015/08/13 13:50:58 stderr:
2015/08/13 13:50:58 packer-builder-virtualbox-iso: 2015/08/13 13:50:58 Executing VBoxManage: []string{"setextradata", "global", "GUI/UpdateDate", "1 d, 2016-01-01, stable"}
2015/08/13 13:50:58 packer-builder-virtualbox-iso: 2015/08/13 13:50:58 stdout:
2015/08/13 13:50:58 packer-builder-virtualbox-iso: 2015/08/13 13:50:58 stderr:
2015/08/13 13:50:58 ui: ==> virtualbox-iso: Creating virtual machine...
2015/08/13 13:50:58 packer-builder-virtualbox-iso: 2015/08/13 13:50:58 Executing VBoxManage: []string{"createvm", "--name", "win7x64-pro", "--ostype", "Windows7_64", "--register"}
2015/08/13 13:50:58 packer-builder-virtualbox-iso: 2015/08/13 13:50:58 stdout: Virtual machine 'win7x64-pro' is created and registered.
2015/08/13 13:50:58 packer-builder-virtualbox-iso: UUID: 0e9e2235-e58a-450a-b284-d78cebf7ee8e
2015/08/13 13:50:58 packer-builder-virtualbox-iso: Settings file: '/Users/tcarmean/VirtualBox VMs/win7x64-pro/win7x64-pro.vbox'
2015/08/13 13:50:58 packer-builder-virtualbox-iso: 2015/08/13 13:50:58 stderr:
2015/08/13 13:50:58 packer-builder-virtualbox-iso: 2015/08/13 13:50:58 Executing VBoxManage: []string{"modifyvm", "win7x64-pro", "--boot1", "disk", "--boot2", "dvd", "--boot3", "none", "--boot4", "none"}
2015/08/13 13:50:58 packer-builder-virtualbox-iso: 2015/08/13 13:50:58 stdout:
2015/08/13 13:50:58 packer-builder-virtualbox-iso: 2015/08/13 13:50:58 stderr:
2015/08/13 13:50:58 packer-builder-virtualbox-iso: 2015/08/13 13:50:58 Executing VBoxManage: []string{"modifyvm", "win7x64-pro", "--cpus", "1"}
2015/08/13 13:50:58 packer-builder-virtualbox-iso: 2015/08/13 13:50:58 stdout:
2015/08/13 13:50:58 packer-builder-virtualbox-iso: 2015/08/13 13:50:58 stderr:
2015/08/13 13:50:58 packer-builder-virtualbox-iso: 2015/08/13 13:50:58 Executing VBoxManage: []string{"modifyvm", "win7x64-pro", "--memory", "512"}
2015/08/13 13:50:58 packer-builder-virtualbox-iso: 2015/08/13 13:50:58 stdout:
2015/08/13 13:50:58 packer-builder-virtualbox-iso: 2015/08/13 13:50:58 stderr:
2015/08/13 13:50:58 ui: ==> virtualbox-iso: Creating hard drive...
2015/08/13 13:50:58 packer-builder-virtualbox-iso: 2015/08/13 13:50:58 Executing VBoxManage: []string{"createhd", "--filename", "output-virtualbox-iso/win7x64-pro.vdi", "--size", "40960", "--format", "VDI", "--variant", "Standard"}
2015/08/13 13:50:58 packer-builder-virtualbox-iso: 2015/08/13 13:50:58 stdout: Disk image created. UUID: 2ae943d3-ce3b-41e2-8d69-e7b7d3d1604f
2015/08/13 13:50:58 packer-builder-virtualbox-iso: 2015/08/13 13:50:58 stderr: 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
2015/08/13 13:50:58 packer-builder-virtualbox-iso: 2015/08/13 13:50:58 Executing VBoxManage: []string{"storagectl", "win7x64-pro", "--name", "IDE Controller", "--add", "ide"}
2015/08/13 13:50:58 packer-builder-virtualbox-iso: 2015/08/13 13:50:58 stdout:
2015/08/13 13:50:58 packer-builder-virtualbox-iso: 2015/08/13 13:50:58 stderr:
2015/08/13 13:50:58 packer-builder-virtualbox-iso: 2015/08/13 13:50:58 VBoxManage --version output: 4.3.28r100309
2015/08/13 13:50:58 packer-builder-virtualbox-iso: 2015/08/13 13:50:58 VirtualBox version: 4.3.28
2015/08/13 13:50:58 packer-builder-virtualbox-iso: 2015/08/13 13:50:58 Executing VBoxManage: []string{"storagectl", "win7x64-pro", "--name", "SATA Controller", "--add", "sata", "--portcount", "1"}
2015/08/13 13:50:58 packer-builder-virtualbox-iso: 2015/08/13 13:50:58 stdout:
2015/08/13 13:50:58 packer-builder-virtualbox-iso: 2015/08/13 13:50:58 stderr:
2015/08/13 13:50:58 packer-builder-virtualbox-iso: 2015/08/13 13:50:58 Executing VBoxManage: []string{"storageattach", "win7x64-pro", "--storagectl", "SATA Controller", "--port", "0", "--device", "0", "--type", "hdd", "--medium", "output-virtualbox-iso/win7x64-pro.vdi"}
2015/08/13 13:50:58 packer-builder-virtualbox-iso: 2015/08/13 13:50:58 stdout:
2015/08/13 13:50:58 packer-builder-virtualbox-iso: 2015/08/13 13:50:58 stderr:
2015/08/13 13:50:58 packer-builder-virtualbox-iso: 2015/08/13 13:50:58 Executing VBoxManage: []string{"storageattach", "win7x64-pro", "--storagectl", "IDE Controller", "--port", "0", "--device", "1", "--type", "dvddrive", "--medium", "/Users/tcarmean/iso/en_windows_7_professional_with_sp1_vl_build_x64_dvd_u_677791.iso"}
2015/08/13 13:50:58 packer-builder-virtualbox-iso: 2015/08/13 13:50:58 stdout:
2015/08/13 13:50:58 packer-builder-virtualbox-iso: 2015/08/13 13:50:58 stderr:
2015/08/13 13:50:58 packer-builder-virtualbox-iso: 2015/08/13 13:50:58 Not attaching guest additions since we're uploading.
2015/08/13 13:50:58 packer-builder-virtualbox-iso: 2015/08/13 13:50:58 Copying floppy to temp location: /var/folders/9v/hxjs3gjj6c55n7mt7skqm6fn7f3p74/T/packer347862652/floppy.vfd
2015/08/13 13:50:58 ui: ==> virtualbox-iso: Attaching floppy disk...
2015/08/13 13:50:58 packer-builder-virtualbox-iso: 2015/08/13 13:50:58 Executing VBoxManage: []string{"storagectl", "win7x64-pro", "--name", "Floppy Controller", "--add", "floppy"}
2015/08/13 13:50:58 packer-builder-virtualbox-iso: 2015/08/13 13:50:58 stdout:
2015/08/13 13:50:58 packer-builder-virtualbox-iso: 2015/08/13 13:50:58 stderr:
2015/08/13 13:50:58 packer-builder-virtualbox-iso: 2015/08/13 13:50:58 Executing VBoxManage: []string{"storageattach", "win7x64-pro", "--storagectl", "Floppy Controller", "--port", "0", "--device", "0", "--type", "fdd", "--medium", "/var/folders/9v/hxjs3gjj6c55n7mt7skqm6fn7f3p74/T/packer347862652/floppy.vfd"}
2015/08/13 13:50:58 packer-builder-virtualbox-iso: 2015/08/13 13:50:58 stdout:
2015/08/13 13:50:58 packer-builder-virtualbox-iso: 2015/08/13 13:50:58 stderr:
2015/08/13 13:50:58 packer-builder-virtualbox-iso: 2015/08/13 13:50:58 Looking for available SSH port between 2222 and 4444
2015/08/13 13:50:58 packer-builder-virtualbox-iso: 2015/08/13 13:50:58 Trying port: 4273
2015/08/13 13:50:58 ui: ==> virtualbox-iso: Creating forwarded port mapping for SSH (host port 4273)
2015/08/13 13:50:58 packer-builder-virtualbox-iso: 2015/08/13 13:50:58 Executing VBoxManage: []string{"modifyvm", "win7x64-pro", "--natpf1", "packerssh,tcp,127.0.0.1,4273,,5985"}
2015/08/13 13:50:58 packer-builder-virtualbox-iso: 2015/08/13 13:50:58 stdout:
2015/08/13 13:50:58 packer-builder-virtualbox-iso: 2015/08/13 13:50:58 stderr:
2015/08/13 13:50:58 ui: ==> virtualbox-iso: Executing custom VBoxManage commands...
2015/08/13 13:50:58 ui:     virtualbox-iso: Executing: modifyvm win7x64-pro --memory 2048
2015/08/13 13:50:58 packer-builder-virtualbox-iso: 2015/08/13 13:50:58 Executing VBoxManage: []string{"modifyvm", "win7x64-pro", "--memory", "2048"}
2015/08/13 13:50:58 packer-builder-virtualbox-iso: 2015/08/13 13:50:58 stdout:
2015/08/13 13:50:58 packer-builder-virtualbox-iso: 2015/08/13 13:50:58 stderr:
2015/08/13 13:50:58 ui:     virtualbox-iso: Executing: modifyvm win7x64-pro --cpus 1
2015/08/13 13:50:58 packer-builder-virtualbox-iso: 2015/08/13 13:50:58 Executing VBoxManage: []string{"modifyvm", "win7x64-pro", "--cpus", "1"}
2015/08/13 13:50:58 packer-builder-virtualbox-iso: 2015/08/13 13:50:58 stdout:
2015/08/13 13:50:58 packer-builder-virtualbox-iso: 2015/08/13 13:50:58 stderr:
2015/08/13 13:50:58 ui: ==> virtualbox-iso: Starting the virtual machine...
2015/08/13 13:50:58 packer-builder-virtualbox-iso: 2015/08/13 13:50:58 Executing VBoxManage: []string{"startvm", "win7x64-pro", "--type", "gui"}
2015/08/13 13:50:59 packer-builder-virtualbox-iso: 2015/08/13 13:50:59 stdout: Waiting for VM "win7x64-pro" to power on...
2015/08/13 13:50:59 packer-builder-virtualbox-iso: VM "win7x64-pro" has been successfully started.
2015/08/13 13:50:59 packer-builder-virtualbox-iso: 2015/08/13 13:50:59 stderr:
2015/08/13 13:50:59 ui: ==> virtualbox-iso: Waiting 10s for boot...
2015/08/13 13:51:09 ui: ==> virtualbox-iso: Typing the boot command...
2015/08/13 13:51:09 packer-builder-virtualbox-iso: 2015/08/13 13:51:09 Waiting for WinRM, up to timeout: 2h46m40s
2015/08/13 13:51:09 ui: ==> virtualbox-iso: Waiting for WinRM to become available...
2015/08/13 13:51:14 packer-builder-virtualbox-iso: 2015/08/13 13:51:14 [INFO] Attempting WinRM connection...
2015/08/13 13:51:14 packer-builder-virtualbox-iso: 2015/08/13 13:51:14 [DEBUG] connecting to remote shell using WinRM
2015/08/13 13:52:29 packer-builder-virtualbox-iso: 2015/08/13 13:52:29 [ERROR] connection error: unknown error Post http://127.0.0.1:4273/wsman: EOF
2015/08/13 13:52:29 packer-builder-virtualbox-iso: 2015/08/13 13:52:29 [ERROR] WinRM connection err: unknown error Post http://127.0.0.1:4273/wsman: EOF
2015/08/13 13:52:34 packer-builder-virtualbox-iso: 2015/08/13 13:52:34 [INFO] Attempting WinRM connection...
2015/08/13 13:52:34 packer-builder-virtualbox-iso: 2015/08/13 13:52:34 [DEBUG] connecting to remote shell using WinRM
2015/08/13 13:53:49 packer-builder-virtualbox-iso: 2015/08/13 13:53:49 [ERROR] connection error: unknown error Post http://127.0.0.1:4273/wsman: EOF
2015/08/13 13:53:49 packer-builder-virtualbox-iso: 2015/08/13 13:53:49 [ERROR] WinRM connection err: unknown error Post http://127.0.0.1:4273/wsman: EOF
2015/08/13 13:53:54 packer-builder-virtualbox-iso: 2015/08/13 13:53:54 [INFO] Attempting WinRM connection...
2015/08/13 13:53:54 packer-builder-virtualbox-iso: 2015/08/13 13:53:54 [DEBUG] connecting to remote shell using WinRM
2015/08/13 13:55:16 packer-builder-virtualbox-iso: 2015/08/13 13:55:16 [ERROR] connection error: unknown error Post http://127.0.0.1:4273/wsman: EOF
2015/08/13 13:55:16 packer-builder-virtualbox-iso: 2015/08/13 13:55:16 [ERROR] WinRM connection err: unknown error Post http://127.0.0.1:4273/wsman: EOF
2015/08/13 13:55:21 packer-builder-virtualbox-iso: 2015/08/13 13:55:21 [INFO] Attempting WinRM connection...
2015/08/13 13:55:21 packer-builder-virtualbox-iso: 2015/08/13 13:55:21 [DEBUG] connecting to remote shell using WinRM
2015/08/13 13:55:21 packer-builder-virtualbox-iso: 2015/08/13 13:55:21 [ERROR] connection error: unknown error Post http://127.0.0.1:4273/wsman: dial tcp 127.0.0.1:4273: connection refused
2015/08/13 13:55:21 packer-builder-virtualbox-iso: 2015/08/13 13:55:21 [ERROR] WinRM connection err: unknown error Post http://127.0.0.1:4273/wsman: dial tcp 127.0.0.1:4273: connection refused
2015/08/13 13:55:26 packer-builder-virtualbox-iso: 2015/08/13 13:55:26 [INFO] Attempting WinRM connection...
2015/08/13 13:55:26 packer-builder-virtualbox-iso: 2015/08/13 13:55:26 [DEBUG] connecting to remote shell using WinRM
2015/08/13 13:56:15 ui: ==> virtualbox-iso: Connected to WinRM!
2015/08/13 13:56:15 packer-builder-virtualbox-iso: 2015/08/13 13:56:15 VBoxManage --version output: 4.3.28r100309
2015/08/13 13:56:15 packer-builder-virtualbox-iso: 2015/08/13 13:56:15 VirtualBox version: 4.3.28
2015/08/13 13:56:15 ui: ==> virtualbox-iso: Uploading VirtualBox version info (4.3.28)
2015/08/13 13:56:15 packer-builder-virtualbox-iso: 2015/08/13 13:56:15 Uploading file to '.vbox_version'
2015/08/13 13:56:16 packer-builder-virtualbox-iso: 2015/08/13 13:56:16 VBoxManage --version output: 4.3.28r100309
2015/08/13 13:56:16 packer-builder-virtualbox-iso: 2015/08/13 13:56:16 VirtualBox version: 4.3.28
2015/08/13 13:56:16 ui: ==> virtualbox-iso: Uploading VirtualBox guest additions ISO...
2015/08/13 13:56:16 packer-builder-virtualbox-iso: 2015/08/13 13:56:16 Uploading file to 'VBoxGuestAdditions.iso'
2015/08/13 13:58:21 packer-builder-virtualbox-iso: #< CLIXML
2015/08/13 13:58:22 packer-builder-virtualbox-iso: <Objs Version="1.1.0.1" xmlns="http://schemas.microsoft.com/powershell/2004/04"><S S="Error">Exception calling "FromBase64String" with "1" argument(s): "Exception of type '_x000D__x000A_</S><S S="Error">System.OutOfMemoryException' was thrown."_x000D__x000A_</S><S S="Error">At line:15 char:47_x000D__x000A_</S><S S="Error">+             $bytes = [System.Convert]::FromBase64String &lt;&lt;&lt;&lt; ($base64_string)_x000D__x000A_</S><S S="Error"> _x000D__x000A_</S><S S="Error">    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException_x000D__x000A_</S><S S="Error">    + FullyQualifiedErrorId : DotNetMethodException_x000D__x000A_</S><S S="Error"> _x000D__x000A_</S><S S="Error">Exception calling "WriteAllBytes" with "2" argument(s): "Value cannot be null._x000D__x000A_</S><S S="Error">Parameter name: bytes"_x000D__x000A_</S><S S="Error">At line:16 char:35_x000D__x000A_</S><S S="Error">+             [System.IO.File]::WriteAllBytes &lt;&lt;&lt;&lt; ($dest_file_path, $bytes)_x000D__x000A_</S><S S="Error">    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException_x000D__x000A_</S><S S="Error">    + FullyQualifiedErrorId : DotNetMethodException_x000D__x000A_</S><S S="Error"> _x000D__x000A_</S></Objs>2015/08/13 13:58:22 Running the provision hook
2015/08/13 13:58:22 ui: ==> virtualbox-iso: Provisioning with windows-shell...
2015/08/13 13:58:22 ui: ==> virtualbox-iso: Provisioning with shell script: script/vagrant.bat
2015/08/13 13:58:22 packer-provisioner-windows-shell: 2015/08/13 13:58:22 Opening script/vagrant.bat for reading
2015/08/13 13:58:22 packer-provisioner-windows-shell: 2015/08/13 13:58:22 [INFO] 1558 bytes written for 'uploadData'
2015/08/13 13:58:22 [INFO] 1558 bytes written for 'uploadData'
2015/08/13 13:58:22 packer-builder-virtualbox-iso: 2015/08/13 13:58:22 Uploading file to 'c:/Windows/Temp/script.bat'
2015/08/13 13:58:23 packer-builder-virtualbox-iso: 2015/08/13 13:58:23 [INFO] starting remote command: set "CM=chef" && set "CM_VERSION=latest" && set "PACKER_BUILDER_TYPE=virtualbox-iso" && set "PACKER_BUILD_NAME=virtualbox-iso" && set "UPDATE=false" && "c:/Windows/Temp/script.bat"
2015/08/13 13:58:24 ui:     virtualbox-iso: ==> Creating "C:\Users\vagrant\AppData\Local\Temp\vagrant"
2015/08/13 13:58:24 ui:     virtualbox-iso: ==> Downloading "https://raw.githubusercontent.com/mitchellh/vagrant/master/keys/vagrant.pub" to "C:\Users\vagrant\AppData\Local\Temp\vagrant\vagrant.pub"
2015/08/13 13:58:25 ui:     virtualbox-iso: WARNING: cannot verify raw.githubusercontent.com's certificate, issued by 'CN=DigiCert SHA2 High Assurance Server CA,OU=www.digicert.com,O=DigiCert Inc,C=US':
2015/08/13 13:58:25 ui:     virtualbox-iso: ==> Creating "C:\Users\vagrant\.ssh"
2015/08/13 13:58:25 ui:     virtualbox-iso: Unable to locally verify the issuer's authority.
2015/08/13 13:58:25 ui:     virtualbox-iso: ==> Adding "C:\Users\vagrant\AppData\Local\Temp\vagrant\vagrant.pub" to "C:\Users\vagrant\.ssh\authorized_keys"
2015/08/13 13:58:25 ui:     virtualbox-iso: 2015-08-13 13:58:24 URL:https://raw.githubusercontent.com/mitchellh/vagrant/master/keys/vagrant.pub [409/409] -> "C:/Users/vagrant/AppData/Local/Temp/vagrant/vagrant.pub" [1]
2015/08/13 13:58:25 ui:     virtualbox-iso: ==> Disabling account password expiration for user "vagrant"
2015/08/13 13:58:25 ui:     virtualbox-iso: Updating property(s) of '\\WINDOWS-U5VU4PT\ROOT\CIMV2:Win32_UserAccount.Domain="WINDOWS-U5VU4PT",Name="vagrant"'
2015/08/13 13:58:25 ui:     virtualbox-iso: Property(s) update successful.
2015/08/13 13:58:25 ui:     virtualbox-iso:
2015/08/13 13:58:25 ui:     virtualbox-iso: Pinging 127.0.0.1 with 32 bytes of data:
2015/08/13 13:58:25 ui:     virtualbox-iso: Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
2015/08/13 13:58:26 ui:     virtualbox-iso: Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
2015/08/13 13:58:27 ui:     virtualbox-iso: Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
2015/08/13 13:58:28 packer-builder-virtualbox-iso: 2015/08/13 13:58:28 [INFO] command 'set "CM=chef" && set "CM_VERSION=latest" && set "PACKER_BUILDER_TYPE=virtualbox-iso" && set "PACKER_BUILD_NAME=virtualbox-iso" && set "UPDATE=false" && "c:/Windows/Temp/script.bat"' exited with code: 0
2015/08/13 13:58:28 packer-builder-virtualbox-iso: 2015/08/13 13:58:28 [INFO] RPC endpoint: Communicator ended with: 0
2015/08/13 13:58:28 [INFO] 388 bytes written for 'stderr'
2015/08/13 13:58:28 [INFO] 1044 bytes written for 'stdout'
2015/08/13 13:58:28 [INFO] RPC client: Communicator ended with: 0
2015/08/13 13:58:28 [INFO] RPC endpoint: Communicator ended with: 0
2015/08/13 13:58:28 ui:     virtualbox-iso: Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
2015/08/13 13:58:28 packer-provisioner-windows-shell: 2015/08/13 13:58:28 [INFO] 388 bytes written for 'stderr'
2015/08/13 13:58:28 packer-provisioner-windows-shell: 2015/08/13 13:58:28 [INFO] 1044 bytes written for 'stdout'
2015/08/13 13:58:28 packer-provisioner-windows-shell: 2015/08/13 13:58:28 [INFO] RPC client: Communicator ended with: 0
2015/08/13 13:58:28 ui:     virtualbox-iso:
2015/08/13 13:58:28 ui:     virtualbox-iso: Ping statistics for 127.0.0.1:
2015/08/13 13:58:28 ui:     virtualbox-iso: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
2015/08/13 13:58:28 ui:     virtualbox-iso: Approximate round trip times in milli-seconds:
2015/08/13 13:58:28 ui:     virtualbox-iso: Minimum = 0ms, Maximum = 0ms, Average = 0ms
2015/08/13 13:58:28 ui:     virtualbox-iso: ==> Script exiting with errorlevel 0
2015/08/13 13:58:28 ui: ==> virtualbox-iso: Provisioning with shell script: script/cmtool.bat
2015/08/13 13:58:28 packer-provisioner-windows-shell: 2015/08/13 13:58:28 Opening script/cmtool.bat for reading
2015/08/13 13:58:28 packer-provisioner-windows-shell: 2015/08/13 13:58:28 [INFO] 5616 bytes written for 'uploadData'
2015/08/13 13:58:28 [INFO] 5616 bytes written for 'uploadData'
2015/08/13 13:58:28 packer-builder-virtualbox-iso: 2015/08/13 13:58:28 Uploading file to 'c:/Windows/Temp/script.bat'
2015/08/13 13:58:29 packer-builder-virtualbox-iso: 2015/08/13 13:58:29 [INFO] starting remote command: set "CM=chef" && set "CM_VERSION=latest" && set "PACKER_BUILDER_TYPE=virtualbox-iso" && set "PACKER_BUILD_NAME=virtualbox-iso" && set "UPDATE=false" && "c:/Windows/Temp/script.bat"
2015/08/13 13:58:31 ui:     virtualbox-iso: ==> Creating "C:\Users\vagrant\AppData\Local\Temp\chef"
2015/08/13 13:58:31 ui:     virtualbox-iso: WARNING: cannot verify www.getchef.com's certificate, issued by 'CN=GlobalSign Organization Validation CA - SHA256 - G2,O=GlobalSign nv-sa,C=BE':
2015/08/13 13:58:31 ui:     virtualbox-iso: Unable to locally verify the issuer's authority.
2015/08/13 13:58:31 ui:     virtualbox-iso: ==> Downloading "https://www.getchef.com/chef/install.msi" to "C:\Users\vagrant\AppData\Local\Temp\chef\chef-client-latest.msi"
2015/08/13 13:58:31 ui:     virtualbox-iso: WARNING: cannot verify www.chef.io's certificate, issued by 'CN=GlobalSign Organization Validation CA - SHA256 - G2,O=GlobalSign nv-sa,C=BE':
2015/08/13 13:58:31 ui:     virtualbox-iso: Unable to locally verify the issuer's authority.
2015/08/13 13:58:31 ui:     virtualbox-iso: WARNING: cannot verify opscode-omnibus-packages.s3.amazonaws.com's certificate, issued by 'CN=VeriSign Class 3 Secure Server CA - G3,OU=Terms of use at https://www.verisign.com/rpa (c)10,OU=VeriSign Trust Network,O=VeriSign\\, Inc.,C=US':
2015/08/13 13:58:31 ui:     virtualbox-iso: Unable to locally verify the issuer's authority.
2015/08/13 13:58:56 ui:     virtualbox-iso: ==> Installing Chef client latest
2015/08/13 13:58:56 ui:     virtualbox-iso: 2015-08-13 13:58:55 URL:https://opscode-omnibus-packages.s3.amazonaws.com/windows/2008r2/x86_64/chef-client-12.4.1-1.msi [78504612/78504612] -> "C:/Users/vagrant/AppData/Local/Temp/chef/chef-client-latest.msi" [1]
2015/08/13 13:59:26 ui:     virtualbox-iso:
2015/08/13 13:59:26 ui:     virtualbox-iso: Pinging 127.0.0.1 with 32 bytes of data:
2015/08/13 13:59:26 ui:     virtualbox-iso: Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
2015/08/13 13:59:27 ui:     virtualbox-iso: Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
2015/08/13 13:59:28 ui:     virtualbox-iso: Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
2015/08/13 13:59:29 packer-builder-virtualbox-iso: 2015/08/13 13:59:29 [INFO] command 'set "CM=chef" && set "CM_VERSION=latest" && set "PACKER_BUILDER_TYPE=virtualbox-iso" && set "PACKER_BUILD_NAME=virtualbox-iso" && set "UPDATE=false" && "c:/Windows/Temp/script.bat"' exited with code: 0
2015/08/13 13:59:29 packer-builder-virtualbox-iso: 2015/08/13 13:59:29 [INFO] RPC endpoint: Communicator ended with: 0
2015/08/13 13:59:29 [INFO] 688 bytes written for 'stdout'
2015/08/13 13:59:29 [INFO] 901 bytes written for 'stderr'
2015/08/13 13:59:29 [INFO] RPC client: Communicator ended with: 0
2015/08/13 13:59:29 [INFO] RPC endpoint: Communicator ended with: 0
2015/08/13 13:59:29 ui:     virtualbox-iso: Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
2015/08/13 13:59:29 packer-provisioner-windows-shell: 2015/08/13 13:59:29 [INFO] 688 bytes written for 'stdout'
2015/08/13 13:59:29 packer-provisioner-windows-shell: 2015/08/13 13:59:29 [INFO] 901 bytes written for 'stderr'
2015/08/13 13:59:29 packer-provisioner-windows-shell: 2015/08/13 13:59:29 [INFO] RPC client: Communicator ended with: 0
2015/08/13 13:59:29 ui:     virtualbox-iso:
2015/08/13 13:59:29 ui:     virtualbox-iso: Ping statistics for 127.0.0.1:
2015/08/13 13:59:29 ui:     virtualbox-iso: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
2015/08/13 13:59:29 ui:     virtualbox-iso: Approximate round trip times in milli-seconds:
2015/08/13 13:59:29 ui:     virtualbox-iso: Minimum = 0ms, Maximum = 0ms, Average = 0ms
2015/08/13 13:59:29 ui:     virtualbox-iso: ==> Script exiting with errorlevel 0
2015/08/13 13:59:29 ui: ==> virtualbox-iso: Provisioning with shell script: script/vmtool.bat
2015/08/13 13:59:29 packer-provisioner-windows-shell: 2015/08/13 13:59:29 Opening script/vmtool.bat for reading
2015/08/13 13:59:29 packer-provisioner-windows-shell: 2015/08/13 13:59:29 [INFO] 11004 bytes written for 'uploadData'
2015/08/13 13:59:29 packer-builder-virtualbox-iso: 2015/08/13 13:59:29 Uploading file to 'c:/Windows/Temp/script.bat'
2015/08/13 13:59:29 [INFO] 11004 bytes written for 'uploadData'
2015/08/13 13:59:30 packer-builder-virtualbox-iso: 2015/08/13 13:59:30 [INFO] starting remote command: set "CM=chef" && set "CM_VERSION=latest" && set "PACKER_BUILDER_TYPE=virtualbox-iso" && set "PACKER_BUILD_NAME=virtualbox-iso" && set "UPDATE=false" && "c:/Windows/Temp/script.bat"
2015/08/13 13:59:32 ui:     virtualbox-iso: ==> Downloading "http://download.virtualbox.org/virtualbox/4.3.28/VBoxGuestAdditions_4.3.28.iso" to "C:\Users\vagrant\AppData\Local\Temp\VBoxGuestAdditions_4.3.28.iso"
2015/08/13 13:59:51 ui:     virtualbox-iso: 2015-08-13 13:59:49 URL:http://download.virtualbox.org/virtualbox/4.3.28/VBoxGuestAdditions_4.3.28.iso [58241024/58241024] -> "C:/Users/vagrant/AppData/Local/Temp/VBoxGuestAdditions_4.3.28.iso" [1]
2015/08/13 13:59:51 ui:     virtualbox-iso:
2015/08/13 13:59:51 ui:     virtualbox-iso: Pinging 127.0.0.1 with 32 bytes of data:
2015/08/13 13:59:51 ui:     virtualbox-iso: Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
2015/08/13 13:59:52 ui:     virtualbox-iso: Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
2015/08/13 13:59:53 ui:     virtualbox-iso: Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
2015/08/13 13:59:54 packer-builder-virtualbox-iso: 2015/08/13 13:59:54 [INFO] command 'set "CM=chef" && set "CM_VERSION=latest" && set "PACKER_BUILDER_TYPE=virtualbox-iso" && set "PACKER_BUILD_NAME=virtualbox-iso" && set "UPDATE=false" && "c:/Windows/Temp/script.bat"' exited with code: 1
2015/08/13 13:59:54 packer-builder-virtualbox-iso: 2015/08/13 13:59:54 [INFO] RPC endpoint: Communicator ended with: 1
2015/08/13 13:59:54 [INFO] 199 bytes written for 'stderr'
2015/08/13 13:59:54 [INFO] 636 bytes written for 'stdout'
2015/08/13 13:59:54 [INFO] RPC client: Communicator ended with: 1
2015/08/13 13:59:54 [INFO] RPC endpoint: Communicator ended with: 1
2015/08/13 13:59:54 packer-provisioner-windows-shell: 2015/08/13 13:59:54 [INFO] 636 bytes written for 'stdout'
2015/08/13 13:59:54 packer-provisioner-windows-shell: 2015/08/13 13:59:54 [INFO] 199 bytes written for 'stderr'
2015/08/13 13:59:54 ui:     virtualbox-iso: Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
2015/08/13 13:59:54 packer-provisioner-windows-shell: 2015/08/13 13:59:54 [INFO] RPC client: Communicator ended with: 1
2015/08/13 13:59:54 ui:     virtualbox-iso:
2015/08/13 13:59:54 ui:     virtualbox-iso: Ping statistics for 127.0.0.1:
2015/08/13 13:59:54 ui:     virtualbox-iso: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
2015/08/13 13:59:54 ui:     virtualbox-iso: Approximate round trip times in milli-seconds:
2015/08/13 13:59:54 ui:     virtualbox-iso: Minimum = 0ms, Maximum = 0ms, Average = 0ms
2015/08/13 13:59:54 ui:     virtualbox-iso: ==> Script exiting with errorlevel 1
2015/08/13 13:59:54 packer-builder-virtualbox-iso: 2015/08/13 13:59:54 Executing VBoxManage: []string{"controlvm", "win7x64-pro", "poweroff"}
2015/08/13 13:59:54 packer-builder-virtualbox-iso: 2015/08/13 13:59:54 stdout:
2015/08/13 13:59:54 packer-builder-virtualbox-iso: 2015/08/13 13:59:54 stderr: 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
2015/08/13 13:59:54 packer-builder-virtualbox-iso: 2015/08/13 13:59:54 Executing VBoxManage: []string{"storageattach", "win7x64-pro", "--storagectl", "Floppy Controller", "--port", "0", "--device", "0", "--medium", "none"}
2015/08/13 13:59:54 packer-builder-virtualbox-iso: 2015/08/13 13:59:54 stdout:
2015/08/13 13:59:54 packer-builder-virtualbox-iso: 2015/08/13 13:59:54 stderr:
2015/08/13 13:59:54 packer-builder-virtualbox-iso: 2015/08/13 13:59:54 Executing VBoxManage: []string{"storageattach", "win7x64-pro", "--storagectl", "IDE Controller", "--port", "0", "--device", "1", "--medium", "none"}
2015/08/13 13:59:54 packer-builder-virtualbox-iso: 2015/08/13 13:59:54 stdout:
2015/08/13 13:59:54 packer-builder-virtualbox-iso: 2015/08/13 13:59:54 stderr:
2015/08/13 13:59:54 ui: ==> virtualbox-iso: Unregistering and deleting virtual machine...
2015/08/13 13:59:54 packer-builder-virtualbox-iso: 2015/08/13 13:59:54 Executing VBoxManage: []string{"unregistervm", "win7x64-pro", "--delete"}
2015/08/13 13:59:54 packer-builder-virtualbox-iso: 2015/08/13 13:59:54 stdout:
2015/08/13 13:59:54 packer-builder-virtualbox-iso: 2015/08/13 13:59:54 stderr: 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
2015/08/13 13:59:54 packer-builder-virtualbox-iso: 2015/08/13 13:59:54 Deleting floppy disk: /var/folders/9v/hxjs3gjj6c55n7mt7skqm6fn7f3p74/T/packer807048017
2015/08/13 13:59:54 ui: ==> virtualbox-iso: Deleting output directory...
2015/08/13 13:59:54 ui error: Build 'virtualbox-iso' errored: Script exited with non-zero exit status: 1
2015/08/13 13:59:54 Builds completed. Waiting on interrupt barrier...
2015/08/13 13:59:54 machine readable: error-count []string{"1"}
2015/08/13 13:59:54 ui error: 
==> Some builds didn't complete successfully and had errors:
2015/08/13 13:59:54 machine readable: virtualbox-iso,error []string{"Script exited with non-zero exit status: 1"}
2015/08/13 13:59:54 ui error: --> virtualbox-iso: Script exited with non-zero exit status: 1
2015/08/13 13:59:54 ui: 
==> Builds finished but no artifacts were created.
2015/08/13 13:59:54 waiting for all plugin processes to complete...
2015/08/13 13:59:54 /Users/tcarmean/packer/packer-provisioner-windows-shell: plugin process exited
2015/08/13 13:59:54 /Users/tcarmean/packer/packer-post-processor-vagrant: plugin process exited
2015/08/13 13:59:54 /Users/tcarmean/packer/packer-builder-virtualbox-iso: plugin process exited
tcarmean commented 9 years ago

Removing vmtool.bat from the scripts section of the win7x64-pro.json file results in a successful build.

jking916 commented 9 years ago

I just ran into a similar problem when building win2008r2-datacenter on Ubuntu 14.04:

==> virtualbox-iso: Provisioning with shell script: script/vmtool.bat
    virtualbox-iso: ==> Downloading "http://download.virtualbox.org/virtualbox/4.3.28/VBoxGuestAdditions_4.3.28.iso" to "C:\Users\vagrant\AppData\Local\Temp\VBoxGuestAdditions_4.3.28.iso"
    virtualbox-iso:
    virtualbox-iso: Pinging 127.0.0.1 with 32 bytes of data:
    virtualbox-iso: 2015-08-13 16:50:33 URL:http://download.virtualbox.org/virtualbox/4.3.28/VBoxGuestAdditions_4.3.28.iso [58241024/58241024] -> "C:/Users/vagrant/AppData/Local/Temp/VBoxGuestAdditions_4.3.28.iso" [1]
    virtualbox-iso: Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
    virtualbox-iso: Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
    virtualbox-iso: Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
    virtualbox-iso: Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
    virtualbox-iso:
    virtualbox-iso: Ping statistics for 127.0.0.1:
    virtualbox-iso: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
    virtualbox-iso: Approximate round trip times in milli-seconds:
    virtualbox-iso: Minimum = 0ms, Maximum = 0ms, Average = 0ms
    virtualbox-iso: ==> Script exiting with errorlevel 1

I was able to get around it by manually installing the guest additions by hand once it booted into Windows. It may have also been solved simply by mounting the guest additions ISO and letting the vmtool.bat script install from it. In either case, I finally have a working box.

I should also mention I was able to build a win2012r2-datacenter box without any trouble, and it uses the same script.

piraxis commented 9 years ago

@jared-k Mounting the guest additions ISO after the system reboots from the initial setup is enough to get around this error.

jking916 commented 9 years ago

@piraxis Thanks for confirming that, I'll keep it in mind in the future.

mondoshivan commented 8 years ago

I was running into a similar issue.

After setting: "guest_additions_mode": "attach"

in the packer template for the virtualbox-iso builder, I get around this issue.