Skip to content

Instantly share code, notes, and snippets.

@lavahot
Created May 12, 2017 20:19
Show Gist options
  • Save lavahot/9b3ecd4f44fa9d320429325cd53f48b6 to your computer and use it in GitHub Desktop.
Save lavahot/9b3ecd4f44fa9d320429325cd53f48b6 to your computer and use it in GitHub Desktop.
Packer HyperV dynamic memory bug
2017/05/12 13:15:30 [INFO] Packer version: 1.0.0
2017/05/12 13:15:30 Packer Target OS/Arch: windows amd64
2017/05/12 13:15:30 Built with Go Version: go1.8
2017/05/12 13:15:30 Using internal plugin for vmware-iso
2017/05/12 13:15:30 Using internal plugin for amazon-chroot
2017/05/12 13:15:30 Using internal plugin for amazon-ebs
2017/05/12 13:15:30 Using internal plugin for docker
2017/05/12 13:15:30 Using internal plugin for googlecompute
2017/05/12 13:15:30 Using internal plugin for profitbricks
2017/05/12 13:15:30 Using internal plugin for qemu
2017/05/12 13:15:30 Using internal plugin for vmware-vmx
2017/05/12 13:15:30 Using internal plugin for amazon-ebsvolume
2017/05/12 13:15:30 Using internal plugin for azure-arm
2017/05/12 13:15:30 Using internal plugin for cloudstack
2017/05/12 13:15:30 Using internal plugin for digitalocean
2017/05/12 13:15:30 Using internal plugin for file
2017/05/12 13:15:30 Using internal plugin for hyperv-iso
2017/05/12 13:15:30 Using internal plugin for amazon-instance
2017/05/12 13:15:30 Using internal plugin for null
2017/05/12 13:15:30 Using internal plugin for oneandone
2017/05/12 13:15:30 Using internal plugin for parallels-pvm
2017/05/12 13:15:30 Using internal plugin for amazon-ebssurrogate
2017/05/12 13:15:30 Using internal plugin for openstack
2017/05/12 13:15:30 Using internal plugin for parallels-iso
2017/05/12 13:15:30 Using internal plugin for triton
2017/05/12 13:15:30 Using internal plugin for virtualbox-iso
2017/05/12 13:15:30 Using internal plugin for virtualbox-ovf
2017/05/12 13:15:30 Using internal plugin for converge
2017/05/12 13:15:30 Using internal plugin for windows-restart
2017/05/12 13:15:30 Using internal plugin for ansible
2017/05/12 13:15:30 Using internal plugin for shell
2017/05/12 13:15:30 Using internal plugin for shell-local
2017/05/12 13:15:30 Using internal plugin for ansible-local
2017/05/12 13:15:30 Using internal plugin for chef-client
2017/05/12 13:15:30 Using internal plugin for file
2017/05/12 13:15:30 Using internal plugin for puppet-masterless
2017/05/12 13:15:30 Using internal plugin for windows-shell
2017/05/12 13:15:30 Using internal plugin for chef-solo
2017/05/12 13:15:30 Using internal plugin for powershell
2017/05/12 13:15:30 Using internal plugin for puppet-server
2017/05/12 13:15:30 Using internal plugin for salt-masterless
2017/05/12 13:15:30 Using internal plugin for vagrant-cloud
2017/05/12 13:15:30 Using internal plugin for docker-save
2017/05/12 13:15:30 Using internal plugin for manifest
2017/05/12 13:15:30 Using internal plugin for compress
2017/05/12 13:15:30 Using internal plugin for docker-tag
2017/05/12 13:15:30 Using internal plugin for vagrant
2017/05/12 13:15:30 Using internal plugin for amazon-import
2017/05/12 13:15:30 Using internal plugin for artifice
2017/05/12 13:15:30 Using internal plugin for checksum
2017/05/12 13:15:30 Using internal plugin for docker-push
2017/05/12 13:15:30 Using internal plugin for googlecompute-export
2017/05/12 13:15:30 Using internal plugin for shell-local
2017/05/12 13:15:30 Using internal plugin for vsphere
2017/05/12 13:15:30 Using internal plugin for atlas
2017/05/12 13:15:30 Using internal plugin for docker-import
2017/05/12 13:15:30 Attempting to open config file: C:\Users\212613934\AppData\Roaming\packer.config
2017/05/12 13:15:30 [WARN] Config file doesn't exist: C:\Users\212613934\AppData\Roaming\packer.config
2017/05/12 13:15:30 Packer config: &{DisableCheckpoint:false DisableCheckpointSignature:false PluginMinPort:10000 PluginMaxPort:25000 Builders:map[amazon-ebs:C:\Program Files\Packer\packer.exe-PACKERSPACE-plugin-PACKERSPACE-packer-builder-amazon-ebs vmware-vmx:C:\Program Files\Packer\packer.exe-PACKERSPACE-plugin-PACKERSPACE-packer-builder-vmware-vmx azure-arm:C:\Program Files\Packer\packer.exe-PACKERSPACE-plugin-PACKERSPACE-packer-builder-azure-arm amazon-instance:C:\Program Files\Packer\packer.exe-PACKERSPACE-plugin-PACKERSPACE-packer-builder-amazon-instance virtualbox-iso:C:\Program Files\Packer\packer.exe-PACKERSPACE-plugin-PACKERSPACE-packer-builder-virtualbox-iso amazon-chroot:C:\Program Files\Packer\packer.exe-PACKERSPACE-plugin-PACKERSPACE-packer-builder-amazon-chroot docker:C:\Program Files\Packer\packer.exe-PACKERSPACE-plugin-PACKERSPACE-packer-builder-docker cloudstack:C:\Program Files\Packer\packer.exe-PACKERSPACE-plugin-PACKERSPACE-packer-builder-cloudstack file:C:\Program Files\Packer\packer.exe-PACKERSPACE-plugin-PACKERSPACE-packer-builder-file hyperv-iso:C:\Program Files\Packer\packer.exe-PACKERSPACE-plugin-PACKERSPACE-packer-builder-hyperv-iso parallels-pvm:C:\Program Files\Packer\packer.exe-PACKERSPACE-plugin-PACKERSPACE-packer-builder-parallels-pvm virtualbox-ovf:C:\Program Files\Packer\packer.exe-PACKERSPACE-plugin-PACKERSPACE-packer-builder-virtualbox-ovf vmware-iso:C:\Program Files\Packer\packer.exe-PACKERSPACE-plugin-PACKERSPACE-packer-builder-vmware-iso amazon-ebsvolume:C:\Program Files\Packer\packer.exe-PACKERSPACE-plugin-PACKERSPACE-packer-builder-amazon-ebsvolume oneandone:C:\Program Files\Packer\packer.exe-PACKERSPACE-plugin-PACKERSPACE-packer-builder-oneandone amazon-ebssurrogate:C:\Program Files\Packer\packer.exe-PACKERSPACE-plugin-PACKERSPACE-packer-builder-amazon-ebssurrogate openstack:C:\Program Files\Packer\packer.exe-PACKERSPACE-plugin-PACKERSPACE-packer-builder-openstack parallels-iso:C:\Program Files\Packer\packer.exe-PACKERSPACE-plugin-PACKERSPACE-packer-builder-parallels-iso googlecompute:C:\Program Files\Packer\packer.exe-PACKERSPACE-plugin-PACKERSPACE-packer-builder-googlecompute profitbricks:C:\Program Files\Packer\packer.exe-PACKERSPACE-plugin-PACKERSPACE-packer-builder-profitbricks qemu:C:\Program Files\Packer\packer.exe-PACKERSPACE-plugin-PACKERSPACE-packer-builder-qemu digitalocean:C:\Program Files\Packer\packer.exe-PACKERSPACE-plugin-PACKERSPACE-packer-builder-digitalocean null:C:\Program Files\Packer\packer.exe-PACKERSPACE-plugin-PACKERSPACE-packer-builder-null triton:C:\Program Files\Packer\packer.exe-PACKERSPACE-plugin-PACKERSPACE-packer-builder-triton] PostProcessors:map[compress:C:\Program Files\Packer\packer.exe-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-compress amazon-import:C:\Program Files\Packer\packer.exe-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-amazon-import docker-push:C:\Program Files\Packer\packer.exe-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-docker-push docker-save:C:\Program Files\Packer\packer.exe-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-docker-save artifice:C:\Program Files\Packer\packer.exe-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-artifice checksum:C:\Program Files\Packer\packer.exe-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-checksum shell-local:C:\Program Files\Packer\packer.exe-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-shell-local vsphere:C:\Program Files\Packer\packer.exe-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-vsphere vagrant-cloud:C:\Program Files\Packer\packer.exe-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-vagrant-cloud manifest:C:\Program Files\Packer\packer.exe-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-manifest vagrant:C:\Program Files\Packer\packer.exe-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-vagrant googlecompute-export:C:\Program Files\Packer\packer.exe-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-googlecompute-export docker-tag:C:\Program Files\Packer\packer.exe-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-docker-tag atlas:C:\Program Files\Packer\packer.exe-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-atlas docker-import:C:\Program Files\Packer\packer.exe-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-docker-import] Provisioners:map[puppet-masterless:C:\Program Files\Packer\packer.exe-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-puppet-masterless salt-masterless:C:\Program Files\Packer\packer.exe-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-salt-masterless windows-restart:C:\Program Files\Packer\packer.exe-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-windows-restart ansible:C:\Program Files\Packer\packer.exe-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-ansible shell:C:\Program Files\Packer\packer.exe-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-shell shell-local:C:\Program Files\Packer\packer.exe-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-shell-local chef-client:C:\Program Files\Packer\packer.exe-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-chef-client file:C:\Program Files\Packer\packer.exe-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-file ansible-local:C:\Program Files\Packer\packer.exe-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-ansible-local puppet-server:C:\Program Files\Packer\packer.exe-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-puppet-server converge:C:\Program Files\Packer\packer.exe-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-converge windows-shell:C:\Program Files\Packer\packer.exe-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-windows-shell chef-solo:C:\Program Files\Packer\packer.exe-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-chef-solo powershell:C:\Program Files\Packer\packer.exe-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-powershell]}
2017/05/12 13:15:30 Setting cache directory: C:\Users\212613934\Documents\dev\packer_bug_image\packer_cache
2017/05/12 13:15:30 Loading builder: hyperv-iso
2017/05/12 13:15:30 Plugin could not be found. Checking same directory as executable.
2017/05/12 13:15:30 Current exe path: C:\Program Files\Packer\packer.exe
2017/05/12 13:15:30 Creating plugin client for path: C:\Program Files\Packer\packer.exe
2017/05/12 13:15:30 Starting plugin: C:\Program Files\Packer\packer.exe []string{"C:\\Program Files\\Packer\\packer.exe", "plugin", "packer-builder-hyperv-iso"}
2017/05/12 13:15:30 Waiting for RPC address for: C:\Program Files\Packer\packer.exe
2017/05/12 13:15:30 packer.exe: 2017/05/12 13:15:30 [INFO] Packer version: 1.0.0
2017/05/12 13:15:30 packer.exe: 2017/05/12 13:15:30 Packer Target OS/Arch: windows amd64
2017/05/12 13:15:30 packer.exe: 2017/05/12 13:15:30 Built with Go Version: go1.8
2017/05/12 13:15:30 packer.exe: 2017/05/12 13:15:30 Attempting to open config file: C:\Users\212613934\AppData\Roaming\packer.config
2017/05/12 13:15:30 packer.exe: 2017/05/12 13:15:30 [WARN] Config file doesn't exist: C:\Users\212613934\AppData\Roaming\packer.config
2017/05/12 13:15:30 packer.exe: 2017/05/12 13:15:30 Packer config: &{DisableCheckpoint:false DisableCheckpointSignature:false PluginMinPort:10000 PluginMaxPort:25000 Builders:map[] PostProcessors:map[] Provisioners:map[]}
2017/05/12 13:15:30 packer.exe: 2017/05/12 13:15:30 Setting cache directory: C:\Users\212613934\Documents\dev\packer_bug_image\packer_cache
2017/05/12 13:15:30 packer.exe: 2017/05/12 13:15:30 args: []string{"packer-builder-hyperv-iso"}
2017/05/12 13:15:30 packer.exe: 2017/05/12 13:15:30 Plugin minimum port: 10000
2017/05/12 13:15:30 packer.exe: 2017/05/12 13:15:30 Plugin maximum port: 25000
2017/05/12 13:15:30 packer.exe: 2017/05/12 13:15:30 Plugin address: tcp 127.0.0.1:10000
2017/05/12 13:15:30 packer.exe: 2017/05/12 13:15:30 Waiting for connection...
2017/05/12 13:15:30 packer.exe: 2017/05/12 13:15:30 Serving a plugin connection...
2017/05/12 13:15:30 ui: Debug mode enabled. Builds will not be parallelized.
2017/05/12 13:15:30 ui: hyperv-iso output will be in this color.
2017/05/12 13:15:30 ui:
2017/05/12 13:15:30 Build debug mode: true
2017/05/12 13:15:30 Force build: false
2017/05/12 13:15:30 On error:
2017/05/12 13:15:30 Preparing build: hyperv-iso
2017/05/12 13:15:30 packer.exe: 2017/05/12 13:15:30 DiskSize: 40960
2017/05/12 13:15:30 packer.exe: 2017/05/12 13:15:30 RamSize: 1024
2017/05/12 13:15:30 packer.exe: 2017/05/12 13:15:30 VMName: ubuntu-xenial
2017/05/12 13:15:35 packer.exe: 2017/05/12 13:15:35 Using switch ExternalSwitch
2017/05/12 13:15:35 packer.exe: 2017/05/12 13:15:35 SwitchName: ExternalSwitch
2017/05/12 13:15:36 Debug enabled, so waiting for build to finish: hyperv-iso
2017/05/12 13:15:36 Starting build run: hyperv-iso
2017/05/12 13:15:36 Running builder: hyperv-iso
2017/05/12 13:15:36 packer.exe: 2017/05/12 13:15:36 Enter method: verifyPSVersion
2017/05/12 13:15:36 packer.exe: 2017/05/12 13:15:36 $host.version.Major output: 5
2017/05/12 13:15:36 packer.exe: 2017/05/12 13:15:36 Enter method: verifyPSHypervModule
2017/05/12 13:15:38 packer.exe: 2017/05/12 13:15:38 Enter method: verifyHypervPermissions
2017/05/12 13:15:39 ui: ==> hyperv-iso: Creating temporary directory...
2017/05/12 13:15:39 ui: ask: ==> hyperv-iso: Pausing after run of step 'StepCreateTempDir'. Press enter to continue.
2017/05/12 13:15:58 ui: ask: ==> hyperv-iso: Pausing after run of step 'StepOutputDir'. Press enter to continue.
2017/05/12 13:15:59 ui: ==> hyperv-iso: Downloading or copying ISO
2017/05/12 13:15:59 ui: hyperv-iso: Downloading or copying: http://releases.ubuntu.com/16.04/ubuntu-16.04.2-server-amd64.iso
2017/05/12 13:15:59 packer.exe: 2017/05/12 13:15:59 Acquiring lock to download: http://releases.ubuntu.com/16.04/ubuntu-16.04.2-server-amd64.iso
2017/05/12 13:15:59 packer.exe: 2017/05/12 13:15:59 Verifying checksum of C:\Users\212613934\Documents\dev\packer_bug_image\packer_cache\dd3439e4d4579146341017db9ab41b40740e737bc16e9e9b7380f003e97903af.iso
2017/05/12 13:16:00 packer.exe: 2017/05/12 13:16:00 [DEBUG] Initial checksum matched, no download needed.
2017/05/12 13:16:00 ui: ask: ==> hyperv-iso: Pausing after run of step 'StepDownload'. Press enter to continue.
2017/05/12 13:16:02 packer.exe: 2017/05/12 13:16:02 No floppy files specified. Floppy disk will not be made.
2017/05/12 13:16:02 ui: ask: ==> hyperv-iso: Pausing after run of step 'StepCreateFloppy'. Press enter to continue.
2017/05/12 13:16:03 packer.exe: 2017/05/12 13:16:03 Trying port: 8097
2017/05/12 13:16:03 ui: ==> hyperv-iso: Starting HTTP server on port 8097
2017/05/12 13:16:03 ui: ask: ==> hyperv-iso: Pausing after run of step 'StepHTTPServer'. Press enter to continue.
2017/05/12 13:16:04 ui: ==> hyperv-iso: Creating switch 'ExternalSwitch' if required...
2017/05/12 13:16:06 ui: ==> hyperv-iso: switch 'ExternalSwitch' already exists. Will not delete on cleanup...
2017/05/12 13:16:06 ui: ask: ==> hyperv-iso: Pausing after run of step 'StepCreateSwitch'. Press enter to continue.
2017/05/12 13:16:07 ui: ==> hyperv-iso: Creating virtual machine...
2017/05/12 13:16:15 ui: ask: ==> hyperv-iso: Pausing after run of step 'StepCreateVM'. Press enter to continue.
{
"variables": {
"vm_name": "ubuntu-xenial",
"iso_url": "http://releases.ubuntu.com/16.04/ubuntu-16.04.2-server-amd64.iso",
"iso_checksum_type": "sha1",
"iso_checksum": "f529548fa7468f2d8413b8427d8e383b830df5f6",
"username" : "vagrant",
"password" : "vagrant"
},
"builders": [
{
"vm_name":"{{user `vm_name`}}",
"type": "hyperv-iso",
"guest_additions_mode": "disable",
"enable_dynamic_memory": false,
"iso_url": "{{user `iso_url`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"iso_checksum": "{{user `iso_checksum`}}",
"communicator":"ssh",
"ssh_username": "{{user `username`}}",
"ssh_password": "{{user `password`}}",
"ssh_timeout" : "4h",
"http_directory": "./",
"shutdown_command": "echo '{{user `username`}}' | sudo -S -E shutdown -P now",
"generation": 2,
"enable_secure_boot": false
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment