Closed mytracks closed 7 years ago
Hello! Try running it only with the builder you need.
packer build --only=vmware-iso windows_2016_docker.json
Does this work for you?
Hi.
Thanks. That helped.
However, I am trying to create a virtualbox image but it hangs at "Waiting for RM":
localhost:packer-windows tichel$ packer build --only=virtualbox-iso -var 'iso_url=./en_windows_server_2016_x64_dvd_9718492.iso' -var 'iso_checksum=e02d2e482b0f3dab915435e9040c13b4' windows_2016.json
virtualbox-iso output will be in this color.
==> virtualbox-iso: Downloading or copying ISO
virtualbox-iso: Downloading or copying: file:///Users/tichel/Dev/Vagrant/WindowsServer2016/packer-windows/en_windows_server_2016_x64_dvd_9718492.iso
==> virtualbox-iso: Creating floppy disk...
virtualbox-iso: Copying files flatly from floppy_files
virtualbox-iso: Copying file: ./answer_files/2016/Autounattend.xml
virtualbox-iso: Copying file: ./floppy/WindowsPowershell.lnk
virtualbox-iso: Copying file: ./floppy/PinTo10.exe
virtualbox-iso: Copying file: ./scripts/disable-screensaver.ps1
virtualbox-iso: Copying file: ./scripts/disable-winrm.ps1
virtualbox-iso: Copying file: ./scripts/enable-winrm.ps1
virtualbox-iso: Copying file: ./scripts/microsoft-updates.bat
virtualbox-iso: Copying file: ./scripts/win-updates.ps1
virtualbox-iso: Copying file: ./scripts/oracle-cert.cer
virtualbox-iso: Done copying files from floppy_files
virtualbox-iso: Collecting paths from floppy_dirs
virtualbox-iso: Resulting paths from floppy_dirs : []
virtualbox-iso: Done copying paths from floppy_dirs
==> virtualbox-iso: Creating virtual machine...
==> virtualbox-iso: Creating hard drive...
==> virtualbox-iso: Attaching floppy disk...
==> virtualbox-iso: Creating forwarded port mapping for communicator (SSH, WinRM, etc) (host port 3119)
==> virtualbox-iso: Executing custom VBoxManage commands...
virtualbox-iso: Executing: modifyvm packer-virtualbox-iso-1484386644 --memory 2048
virtualbox-iso: Executing: modifyvm packer-virtualbox-iso-1484386644 --cpus 2
==> virtualbox-iso: Starting the virtual machine...
==> virtualbox-iso: Waiting 2m0s for boot...
==> virtualbox-iso: Typing the boot command...
==> virtualbox-iso: Waiting for WinRM to become available...
Dirk
Seems like you are using packer 0.12.1. same as #21. Downgrade to another version will fix this.
Hi.
I switched back to packer 0.11.0 and now everything is working fine.
Thanks, Dirk
@StefanScherer is this still an issue with versions of packer 1.2.4
?
I'm trying to build with packer build --only=virtualbox-iso windows_2016_docker.json
and also getting this Build 'virtualbox-iso' errored: unexpected EOF
err
Looks like http://care.dlservice.microsoft.com/dl/download/1/4/9/149D5452-9B29-4274-B6B3-5361DBDA30BC/14393.0.161119-1705.RS1_REFRESH_SERVER_EVAL_X64FRE_EN-US.ISO
is not reachable?
@iDVB I haven't tried VirtualBox lately, but it should be fixed in 1.2.4. On which platform (Mac/Windows/Linux) are you trying to build? The ISO download link works for me.
Late to the party here, but I am too seeing the "unexpected EOF" error. On latest Mac OS X, macbook pro.
Tried with "--only hyperv-iso", no luck.
➜ packer build --only hyperv-iso windows_2016.json
hyperv-iso output will be in this color.
unexpected EOF
Adding logging gives result below. Related to PowerShell not found in path? (Obviously it's not - doing this on a Mac..)
➜ PACKER_LOG=1 packer build --only hyperv-iso windows_2016.json
2019/01/18 17:14:58 [INFO] Packer version: 1.3.3
2019/01/18 17:14:58 Packer Target OS/Arch: darwin amd64
2019/01/18 17:14:58 Built with Go Version: go1.11.2
2019/01/18 17:14:58 Detected home directory from env var: /Users/goran
2019/01/18 17:14:58 Using internal plugin for amazon-ebssurrogate
2019/01/18 17:14:58 Using internal plugin for lxc
2019/01/18 17:14:58 Using internal plugin for vmware-vmx
2019/01/18 17:14:58 Using internal plugin for hcloud
2019/01/18 17:14:58 Using internal plugin for lxd
2019/01/18 17:14:58 Using internal plugin for null
..
..
2019/01/18 17:14:58 Loading post-processor: vagrant
2019/01/18 17:14:58 Plugin could not be found. Checking same directory as executable.
2019/01/18 17:14:58 Current exe path: /usr/local/bin/packer
2019/01/18 17:14:58 Creating plugin client for path: /usr/local/bin/packer
2019/01/18 17:14:58 Starting plugin: /usr/local/bin/packer []string{"/usr/local/bin/packer", "plugin", "packer-post-processor-vagrant"}
2019/01/18 17:14:58 Waiting for RPC address for: /usr/local/bin/packer
2019/01/18 17:14:58 packer: 2019/01/18 17:14:58 [INFO] Packer version: 1.3.3
2019/01/18 17:14:58 packer: 2019/01/18 17:14:58 Packer Target OS/Arch: darwin amd64
2019/01/18 17:14:58 packer: 2019/01/18 17:14:58 Built with Go Version: go1.11.2
2019/01/18 17:14:58 packer: 2019/01/18 17:14:58 Detected home directory from env var: /Users/goran
2019/01/18 17:14:58 packer: 2019/01/18 17:14:58 Attempting to open config file: /Users/goran/.packerconfig
2019/01/18 17:14:58 packer: 2019/01/18 17:14:58 [WARN] Config file doesn't exist: /Users/goran/.packerconfig
2019/01/18 17:14:58 packer: 2019/01/18 17:14:58 Packer config: &{DisableCheckpoint:false DisableCheckpointSignature:false PluginMinPort:10000 PluginMaxPort:25000 Builders:map[] PostProcessors:map[] Provisioners:map[]}
2019/01/18 17:14:58 packer: 2019/01/18 17:14:58 Detected home directory from env var: /Users/goran
2019/01/18 17:14:58 packer: 2019/01/18 17:14:58 Setting cache directory: /Users/goran/code/packer/winsrv2019/packer-windows/packer_cache
2019/01/18 17:14:58 packer: 2019/01/18 17:14:58 args: []string{"packer-post-processor-vagrant"}
2019/01/18 17:14:58 packer: 2019/01/18 17:14:58 Detected home directory from env var: /Users/goran
2019/01/18 17:14:58 packer: 2019/01/18 17:14:58 Plugin minimum port: 10000
2019/01/18 17:14:58 packer: 2019/01/18 17:14:58 Plugin maximum port: 25000
2019/01/18 17:14:58 packer: 2019/01/18 17:14:58 Plugin address: unix /var/folders/_f/sw7s2q_52vl0xs6q4kgyn2t00000gn/T/packer-plugin751170592
2019/01/18 17:14:58 packer: 2019/01/18 17:14:58 Waiting for connection...
2019/01/18 17:14:58 packer: 2019/01/18 17:14:58 Serving a plugin connection...
2019/01/18 17:14:58 Build debug mode: false
2019/01/18 17:14:58 Force build: false
2019/01/18 17:14:58 On error:
2019/01/18 17:14:58 Preparing build: hyperv-iso
hyperv-iso output will be in this color.
2019/01/18 17:14:58 packer: 2019/01/18 17:14:58 DiskSize: 61440
2019/01/18 17:14:58 packer: 2019/01/18 17:14:58 DiskBlockSize: 32
2019/01/18 17:14:58 packer: 2019/01/18 17:14:58 RamSize: 2048
2019/01/18 17:14:58 packer: 2019/01/18 17:14:58 VMName: WindowsServer2016
2019/01/18 17:14:58 packer: 2019/01/18 17:14:58 Using switch packer-hyperv-iso
2019/01/18 17:14:58 packer: 2019/01/18 17:14:58 SwitchName: packer-hyperv-iso
2019/01/18 17:14:58 packer: 2019/01/18 17:14:58 Cannot find PowerShell in the path
2019/01/18 17:14:58 Build 'hyperv-iso' prepare failure: unexpected EOF
2019/01/18 17:14:58 ui error: unexpected EOF
2019/01/18 17:14:58 [INFO] (telemetry) Finalizing.
unexpected EOF
2019/01/18 17:14:58 /usr/local/bin/packer: plugin process exited
2019/01/18 17:14:59 waiting for all plugin processes to complete...
2019/01/18 17:14:59 /usr/local/bin/packer: plugin process exited
2019/01/18 17:14:59 /usr/local/bin/packer: plugin process exited
2019/01/18 17:14:59 /usr/local/bin/packer: plugin process exited
2019/01/18 17:14:59 /usr/local/bin/packer: plugin process exited
2019/01/18 17:14:59 /usr/local/bin/packer: plugin process exited
You cannot build hyperv-iso on a Mac, you need to build this on a Windows machine with Hyper-V hypervisor installed. Seems like a strange behaviour in packer itself that it doesn't complain about that.
Hi.
I try to build windows_2016_docker.json on a macOS host with packer 0.12.1 using the following command: packer build windows_2016_docker.json
But I get the following error:
Building windows_2016.json works just fine.
Dirk