Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
param(
[string] $username = "tweeter",
[string] $open_ssh_version = "v7.9.0.0p1-Beta"
)
$ErrorActionPreference = 'Stop'; # stop on all errors
# make the user
$Count = Get-Random -min 24 -max 32
$TempPassword = -join ((65..90) + (97..122) + (48..57) | Get-Random -Count $Count | % {[char]$_})
New-LocalUser -Name $username -PasswordNeverExpires -Password ($TempPassword | ConvertTo-SecureString -AsPlainText -Force) | out-null
Add-LocalGroupMember -Group "Administrators" -Member $username | out-null
# make the user profile
#function to register a native method
function Register-NativeMethod
{
[CmdletBinding()]
[Alias()]
[OutputType([int])]
Param
(
# Param1 help description
[Parameter(Mandatory=$true,
ValueFromPipelineByPropertyName=$true,
Position=0)]
[string]$dll,
# Param2 help description
[Parameter(Mandatory=$true,
ValueFromPipelineByPropertyName=$true,
Position=1)]
[string]
$methodSignature
)
$script:nativeMethods += [PSCustomObject]@{ Dll = $dll; Signature = $methodSignature; }
}
function Get-Win32LastError
{
[CmdletBinding()]
[Alias()]
[OutputType([int])]
Param($typeName = 'LastError')
if (-not ([System.Management.Automation.PSTypeName]$typeName).Type)
{
$lasterrorCode = $script:lasterror | ForEach-Object{
'[DllImport("kernel32.dll", SetLastError = true)]
public static extern uint GetLastError();'
}
Add-Type @"
using System;
using System.Text;
using System.Runtime.InteropServices;
public static class $typeName {
$lasterrorCode
}
"@
}
}
#function to add native method
function Add-NativeMethods
{
[CmdletBinding()]
[Alias()]
[OutputType([int])]
Param($typeName = 'NativeMethods')
$nativeMethodsCode = $script:nativeMethods | ForEach-Object { "
[DllImport(`"$($_.Dll)`")]
public static extern $($_.Signature);
" }
Add-Type @"
using System;
using System.Text;
using System.Runtime.InteropServices;
public static class $typeName {
$nativeMethodsCode
}
"@
}
$methodName = 'UserEnvCP'
$script:nativeMethods = @();
Register-NativeMethod "userenv.dll" "int CreateProfile([MarshalAs(UnmanagedType.LPWStr)] string pszUserSid,`
[MarshalAs(UnmanagedType.LPWStr)] string pszUserName,`
[Out][MarshalAs(UnmanagedType.LPWStr)] StringBuilder pszProfilePath, uint cchProfilePath)";
Add-NativeMethods -typeName $MethodName;
$localUser = New-Object System.Security.Principal.NTAccount("$username");
$userSID = $localUser.Translate([System.Security.Principal.SecurityIdentifier]);
$sb = new-object System.Text.StringBuilder(260);
$pathLen = $sb.Capacity;
Write-Verbose "Creating user profile for $username";
try
{
[UserEnvCP]::CreateProfile($userSID.Value, $username, $sb, $pathLen) | Out-Null;
}
catch
{
Write-Error $_.Exception.Message;
break;
}
New-Item "c:/users/$username/.ssh" -type Directory
$public_key_base64 = get-gcemetadata -path "instance/attributes/imp-public-key-base64"
$public_key = [System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($public_key_base64))
Set-Content -Path "c:/users/$username/.ssh/authorized_keys" -Value "$public_key"
# Install openssh
# https://github.com/PowerShell/Win32-OpenSSH/wiki/Install-Win32-OpenSSH
$url = "https://github.com/PowerShell/Win32-OpenSSH/releases/download/$($open_ssh_version)/OpenSSH-Win64.zip"
$output = "$($env:TEMP)/OpenSSH-Win64.zip"
# github went TLS 1.2 only from 2018
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12;
(New-Object System.Net.WebClient).DownloadFile($url, $output)
Expand-Archive -Path $output -DestinationPath "$($env:PROGRAMFILES)"
. "$($env:PROGRAMFILES)/OpenSSH-Win64/install-sshd.ps1"
# Set default shell for sshd connections to powershell to avoid legacy cmd nonsense
# https://github.com/PowerShell/Win32-OpenSSH/wiki/DefaultShell
[System.Environment]::SetEnvironmentVariable("PATH", "$($env:PATH);c:\Program Files\OpenSSH-Win64", [System.EnvironmentVariableTarget]::Machine)
New-Item -path "HKLM:\SOFTWARE\OpenSSH" -force
New-ItemProperty -Path "HKLM:\SOFTWARE\OpenSSH" -Name DefaultShell -Value "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -PropertyType String -Force
New-ItemProperty -Path "HKLM:\SOFTWARE\OpenSSH" -Name DefaultShellCommandOption -Value "/c" -PropertyType String -Force
# Adjust sshd_config to
# * allow public key authentication
# * remove 2 lines that prevent pubkey authentication working
New-Item "$($env:PROGRAMDATA)/ssh" -Type Directory -Force
$sshd_config_path = "$($env:PROGRAMDATA)/ssh/sshd_config"
$sshd_config_base64 = get-gcemetadata -path "instance/attributes/imp-sshd-config-base64"
$sshd_config_text = [System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($sshd_config_base64))
Set-Content -Path "$($sshd_config_path)" -Value "$($sshd_config_text)"
Restart-Service sshd
Set-Service sshd -StartupType Automatic
# lastly, open up the firewall port
New-NetFirewallRule -Name sshd -DisplayName 'OpenSSH Server (sshd)' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22
2019/06/10 16:28:11 [INFO] Packer version: 1.4.1
2019/06/10 16:28:11 Packer Target OS/Arch: darwin amd64
2019/06/10 16:28:11 Built with Go Version: go1.12.5
2019/06/10 16:28:11 Detected home directory from env var: /Users/petermounce
2019/06/10 16:28:11 [DEBUG] Discovered plugin: goss = /Users/petermounce/.packer.d/plugins/packer-provisioner-goss
2019/06/10 16:28:11 Using internal plugin for hcloud
2019/06/10 16:28:11 Using internal plugin for hyperv-vmcx
2019/06/10 16:28:11 Using internal plugin for virtualbox-ovf
2019/06/10 16:28:11 Using internal plugin for vmware-iso
2019/06/10 16:28:11 Using internal plugin for vmware-vmx
2019/06/10 16:28:11 Using internal plugin for azure-arm
2019/06/10 16:28:11 Using internal plugin for virtualbox-iso
2019/06/10 16:28:11 Using internal plugin for null
2019/06/10 16:28:11 Using internal plugin for parallels-pvm
2019/06/10 16:28:11 Using internal plugin for qemu
2019/06/10 16:28:11 Using internal plugin for vagrant
2019/06/10 16:28:11 Using internal plugin for googlecompute
2019/06/10 16:28:11 Using internal plugin for lxd
2019/06/10 16:28:11 Using internal plugin for ncloud
2019/06/10 16:28:11 Using internal plugin for openstack
2019/06/10 16:28:11 Using internal plugin for oracle-oci
2019/06/10 16:28:11 Using internal plugin for proxmox
2019/06/10 16:28:11 Using internal plugin for yandex
2019/06/10 16:28:11 Using internal plugin for amazon-ebs
2019/06/10 16:28:11 Using internal plugin for amazon-instance
2019/06/10 16:28:11 Using internal plugin for file
2019/06/10 16:28:11 Using internal plugin for hyperone
2019/06/10 16:28:11 Using internal plugin for oracle-classic
2019/06/10 16:28:11 Using internal plugin for parallels-iso
2019/06/10 16:28:11 Using internal plugin for triton
2019/06/10 16:28:11 Using internal plugin for alicloud-ecs
2019/06/10 16:28:11 Using internal plugin for amazon-ebssurrogate
2019/06/10 16:28:11 Using internal plugin for digitalocean
2019/06/10 16:28:11 Using internal plugin for docker
2019/06/10 16:28:11 Using internal plugin for lxc
2019/06/10 16:28:11 Using internal plugin for profitbricks
2019/06/10 16:28:11 Using internal plugin for amazon-chroot
2019/06/10 16:28:11 Using internal plugin for cloudstack
2019/06/10 16:28:11 Using internal plugin for hyperv-iso
2019/06/10 16:28:11 Using internal plugin for linode
2019/06/10 16:28:11 Using internal plugin for scaleway
2019/06/10 16:28:11 Using internal plugin for tencentcloud-cvm
2019/06/10 16:28:11 Using internal plugin for amazon-ebsvolume
2019/06/10 16:28:11 Using internal plugin for oneandone
2019/06/10 16:28:11 Using internal plugin for chef-client
2019/06/10 16:28:11 Using internal plugin for breakpoint
2019/06/10 16:28:11 Using internal plugin for chef-solo
2019/06/10 16:28:11 Using internal plugin for file
2019/06/10 16:28:11 Using internal plugin for salt-masterless
2019/06/10 16:28:11 Using internal plugin for shell-local
2019/06/10 16:28:11 Using internal plugin for sleep
2019/06/10 16:28:11 Using internal plugin for windows-restart
2019/06/10 16:28:11 Using internal plugin for ansible
2019/06/10 16:28:11 Using internal plugin for ansible-local
2019/06/10 16:28:11 Using internal plugin for inspec
2019/06/10 16:28:11 Using internal plugin for puppet-masterless
2019/06/10 16:28:11 Using internal plugin for puppet-server
2019/06/10 16:28:11 Using internal plugin for shell
2019/06/10 16:28:11 Using internal plugin for converge
2019/06/10 16:28:11 Using internal plugin for powershell
2019/06/10 16:28:11 Using internal plugin for windows-shell
2019/06/10 16:28:11 Using internal plugin for compress
2019/06/10 16:28:11 Using internal plugin for docker-import
2019/06/10 16:28:11 Using internal plugin for docker-save
2019/06/10 16:28:11 Using internal plugin for docker-tag
2019/06/10 16:28:11 Using internal plugin for googlecompute-export
2019/06/10 16:28:11 Using internal plugin for manifest
2019/06/10 16:28:11 Using internal plugin for alicloud-import
2019/06/10 16:28:11 Using internal plugin for artifice
2019/06/10 16:28:11 Using internal plugin for checksum
2019/06/10 16:28:11 Using internal plugin for digitalocean-import
2019/06/10 16:28:11 Using internal plugin for vsphere
2019/06/10 16:28:11 Using internal plugin for amazon-import
2019/06/10 16:28:11 Using internal plugin for shell-local
2019/06/10 16:28:11 Using internal plugin for googlecompute-import
2019/06/10 16:28:11 Using internal plugin for vagrant
2019/06/10 16:28:11 Using internal plugin for vagrant-cloud
2019/06/10 16:28:11 Using internal plugin for vsphere-template
2019/06/10 16:28:11 Using internal plugin for docker-push
2019/06/10 16:28:11 Detected home directory from env var: /Users/petermounce
2019/06/10 16:28:11 Attempting to open config file: /Users/petermounce/.packerconfig
2019/06/10 16:28:11 [WARN] Config file doesn't exist: /Users/petermounce/.packerconfig
2019/06/10 16:28:11 Packer config: &{DisableCheckpoint:false DisableCheckpointSignature:false PluginMinPort:10000 PluginMaxPort:25000 Builders:map[alicloud-ecs:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-alicloud-ecs amazon-chroot:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-amazon-chroot amazon-ebs:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-amazon-ebs amazon-ebssurrogate:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-amazon-ebssurrogate amazon-ebsvolume:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-amazon-ebsvolume amazon-instance:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-amazon-instance azure-arm:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-azure-arm cloudstack:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-cloudstack digitalocean:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-digitalocean docker:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-docker file:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-file googlecompute:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-googlecompute hcloud:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-hcloud hyperone:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-hyperone hyperv-iso:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-hyperv-iso hyperv-vmcx:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-hyperv-vmcx linode:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-linode lxc:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-lxc lxd:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-lxd ncloud:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-ncloud null:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-null oneandone:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-oneandone openstack:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-openstack oracle-classic:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-oracle-classic oracle-oci:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-oracle-oci parallels-iso:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-parallels-iso parallels-pvm:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-parallels-pvm profitbricks:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-profitbricks proxmox:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-proxmox qemu:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-qemu scaleway:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-scaleway tencentcloud-cvm:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-tencentcloud-cvm triton:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-triton vagrant:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-vagrant virtualbox-iso:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-virtualbox-iso virtualbox-ovf:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-virtualbox-ovf vmware-iso:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-vmware-iso vmware-vmx:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-vmware-vmx yandex:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-yandex] PostProcessors:map[alicloud-import:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-alicloud-import amazon-import:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-amazon-import artifice:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-artifice checksum:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-checksum compress:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-compress digitalocean-import:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-digitalocean-import docker-import:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-docker-import docker-push:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-docker-push docker-save:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-docker-save docker-tag:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-docker-tag googlecompute-export:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-googlecompute-export googlecompute-import:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-googlecompute-import manifest:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-manifest shell-local:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-shell-local vagrant:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-vagrant vagrant-cloud:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-vagrant-cloud vsphere:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-vsphere vsphere-template:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-vsphere-template] Provisioners:map[ansible:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-ansible ansible-local:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-ansible-local breakpoint:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-breakpoint chef-client:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-chef-client chef-solo:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-chef-solo converge:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-converge file:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-file goss:/Users/petermounce/.packer.d/plugins/packer-provisioner-goss inspec:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-inspec powershell:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-powershell puppet-masterless:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-puppet-masterless puppet-server:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-puppet-server salt-masterless:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-salt-masterless shell:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-shell shell-local:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-shell-local sleep:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-sleep windows-restart:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-windows-restart windows-shell:/usr/local/bin/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-windows-shell]}
2019/06/10 16:28:11 Detected home directory from env var: /Users/petermounce
2019/06/10 16:28:11 Setting cache directory: /Users/petermounce/src/ip/platform/packer/improbable.io/buildkite/packer_cache
2019/06/10 16:28:11 Detected home directory from env var: /Users/petermounce
2019/06/10 16:28:11 Loading builder: googlecompute
2019/06/10 16:28:11 Plugin could not be found. Checking same directory as executable.
2019/06/10 16:28:11 Current exe path: /usr/local/bin/packer
2019/06/10 16:28:11 Creating plugin client for path: /usr/local/bin/packer
2019/06/10 16:28:11 Starting plugin: /usr/local/bin/packer []string{"/usr/local/bin/packer", "plugin", "packer-builder-googlecompute"}
2019/06/10 16:28:11 Waiting for RPC address for: /usr/local/bin/packer
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 [INFO] Packer version: 1.4.1
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Packer Target OS/Arch: darwin amd64
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Built with Go Version: go1.12.5
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Detected home directory from env var: /Users/petermounce
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Attempting to open config file: /Users/petermounce/.packerconfig
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 [WARN] Config file doesn't exist: /Users/petermounce/.packerconfig
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Packer config: &{DisableCheckpoint:false DisableCheckpointSignature:false PluginMinPort:10000 PluginMaxPort:25000 Builders:map[] PostProcessors:map[] Provisioners:map[]}
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Detected home directory from env var: /Users/petermounce
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Setting cache directory: /Users/petermounce/src/ip/platform/packer/improbable.io/buildkite/packer_cache
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Detected home directory from env var: /Users/petermounce
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 args: []string{"packer-builder-googlecompute"}
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Plugin minimum port: 10000
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Plugin maximum port: 25000
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Plugin address: unix /var/folders/w2/jd7cgbj92n9b3xbzkp5rft740000gn/T/packer-plugin992525027
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Waiting for connection...
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Serving a plugin connection...
2019/06/10 16:28:11 Loading provisioner: powershell
2019/06/10 16:28:11 Plugin could not be found. Checking same directory as executable.
2019/06/10 16:28:11 Current exe path: /usr/local/bin/packer
2019/06/10 16:28:11 Creating plugin client for path: /usr/local/bin/packer
2019/06/10 16:28:11 Starting plugin: /usr/local/bin/packer []string{"/usr/local/bin/packer", "plugin", "packer-provisioner-powershell"}
2019/06/10 16:28:11 Waiting for RPC address for: /usr/local/bin/packer
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 [INFO] Packer version: 1.4.1
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Packer Target OS/Arch: darwin amd64
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Built with Go Version: go1.12.5
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Detected home directory from env var: /Users/petermounce
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Attempting to open config file: /Users/petermounce/.packerconfig
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 [WARN] Config file doesn't exist: /Users/petermounce/.packerconfig
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Packer config: &{DisableCheckpoint:false DisableCheckpointSignature:false PluginMinPort:10000 PluginMaxPort:25000 Builders:map[] PostProcessors:map[] Provisioners:map[]}
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Detected home directory from env var: /Users/petermounce
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Setting cache directory: /Users/petermounce/src/ip/platform/packer/improbable.io/buildkite/packer_cache
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Detected home directory from env var: /Users/petermounce
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 args: []string{"packer-provisioner-powershell"}
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Plugin minimum port: 10000
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Plugin maximum port: 25000
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Plugin address: unix /var/folders/w2/jd7cgbj92n9b3xbzkp5rft740000gn/T/packer-plugin246863767
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Waiting for connection...
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Serving a plugin connection...
2019/06/10 16:28:11 Loading provisioner: shell-local
2019/06/10 16:28:11 Plugin could not be found. Checking same directory as executable.
2019/06/10 16:28:11 Current exe path: /usr/local/bin/packer
2019/06/10 16:28:11 Creating plugin client for path: /usr/local/bin/packer
2019/06/10 16:28:11 Starting plugin: /usr/local/bin/packer []string{"/usr/local/bin/packer", "plugin", "packer-provisioner-shell-local"}
2019/06/10 16:28:11 Waiting for RPC address for: /usr/local/bin/packer
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 [INFO] Packer version: 1.4.1
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Packer Target OS/Arch: darwin amd64
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Built with Go Version: go1.12.5
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Detected home directory from env var: /Users/petermounce
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Attempting to open config file: /Users/petermounce/.packerconfig
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 [WARN] Config file doesn't exist: /Users/petermounce/.packerconfig
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Packer config: &{DisableCheckpoint:false DisableCheckpointSignature:false PluginMinPort:10000 PluginMaxPort:25000 Builders:map[] PostProcessors:map[] Provisioners:map[]}
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Detected home directory from env var: /Users/petermounce
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Detected home directory from env var: /Users/petermounce
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Setting cache directory: /Users/petermounce/src/ip/platform/packer/improbable.io/buildkite/packer_cache
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 args: []string{"packer-provisioner-shell-local"}
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Plugin minimum port: 10000
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Plugin maximum port: 25000
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Plugin address: unix /var/folders/w2/jd7cgbj92n9b3xbzkp5rft740000gn/T/packer-plugin196833851
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Waiting for connection...
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Serving a plugin connection...
2019/06/10 16:28:11 Loading provisioner: shell-local
2019/06/10 16:28:11 Plugin could not be found. Checking same directory as executable.
2019/06/10 16:28:11 Current exe path: /usr/local/bin/packer
2019/06/10 16:28:11 Creating plugin client for path: /usr/local/bin/packer
2019/06/10 16:28:11 Starting plugin: /usr/local/bin/packer []string{"/usr/local/bin/packer", "plugin", "packer-provisioner-shell-local"}
2019/06/10 16:28:11 Waiting for RPC address for: /usr/local/bin/packer
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 [INFO] Packer version: 1.4.1
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Packer Target OS/Arch: darwin amd64
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Built with Go Version: go1.12.5
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Detected home directory from env var: /Users/petermounce
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Attempting to open config file: /Users/petermounce/.packerconfig
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 [WARN] Config file doesn't exist: /Users/petermounce/.packerconfig
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Packer config: &{DisableCheckpoint:false DisableCheckpointSignature:false PluginMinPort:10000 PluginMaxPort:25000 Builders:map[] PostProcessors:map[] Provisioners:map[]}
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Detected home directory from env var: /Users/petermounce
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Setting cache directory: /Users/petermounce/src/ip/platform/packer/improbable.io/buildkite/packer_cache
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Detected home directory from env var: /Users/petermounce
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 args: []string{"packer-provisioner-shell-local"}
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Plugin minimum port: 10000
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Plugin maximum port: 25000
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Plugin address: unix /var/folders/w2/jd7cgbj92n9b3xbzkp5rft740000gn/T/packer-plugin666385655
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Waiting for connection...
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Serving a plugin connection...
2019/06/10 16:28:11 Loading provisioner: windows-restart
2019/06/10 16:28:11 Plugin could not be found. Checking same directory as executable.
2019/06/10 16:28:11 Current exe path: /usr/local/bin/packer
2019/06/10 16:28:11 Creating plugin client for path: /usr/local/bin/packer
2019/06/10 16:28:11 Starting plugin: /usr/local/bin/packer []string{"/usr/local/bin/packer", "plugin", "packer-provisioner-windows-restart"}
2019/06/10 16:28:11 Waiting for RPC address for: /usr/local/bin/packer
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 [INFO] Packer version: 1.4.1
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Packer Target OS/Arch: darwin amd64
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Built with Go Version: go1.12.5
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Detected home directory from env var: /Users/petermounce
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Attempting to open config file: /Users/petermounce/.packerconfig
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 [WARN] Config file doesn't exist: /Users/petermounce/.packerconfig
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Packer config: &{DisableCheckpoint:false DisableCheckpointSignature:false PluginMinPort:10000 PluginMaxPort:25000 Builders:map[] PostProcessors:map[] Provisioners:map[]}
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Detected home directory from env var: /Users/petermounce
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Detected home directory from env var: /Users/petermounce
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Setting cache directory: /Users/petermounce/src/ip/platform/packer/improbable.io/buildkite/packer_cache
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 args: []string{"packer-provisioner-windows-restart"}
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Plugin minimum port: 10000
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Plugin maximum port: 25000
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Plugin address: unix /var/folders/w2/jd7cgbj92n9b3xbzkp5rft740000gn/T/packer-plugin745348027
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Waiting for connection...
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Serving a plugin connection...
2019/06/10 16:28:11 Loading provisioner: shell-local
2019/06/10 16:28:11 Plugin could not be found. Checking same directory as executable.
2019/06/10 16:28:11 Current exe path: /usr/local/bin/packer
2019/06/10 16:28:11 Creating plugin client for path: /usr/local/bin/packer
2019/06/10 16:28:11 Starting plugin: /usr/local/bin/packer []string{"/usr/local/bin/packer", "plugin", "packer-provisioner-shell-local"}
2019/06/10 16:28:11 Waiting for RPC address for: /usr/local/bin/packer
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 [INFO] Packer version: 1.4.1
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Packer Target OS/Arch: darwin amd64
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Built with Go Version: go1.12.5
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Detected home directory from env var: /Users/petermounce
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Attempting to open config file: /Users/petermounce/.packerconfig
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 [WARN] Config file doesn't exist: /Users/petermounce/.packerconfig
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Packer config: &{DisableCheckpoint:false DisableCheckpointSignature:false PluginMinPort:10000 PluginMaxPort:25000 Builders:map[] PostProcessors:map[] Provisioners:map[]}
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Detected home directory from env var: /Users/petermounce
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Setting cache directory: /Users/petermounce/src/ip/platform/packer/improbable.io/buildkite/packer_cache
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Detected home directory from env var: /Users/petermounce
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 args: []string{"packer-provisioner-shell-local"}
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Plugin minimum port: 10000
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Plugin maximum port: 25000
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Plugin address: unix /var/folders/w2/jd7cgbj92n9b3xbzkp5rft740000gn/T/packer-plugin532605775
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Waiting for connection...
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Serving a plugin connection...
2019/06/10 16:28:11 Loading provisioner: windows-restart
2019/06/10 16:28:11 Plugin could not be found. Checking same directory as executable.
2019/06/10 16:28:11 Current exe path: /usr/local/bin/packer
2019/06/10 16:28:11 Creating plugin client for path: /usr/local/bin/packer
2019/06/10 16:28:11 Starting plugin: /usr/local/bin/packer []string{"/usr/local/bin/packer", "plugin", "packer-provisioner-windows-restart"}
2019/06/10 16:28:11 Waiting for RPC address for: /usr/local/bin/packer
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 [INFO] Packer version: 1.4.1
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Packer Target OS/Arch: darwin amd64
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Built with Go Version: go1.12.5
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Detected home directory from env var: /Users/petermounce
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Attempting to open config file: /Users/petermounce/.packerconfig
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 [WARN] Config file doesn't exist: /Users/petermounce/.packerconfig
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Packer config: &{DisableCheckpoint:false DisableCheckpointSignature:false PluginMinPort:10000 PluginMaxPort:25000 Builders:map[] PostProcessors:map[] Provisioners:map[]}
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Detected home directory from env var: /Users/petermounce
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Detected home directory from env var: /Users/petermounce
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Setting cache directory: /Users/petermounce/src/ip/platform/packer/improbable.io/buildkite/packer_cache
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 args: []string{"packer-provisioner-windows-restart"}
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Plugin minimum port: 10000
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Plugin maximum port: 25000
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Plugin address: unix /var/folders/w2/jd7cgbj92n9b3xbzkp5rft740000gn/T/packer-plugin490071571
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Waiting for connection...
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Serving a plugin connection...
2019/06/10 16:28:11 Loading provisioner: powershell
2019/06/10 16:28:11 Plugin could not be found. Checking same directory as executable.
2019/06/10 16:28:11 Current exe path: /usr/local/bin/packer
2019/06/10 16:28:11 Creating plugin client for path: /usr/local/bin/packer
2019/06/10 16:28:11 Starting plugin: /usr/local/bin/packer []string{"/usr/local/bin/packer", "plugin", "packer-provisioner-powershell"}
2019/06/10 16:28:11 Waiting for RPC address for: /usr/local/bin/packer
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 [INFO] Packer version: 1.4.1
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Packer Target OS/Arch: darwin amd64
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Built with Go Version: go1.12.5
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Detected home directory from env var: /Users/petermounce
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Attempting to open config file: /Users/petermounce/.packerconfig
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 [WARN] Config file doesn't exist: /Users/petermounce/.packerconfig
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Packer config: &{DisableCheckpoint:false DisableCheckpointSignature:false PluginMinPort:10000 PluginMaxPort:25000 Builders:map[] PostProcessors:map[] Provisioners:map[]}
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Detected home directory from env var: /Users/petermounce
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Setting cache directory: /Users/petermounce/src/ip/platform/packer/improbable.io/buildkite/packer_cache
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Detected home directory from env var: /Users/petermounce
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 args: []string{"packer-provisioner-powershell"}
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Plugin minimum port: 10000
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Plugin maximum port: 25000
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Plugin address: unix /var/folders/w2/jd7cgbj92n9b3xbzkp5rft740000gn/T/packer-plugin310255975
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Waiting for connection...
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Serving a plugin connection...
2019/06/10 16:28:11 Loading provisioner: powershell
2019/06/10 16:28:11 Plugin could not be found. Checking same directory as executable.
2019/06/10 16:28:11 Current exe path: /usr/local/bin/packer
2019/06/10 16:28:11 Creating plugin client for path: /usr/local/bin/packer
2019/06/10 16:28:11 Starting plugin: /usr/local/bin/packer []string{"/usr/local/bin/packer", "plugin", "packer-provisioner-powershell"}
2019/06/10 16:28:11 Waiting for RPC address for: /usr/local/bin/packer
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 [INFO] Packer version: 1.4.1
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Packer Target OS/Arch: darwin amd64
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Built with Go Version: go1.12.5
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Detected home directory from env var: /Users/petermounce
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Attempting to open config file: /Users/petermounce/.packerconfig
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 [WARN] Config file doesn't exist: /Users/petermounce/.packerconfig
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Packer config: &{DisableCheckpoint:false DisableCheckpointSignature:false PluginMinPort:10000 PluginMaxPort:25000 Builders:map[] PostProcessors:map[] Provisioners:map[]}
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Detected home directory from env var: /Users/petermounce
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Setting cache directory: /Users/petermounce/src/ip/platform/packer/improbable.io/buildkite/packer_cache
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Detected home directory from env var: /Users/petermounce
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 args: []string{"packer-provisioner-powershell"}
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Plugin minimum port: 10000
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Plugin maximum port: 25000
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Plugin address: unix /var/folders/w2/jd7cgbj92n9b3xbzkp5rft740000gn/T/packer-plugin317040667
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Waiting for connection...
2019/06/10 16:28:11 packer: 2019/06/10 16:28:11 Serving a plugin connection...
2019/06/10 16:28:12 ui: googlecompute output will be in this color.
2019/06/10 16:28:12 ui:
2019/06/10 16:28:12 Build debug mode: false
2019/06/10 16:28:12 Force build: false
2019/06/10 16:28:12 On error: abort
2019/06/10 16:28:12 Preparing build: googlecompute
2019/06/10 16:28:12 Waiting on builds to complete...
2019/06/10 16:28:12 Starting build run: googlecompute
2019/06/10 16:28:12 Running builder: googlecompute
2019/06/10 16:28:12 [INFO] (telemetry) Starting builder googlecompute
2019/06/10 16:28:12 packer: 2019/06/10 16:28:12 [INFO] Requesting Google token via GCE API Default Client Token Source...
2019/06/10 16:28:12 packer: 2019/06/10 16:28:12 [INFO] Instantiating GCE client...
2019/06/10 16:28:12 ui: ==> googlecompute: Checking image does not exist...
2019/06/10 16:28:12 ui: ==> googlecompute: Using existing SSH private key
2019/06/10 16:28:16 ui: ==> googlecompute: Using image: windows-server-2016-dc-v20190514
2019/06/10 16:28:16 ui: ==> googlecompute: Creating instance...
2019/06/10 16:28:16 ui:  googlecompute: Loading zone: europe-west1-d
2019/06/10 16:28:16 ui:  googlecompute: Loading machine type: n1-standard-2
2019/06/10 16:28:17 ui:  googlecompute: Requesting instance creation...
2019/06/10 16:28:18 ui:  googlecompute: Waiting for creation operation to complete...
2019/06/10 16:28:19 packer: 2019/06/10 16:28:19 Retryable error: retrying for state DONE, got RUNNING
2019/06/10 16:28:21 packer: 2019/06/10 16:28:21 Retryable error: retrying for state DONE, got RUNNING
2019/06/10 16:28:23 packer: 2019/06/10 16:28:23 Retryable error: retrying for state DONE, got RUNNING
2019/06/10 16:28:26 packer: 2019/06/10 16:28:26 Retryable error: retrying for state DONE, got RUNNING
2019/06/10 16:28:28 packer: 2019/06/10 16:28:28 Retryable error: retrying for state DONE, got RUNNING
2019/06/10 16:28:30 packer: 2019/06/10 16:28:30 Retryable error: retrying for state DONE, got RUNNING
2019/06/10 16:28:33 packer: 2019/06/10 16:28:33 Retryable error: retrying for state DONE, got RUNNING
2019/06/10 16:28:35 packer: 2019/06/10 16:28:35 Retryable error: retrying for state DONE, got RUNNING
2019/06/10 16:28:37 packer: 2019/06/10 16:28:37 Retryable error: retrying for state DONE, got RUNNING
2019/06/10 16:28:40 packer: 2019/06/10 16:28:40 Retryable error: retrying for state DONE, got RUNNING
2019/06/10 16:28:42 packer: 2019/06/10 16:28:42 Retryable error: retrying for state DONE, got RUNNING
2019/06/10 16:28:44 packer: 2019/06/10 16:28:44 Retryable error: retrying for state DONE, got RUNNING
2019/06/10 16:28:47 packer: 2019/06/10 16:28:47 Retryable error: retrying for state DONE, got RUNNING
2019/06/10 16:28:49 packer: 2019/06/10 16:28:49 Retryable error: retrying for state DONE, got RUNNING
2019/06/10 16:28:51 packer: 2019/06/10 16:28:51 Retryable error: retrying for state DONE, got RUNNING
2019/06/10 16:28:54 ui:  googlecompute: Instance has been created!
2019/06/10 16:28:54 ui: ==> googlecompute: Waiting for the instance to become running...
2019/06/10 16:28:54 ui:  googlecompute: IP: 104.199.90.181
2019/06/10 16:28:54 ui: ==> googlecompute: Using ssh communicator to connect: 104.199.90.181
2019/06/10 16:28:54 packer: 2019/06/10 16:28:54 [INFO] Waiting for SSH, up to timeout: 5m0s
2019/06/10 16:28:54 ui: ==> googlecompute: Waiting for SSH to become available...
2019/06/10 16:28:55 packer: 2019/06/10 16:28:55 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 104.199.90.181:22: connect: connection refused
2019/06/10 16:29:15 packer: 2019/06/10 16:29:15 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 104.199.90.181:22: i/o timeout
2019/06/10 16:29:35 packer: 2019/06/10 16:29:35 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 104.199.90.181:22: i/o timeout
2019/06/10 16:29:40 packer: 2019/06/10 16:29:40 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 104.199.90.181:22: connect: connection refused
2019/06/10 16:30:00 packer: 2019/06/10 16:30:00 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 104.199.90.181:22: i/o timeout
2019/06/10 16:30:20 packer: 2019/06/10 16:30:20 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 104.199.90.181:22: i/o timeout
2019/06/10 16:30:40 packer: 2019/06/10 16:30:40 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 104.199.90.181:22: i/o timeout
2019/06/10 16:30:49 packer: 2019/06/10 16:30:49 [INFO] Attempting SSH connection to 104.199.90.181:22...
2019/06/10 16:30:49 packer: 2019/06/10 16:30:49 [DEBUG] Config to &ssh.Config{SSHConfig:(*ssh.ClientConfig)(0xc00026e5b0), Connection:(func() (net.Conn, error))(0x1d39bb0), Pty:false, DisableAgentForwarding:false, HandshakeTimeout:0, UseSftp:false, KeepAliveInterval:5000000000, Timeout:0}...
2019/06/10 16:30:49 packer: 2019/06/10 16:30:49 [DEBUG] reconnecting to TCP connection for SSH
2019/06/10 16:30:49 packer: 2019/06/10 16:30:49 [DEBUG] handshaking with SSH
2019/06/10 16:30:50 packer: 2019/06/10 16:30:50 [DEBUG] handshake complete!
2019/06/10 16:30:50 packer: 2019/06/10 16:30:50 [DEBUG] Opening new ssh session
2019/06/10 16:30:51 packer: 2019/06/10 16:30:51 [ERROR] RequestAgentForwarding: &errors.errorString{s:"forwarding request denied"}
2019/06/10 16:30:51 ui: ==> googlecompute: Connected to SSH!
2019/06/10 16:30:51 packer: 2019/06/10 16:30:51 Running the provision hook
2019/06/10 16:30:51 [INFO] (telemetry) Starting provisioner powershell
2019/06/10 16:30:51 ui: ==> googlecompute: Provisioning with Powershell...
2019/06/10 16:30:51 packer: 2019/06/10 16:30:51 Found command: Get-GceMetadata -Path instance/attributes/imp-bootstrap-base64
2019/06/10 16:30:51 packer: 2019/06/10 16:30:51 Found command: Get-GceMetadata -Path instance/attributes/imp-public-key-base64
2019/06/10 16:30:51 packer: 2019/06/10 16:30:51 Found command: net user packer_user
2019/06/10 16:30:51 packer: 2019/06/10 16:30:51 Found command: net localgroup administrators
2019/06/10 16:30:51 packer: 2019/06/10 16:30:51 Found command: ls c:/users
2019/06/10 16:30:51 packer: 2019/06/10 16:30:51 Found command: test-path c:/users/packer_user/.ssh/authorized_keys
2019/06/10 16:30:51 packer: 2019/06/10 16:30:51 Found command: cat c:/users/packer_user/.ssh/authorized_keys
2019/06/10 16:30:51 packer: 2019/06/10 16:30:51 Found command: echo "c3NoLXJzYSBBQUFBQjNOemFDMXljMkVBQUFBREFRQUJBQUFCQVFEbDVVVXBkeHVudXFJekxJS2pYbENqa0VEbzVSNTc3OHVyUmoyMzRMNnNiQ0d6d1NIQSsxSjFEQ1d3ZCtCRTFDQUh4bEYzSVJCbW1UZ2RGSXNYVm1vWVdFSit4OGx3aVpwWFJnYWFpdU56Y2kyOXAzK0dmdEhyUWVYVkNGUWxab2JTdDQrcjBYM3EwR3djUFVwZDU2Vmc1Z2lxR29ITnhCZ1JaNk5FUk9xQmU3czFjRzlsQnFQVmFIc014V09UYlB3WkxtTzc2UGhYQ0ZHcnhpUDJnWHY4TzViK1Bwb0dIdlJxT25FT2dZaEpqajFXbng2Z202SjE3VGlLTE45RmNBbkVKckxJVmdqcDQvWlE3VUx2MmtvRlM5MWtqNkRMWmRqcUk0bWZvVVhOalkzUzBCbEJsaVNNakVvajhCZjdSenhWbGphK21uOTVNQ3oraUhPUENBdUwgcGV0ZXJtb3VuY2VAcGV0ZXJtb3VuY2UtbWFjLWMwMnhwMHA3amdoNi5jb3JwLmltcHJvYmFibGUuaW8K"
2019/06/10 16:30:51 packer: 2019/06/10 16:30:51 Found command: Get-GceMetadata -Path instance/attributes/imp-public-key-base64
2019/06/10 16:30:51 packer: 2019/06/10 16:30:51 Found command: get-service sshd -detailed
2019/06/10 16:30:51 packer: 2019/06/10 16:30:51 Found command: cat c:/programdata/ssh/sshd_config
2019/06/10 16:30:51 ui: ==> googlecompute: Provisioning with powershell script: /var/folders/w2/jd7cgbj92n9b3xbzkp5rft740000gn/T/powershell-provisioner562594826
2019/06/10 16:30:51 packer: 2019/06/10 16:30:51 Opening /var/folders/w2/jd7cgbj92n9b3xbzkp5rft740000gn/T/powershell-provisioner562594826 for reading
2019/06/10 16:30:51 packer: 2019/06/10 16:30:51 Uploading env vars to c:/Windows/Temp/packer-ps-env-vars-5cfe770c-d115-1d84-b442-9334f60dc058.ps1
2019/06/10 16:30:51 packer: 2019/06/10 16:30:51 [INFO] 82 bytes written for 'uploadData'
2019/06/10 16:30:51 [INFO] 82 bytes written for 'uploadData'
2019/06/10 16:30:51 packer: 2019/06/10 16:30:51 [DEBUG] Opening new ssh session
2019/06/10 16:30:51 packer: 2019/06/10 16:30:51 [DEBUG] Starting remote scp process: scp -vt c:/Windows/Temp
2019/06/10 16:30:51 packer: 2019/06/10 16:30:51 [DEBUG] Started SCP session, beginning transfers...
2019/06/10 16:30:51 packer: 2019/06/10 16:30:51 [DEBUG] Copying input data into temporary file so we can read the length
2019/06/10 16:30:51 packer: 2019/06/10 16:30:51 [DEBUG] scp: Uploading packer-ps-env-vars-5cfe770c-d115-1d84-b442-9334f60dc058.ps1: perms=C0644 size=82
2019/06/10 16:30:56 packer: 2019/06/10 16:30:56 [DEBUG] SCP session complete, closing stdin pipe.
2019/06/10 16:30:56 packer: 2019/06/10 16:30:56 [DEBUG] Waiting for SSH session to complete.
2019/06/10 16:30:57 packer: 2019/06/10 16:30:57 [DEBUG] scp stderr (length 76): Sink: C0644 82 packer-ps-env-vars-5cfe770c-d115-1d84-b442-9334f60dc058.ps1
2019/06/10 16:30:57 packer: 2019/06/10 16:30:57 [DEBUG] Opening new ssh session
2019/06/10 16:30:57 packer: 2019/06/10 16:30:57 [INFO] 1010 bytes written for 'uploadData'
2019/06/10 16:30:57 [INFO] 1010 bytes written for 'uploadData'
2019/06/10 16:30:57 packer: 2019/06/10 16:30:57 [DEBUG] Starting remote scp process: scp -vt c:/Windows/Temp
2019/06/10 16:30:57 packer: 2019/06/10 16:30:57 [DEBUG] Started SCP session, beginning transfers...
2019/06/10 16:30:57 packer: 2019/06/10 16:30:57 [DEBUG] Copying input data into temporary file so we can read the length
2019/06/10 16:30:57 packer: 2019/06/10 16:30:57 [DEBUG] scp: Uploading script-5cfe770c-fc2b-b999-99e3-23e550ba6ace.ps1: perms=C0644 size=1010
2019/06/10 16:31:01 packer: 2019/06/10 16:31:01 [DEBUG] SCP session complete, closing stdin pipe.
2019/06/10 16:31:01 packer: 2019/06/10 16:31:01 [DEBUG] Waiting for SSH session to complete.
2019/06/10 16:31:01 packer: 2019/06/10 16:31:01 [DEBUG] scp stderr (length 66): Sink: C0644 1010 script-5cfe770c-fc2b-b999-99e3-23e550ba6ace.ps1
2019/06/10 16:31:01 packer: 2019/06/10 16:31:01 [DEBUG] Opening new ssh session
2019/06/10 16:31:01 packer: 2019/06/10 16:31:01 [DEBUG] starting remote command: powershell -executionpolicy bypass "& { if (Test-Path variable:global:ProgressPreference){set-variable -name variable:global:ProgressPreference -value 'SilentlyContinue'};. c:/Windows/Temp/packer-ps-env-vars-5cfe770c-d115-1d84-b442-9334f60dc058.ps1; &'c:/Windows/Temp/script-5cfe770c-fc2b-b999-99e3-23e550ba6ace.ps1'; exit $LastExitCode }"
2019/06/10 16:31:17 ui:  googlecompute: cGFyYW0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5MWtqNkRMWmRqcUk0bWZvVVhOalkzUzBCbEJsaVNNakVvajhCZjdSenhWbGphK21uOTVNQ3oraUhPUENBdUwgcGV0ZXJtb3VuY2VAcGV0ZXJtb3VuY2UtbWFjLWMwMnhwMHA3amdoNi5jb3JwLmltcHJvYmFibGUuaW8K
2019/06/10 16:31:19 ui:  googlecompute: User name packer_user
2019/06/10 16:31:19 ui:  googlecompute: Full Name
2019/06/10 16:31:19 ui:  googlecompute: Comment
2019/06/10 16:31:19 ui:  googlecompute: User's comment
2019/06/10 16:31:19 ui:  googlecompute: Country/region code 000 (System Default)
2019/06/10 16:31:19 ui:  googlecompute: Account active Yes
2019/06/10 16:31:19 ui:  googlecompute: Account expires Never
2019/06/10 16:31:19 ui:  googlecompute:
2019/06/10 16:31:19 ui:  googlecompute: Password last set 6/10/2019 3:30:35 PM
2019/06/10 16:31:19 ui:  googlecompute: Password expires Never
2019/06/10 16:31:19 ui:  googlecompute: Password changeable 6/10/2019 3:30:35 PM
2019/06/10 16:31:19 ui:  googlecompute: Password required No
2019/06/10 16:31:19 ui:  googlecompute: User may change password Yes
2019/06/10 16:31:19 ui:  googlecompute:
2019/06/10 16:31:19 ui:  googlecompute: Workstations allowed All
2019/06/10 16:31:19 ui:  googlecompute: Logon script
2019/06/10 16:31:19 ui:  googlecompute: User profile
2019/06/10 16:31:19 ui:  googlecompute: Home directory
2019/06/10 16:31:19 ui:  googlecompute: Last logon Never
2019/06/10 16:31:19 ui:  googlecompute:
2019/06/10 16:31:19 ui:  googlecompute: Logon hours allowed All
2019/06/10 16:31:19 ui:  googlecompute:
2019/06/10 16:31:19 ui:  googlecompute: Local Group Memberships *Administrators
2019/06/10 16:31:19 ui:  googlecompute: Global Group memberships *None
2019/06/10 16:31:19 ui:  googlecompute: The command completed successfully.
2019/06/10 16:31:19 ui:  googlecompute:
2019/06/10 16:31:19 ui:  googlecompute: Alias name administrators
2019/06/10 16:31:19 ui:  googlecompute: Comment Administrators have complete and unrestricted access to the computer/domain
2019/06/10 16:31:19 ui:  googlecompute:
2019/06/10 16:31:19 ui:  googlecompute: Members
2019/06/10 16:31:19 ui:  googlecompute:
2019/06/10 16:31:19 ui:  googlecompute: -------------------------------------------------------------------------------
2019/06/10 16:31:19 ui:  googlecompute: Administrator
2019/06/10 16:31:19 ui:  googlecompute: packer_user
2019/06/10 16:31:19 ui:  googlecompute: The command completed successfully.
2019/06/10 16:31:19 ui:  googlecompute:
2019/06/10 16:31:20 ui:  googlecompute:
2019/06/10 16:31:20 ui:  googlecompute:
2019/06/10 16:31:20 ui:  googlecompute: Directory: C:\users
2019/06/10 16:31:20 ui:  googlecompute:
2019/06/10 16:31:20 ui:  googlecompute:
2019/06/10 16:31:20 ui:  googlecompute: Mode LastWriteTime Length Name
2019/06/10 16:31:20 ui:  googlecompute: ---- ------------- ------ ----
2019/06/10 16:31:20 ui:  googlecompute: d----- 6/10/2019 3:30 PM packer_user
2019/06/10 16:31:20 ui:  googlecompute: d-r--- 11/21/2016 8:17 AM Public
2019/06/10 16:31:20 ui:  googlecompute: True
2019/06/10 16:31:20 ui:  googlecompute: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDl5UUpdxunuqIzLIKjXlCjkEDo5R5778urRj234L6sbCGzwSHA+1J1DCWwd+BE1CAHxlF3IRBmmTgdFIsXVmoYWEJ+x8lwiZpXRgaaiuNzci29p3+GftHrQeXVCFQlZobSt4+r0X3q0GwcPUpd56Vg5giqGoHNxBgRZ6NEROqBe7s1cG9lBqPVaHsMxWOTbPwZLmO76PhXCFGrxiP2gXv8O5b+PpoGHvRqOnEOgYhJjj1Wnx6gm6J17TiKLN9FcAnEJrLIVgjp4/ZQ7ULv2koFS91kj6DLZdjqI4mfoUXNjY3S0BlBliSMjEoj8Bf7RzxVlja+mn95MCz+iHOPCAuL petermounce@petermounce-mac-c02xp0p7jgh6.corp.improbable.io
2019/06/10 16:31:20 ui:  googlecompute:
2019/06/10 16:31:20 ui:  googlecompute: c3NoLXJzYSBBQUF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JsaVNNakVvajhCZjdSenhWbGphK21uOTVNQ3oraUhPUENBdUwgcGV0ZXJtb3VuY2VAcGV0ZXJtb3VuY2UtbWFjLWMwMnhwMHA3amdoNi5jb3JwLmltcHJvYmFibGUuaW8K
2019/06/10 16:31:20 ui:  googlecompute: Port 22
2019/06/10 16:31:20 ui error: ==> googlecompute: Get-Service : A parameter cannot be found that matches parameter name
2019/06/10 16:31:20 ui:  googlecompute: # Logging
2019/06/10 16:31:20 ui:  googlecompute: #SyslogFacility AUTH
2019/06/10 16:31:20 ui:  googlecompute: #LogLevel INFO
2019/06/10 16:31:20 ui error: ==> googlecompute: 'detailed'.
2019/06/10 16:31:20 ui:  googlecompute:
2019/06/10 16:31:20 ui error: ==> googlecompute: At C:\Windows\Temp\script-5cfe770c-fc2b-b999-99e3-23e550ba6ace.ps1:10 char:18
2019/06/10 16:31:20 ui:  googlecompute: # Authentication:
2019/06/10 16:31:20 ui:  googlecompute:
2019/06/10 16:31:20 ui:  googlecompute: #LoginGraceTime 2m
2019/06/10 16:31:20 ui error: ==> googlecompute: + get-service sshd -detailed
2019/06/10 16:31:20 ui error: ==> googlecompute: + ~~~~~~~~~
2019/06/10 16:31:20 ui error: ==> googlecompute: + CategoryInfo : InvalidArgument: (:) [Get-Service], ParameterBin
2019/06/10 16:31:20 ui error: ==> googlecompute: dingException
2019/06/10 16:31:20 ui error: ==> googlecompute: + FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Comm
2019/06/10 16:31:20 ui:  googlecompute: #PermitRootLogin prohibit-password
2019/06/10 16:31:20 ui:  googlecompute: #StrictModes yes
2019/06/10 16:31:20 ui:  googlecompute: #MaxAuthTries 6
2019/06/10 16:31:20 ui:  googlecompute: #MaxSessions 10
2019/06/10 16:31:20 ui:  googlecompute:
2019/06/10 16:31:20 ui:  googlecompute: PubkeyAuthentication yes
2019/06/10 16:31:20 ui error: ==> googlecompute: ands.GetServiceCommand
2019/06/10 16:31:20 ui error: ==> googlecompute:
2019/06/10 16:31:20 ui:  googlecompute:
2019/06/10 16:31:20 ui:  googlecompute: # The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
2019/06/10 16:31:20 ui:  googlecompute: # but this is overridden so installations will only check .ssh/authorized_keys
2019/06/10 16:31:20 ui:  googlecompute: AuthorizedKeysFile .ssh/authorized_keys
2019/06/10 16:31:20 ui:  googlecompute:
2019/06/10 16:31:20 ui:  googlecompute: # To disable tunneled clear text passwords, change to no here!
2019/06/10 16:31:20 ui:  googlecompute: #PasswordAuthentication yes
2019/06/10 16:31:20 ui:  googlecompute: #PermitEmptyPasswords no
2019/06/10 16:31:20 ui:  googlecompute:
2019/06/10 16:31:20 ui:  googlecompute: TCPKeepAlive yes
2019/06/10 16:31:20 ui:  googlecompute:
2019/06/10 16:31:20 ui:  googlecompute: # override default of no subsystems
2019/06/10 16:31:20 ui:  googlecompute: Subsystem sftp sftp-server.exe
2019/06/10 16:31:20 ui:  googlecompute:
2019/06/10 16:31:20 packer: 2019/06/10 16:31:20 [INFO] RPC endpoint: Communicator ended with: 0
2019/06/10 16:31:20 [INFO] 434 bytes written for 'stderr'
2019/06/10 16:31:20 [INFO] 11419 bytes written for 'stdout'
2019/06/10 16:31:20 [INFO] RPC client: Communicator ended with: 0
2019/06/10 16:31:20 [INFO] RPC endpoint: Communicator ended with: 0
2019/06/10 16:31:20 packer: 2019/06/10 16:31:20 [INFO] 434 bytes written for 'stderr'
2019/06/10 16:31:20 packer: 2019/06/10 16:31:20 [INFO] 11419 bytes written for 'stdout'
2019/06/10 16:31:20 packer: 2019/06/10 16:31:20 [INFO] RPC client: Communicator ended with: 0
2019/06/10 16:31:20 [INFO] (telemetry) ending powershell
2019/06/10 16:31:20 [INFO] (telemetry) Starting provisioner shell-local
2019/06/10 16:31:20 packer: 2019/06/10 16:31:20 [INFO] (shell-local): Prepending inline script with #!/bin/sh -e
2019/06/10 16:31:20 ui: ==> googlecompute: Running local shell script: /var/folders/w2/jd7cgbj92n9b3xbzkp5rft740000gn/T/packer-shell889499230
2019/06/10 16:31:20 packer: 2019/06/10 16:31:20 [INFO] (shell-local): starting local command: /bin/sh -c PACKER_BUILDER_TYPE='googlecompute' PACKER_BUILD_NAME='googlecompute' /var/folders/w2/jd7cgbj92n9b3xbzkp5rft740000gn/T/packer-shell889499230
2019/06/10 16:31:20 packer: 2019/06/10 16:31:20 [INFO] (shell-local communicator): Executing local shell command [/bin/sh -c PACKER_BUILDER_TYPE='googlecompute' PACKER_BUILD_NAME='googlecompute' /var/folders/w2/jd7cgbj92n9b3xbzkp5rft740000gn/T/packer-shell889499230]
2019/06/10 16:31:20 ui:  googlecompute: ~/src/ip/platform/packer/improbable.io/buildkite ~/src/ip/platform
2019/06/10 16:31:20 ui:  googlecompute: make_windows_transient_inventory: Looking up IP of target...
2019/06/10 16:31:23 ui:  googlecompute: make_windows_transient_inventory: Instance name: packer-petermounce-5cfe770c-3407-de7b-97f8-30d4532883f9
2019/06/10 16:31:24 ui:  googlecompute: make_windows_transient_inventory: Written ssh config successfully.
2019/06/10 16:31:24 ui:  googlecompute: make_windows_transient_inventory: Host 104.199.90.181
2019/06/10 16:31:24 ui:  googlecompute: make_windows_transient_inventory: Compression yes
2019/06/10 16:31:24 ui:  googlecompute: make_windows_transient_inventory: ForwardAgent yes
2019/06/10 16:31:24 ui:  googlecompute: make_windows_transient_inventory: IdentitiesOnly yes
2019/06/10 16:31:24 ui:  googlecompute: make_windows_transient_inventory: Protocol 2
2019/06/10 16:31:24 ui:  googlecompute: make_windows_transient_inventory: ServerAliveCountMax 30
2019/06/10 16:31:24 ui:  googlecompute: make_windows_transient_inventory: ServerAliveInterval 60
2019/06/10 16:31:24 ui:  googlecompute: make_windows_transient_inventory: StrictHostKeyChecking no
2019/06/10 16:31:24 ui:  googlecompute: make_windows_transient_inventory: UserKnownHostsFile /dev/null
2019/06/10 16:31:24 ui:  googlecompute: make_windows_transient_inventory: VisualHostKey yes
2019/06/10 16:31:24 ui:  googlecompute: make_windows_transient_inventory: Written ansible/inventory/transient/v3-1560180484-545258d8697b5924---m-u-z.yml successfully.
2019/06/10 16:31:24 ui:  googlecompute: make_windows_transient_inventory: Contents: ---
2019/06/10 16:31:24 ui:  googlecompute: make_windows_transient_inventory: all:
2019/06/10 16:31:24 ui:  googlecompute: make_windows_transient_inventory: hosts:
2019/06/10 16:31:24 ui:  googlecompute: make_windows_transient_inventory: 104.199.90.181
2019/06/10 16:31:24 ui:  googlecompute: make_windows_transient_inventory: vars:
2019/06/10 16:31:24 ui:  googlecompute: make_windows_transient_inventory: ansible_connection: ssh
2019/06/10 16:31:24 ui:  googlecompute: make_windows_transient_inventory: ansible_shell_type: powershell
2019/06/10 16:31:24 ui:  googlecompute: make_windows_transient_inventory: ansible_ssh_private_key_file: "./private_key"
2019/06/10 16:31:24 ui:  googlecompute: make_windows_transient_inventory: ansible_user: packer_user
2019/06/10 16:31:24 ui:  googlecompute: make_windows_transient_inventory: ansible_host_key_checking: false
2019/06/10 16:31:24 ui:  googlecompute: make_windows_transient_inventory: ansible_pipelining: false # conflicts with 'become', see ansible docs
2019/06/10 16:31:24 ui:  googlecompute: make_windows_transient_inventory: ansible_ssh_extra_args: -F "/var/folders/w2/jd7cgbj92n9b3xbzkp5rft740000gn/T/tmp.teJkTxMk"
2019/06/10 16:31:24 ui:  googlecompute: ~/src/ip/platform
2019/06/10 16:31:24 [INFO] (telemetry) ending shell-local
2019/06/10 16:31:24 [INFO] (telemetry) Starting provisioner shell-local
2019/06/10 16:31:24 packer: 2019/06/10 16:31:24 [INFO] (shell-local): Prepending inline script with #!/bin/sh -e
2019/06/10 16:31:24 ui: ==> googlecompute: Running local shell script: /var/folders/w2/jd7cgbj92n9b3xbzkp5rft740000gn/T/packer-shell011429354
2019/06/10 16:31:24 packer: 2019/06/10 16:31:24 [INFO] (shell-local): starting local command: /bin/sh -c PACKER_BUILDER_TYPE='googlecompute' PACKER_BUILD_NAME='googlecompute' /var/folders/w2/jd7cgbj92n9b3xbzkp5rft740000gn/T/packer-shell011429354
2019/06/10 16:31:24 packer: 2019/06/10 16:31:24 [INFO] (shell-local communicator): Executing local shell command [/bin/sh -c PACKER_BUILDER_TYPE='googlecompute' PACKER_BUILD_NAME='googlecompute' /var/folders/w2/jd7cgbj92n9b3xbzkp5rft740000gn/T/packer-shell011429354]
2019/06/10 16:31:24 ui:  googlecompute: remote: Installing python requirements for GCE dynamic inventory...
2019/06/10 16:31:25 ui:  googlecompute: Requirement already satisfied: wheel in /usr/local/lib/python3.7/site-packages (0.33.1)
2019/06/10 16:31:25 ui:  googlecompute: ~/src/ip/platform/packer/improbable.io/buildkite/ansible/buildkite-agent ~/src/ip/platform
2019/06/10 16:31:25 ui:  googlecompute: remote: Checking connectivity...
2019/06/10 16:31:28 ui:  googlecompute: 104.199.90.181 | UNREACHABLE! => {
2019/06/10 16:31:28 ui:  googlecompute:  "changed": false, 
2019/06/10 16:31:28 ui:  googlecompute:  "msg": "Data could not be sent to remote host \"104.199.90.181\". Make sure this host can be reached over ssh: Warning: Permanently added '104.199.90.181' (ECDSA) to the list of known hosts.\r\nno such identity: ./private_key: No such file or directory\r\npacker_user@104.199.90.181: Permission denied (publickey,password,keyboard-interactive).\r\n", 
2019/06/10 16:31:28 ui:  googlecompute:  "unreachable": true
2019/06/10 16:31:28 ui:  googlecompute: }
2019/06/10 16:31:28 ui error: ==> googlecompute: panic: uncaught error
2019/06/10 16:31:28 ui error: ==> googlecompute: Traceback (most recent call first):
2019/06/10 16:31:28 ui error: ==> googlecompute: at ansible/remote.sh:19 in check_connectivity()
2019/06/10 16:31:28 ui error: ==> googlecompute: at ansible/remote.sh:95 in main()
2019/06/10 16:31:28 ui error: ==> googlecompute: ansible --module-name win_ping --inventory "../inventory/transient/${bake_version}.yml" "all" exited 4
2019/06/10 16:31:28 [INFO] (telemetry) ending shell-local
2019/06/10 16:31:28 ui error: ==> googlecompute: Erroneous exit code 4 while executing script: /var/folders/w2/jd7cgbj92n9b3xbzkp5rft740000gn/T/packer-shell011429354
==> googlecompute:
==> googlecompute: Please see output above for more information.
2019/06/10 16:31:28 ui error: ==> googlecompute: Step "StepProvision" failed, aborting...
2019/06/10 16:31:28 [INFO] (telemetry) ending googlecompute
2019/06/10 16:31:28 ui error: Build 'googlecompute' errored: unexpected EOF
2019/06/10 16:31:28 machine readable: error-count []string{"1"}
2019/06/10 16:31:28 ui error:
==> Some builds didn't complete successfully and had errors:
2019/06/10 16:31:28 machine readable: googlecompute,error []string{"unexpected EOF"}
2019/06/10 16:31:28 ui error: --> googlecompute: unexpected EOF
2019/06/10 16:31:28 ui:
==> Builds finished but no artifacts were created.
2019/06/10 16:31:28 /usr/local/bin/packer: plugin process exited
2019/06/10 16:31:28 [INFO] (telemetry) Finalizing.
2019/06/10 16:31:28 waiting for all plugin processes to complete...
2019/06/10 16:31:28 /usr/local/bin/packer: plugin process exited
2019/06/10 16:31:28 /usr/local/bin/packer: plugin process exited
2019/06/10 16:31:28 /usr/local/bin/packer: plugin process exited
2019/06/10 16:31:28 /usr/local/bin/packer: plugin process exited
2019/06/10 16:31:28 /usr/local/bin/packer: plugin process exited
2019/06/10 16:31:28 /usr/local/bin/packer: plugin process exited
2019/06/10 16:31:28 /usr/local/bin/packer: plugin process exited
2019/06/10 16:31:28 /usr/local/bin/packer: plugin process exited
"metadata": {
"imp-bootstrap-base64": "{{user `imp_bootstrap_base64`}}",
"imp-public-key-base64": "{{user `imp_public_key_base64`}}",
"imp-sshd-config-base64": "{{user `imp_sshd_config_base64`}}",
"windows-startup-script-ps1": "Get-GceMetaData -Path instance/attributes/imp-bootstrap-base64 > c:/windows/temp/bootstrap.b64 ; certutil -decode c:/windows/temp/bootstrap.b64 c:/windows/temp/bootstrap.ps1 ; c:/windows/temp/bootstrap.ps1 -username packer_user"
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment