hashicorp / hashicorp/packer-plugin-vagrant

Plugin fails on windows builds since implied shell (`bash -l`) is unavailable

Open
#110 6 comments 0 reactions 0 assignees View on GitHub
bug builder/vagrant
Dominant language
Go
Stars
16
Forks
28
PR merge metrics
No merged PRs in 30d

Description

#### Overview of the Issue

Packer build succeeds but no output file is created

Also reported here - https://discuss.hashicorp.com/t/vagrant-builder-does-not-create-packag-box/60690

#### Reproduction Steps

just running packer build using vagrant builder

### Plugin and Packer version
Plugin version - packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe

From `packer version` - Packer v1.10.0

### Operating system and Environment details

OS - Windows 10
Architecture - x64

Packer log

Packer Log using PACKER_LOG=1

> 2024/02/03 07:04:15 [INFO] Packer version: 1.10.0 [go1.20.11 windows amd64]
2024/02/03 07:04:15 [TRACE] discovering plugins in C:\Users\\AppData\Roaming\packer.d\plugins
2024/02/03 07:04:15 [INFO] Discovered potential plugin: hyperv = C:\Users\\AppData\Roaming\packer.d\plugins\github.com\hashicorp\hyperv\packer-plugin-hyperv_v1.1.1_x5.0_windows_amd64.exe
2024/02/03 07:04:15 [INFO] Discovered potential plugin: vagrant = C:\Users\\AppData\Roaming\packer.d\plugins\github.com\hashicorp\vagrant\packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe
2024/02/03 07:04:15 [INFO] found external [iso vmcx] builders from hyperv plugin
2024/02/03 07:04:15 [INFO] found external [-packer-default-plugin-name-] builders from vagrant plugin
2024/02/03 07:04:15 [INFO] found external [-packer-default-plugin-name- cloud] post-processors from vagrant plugin
2024/02/03 07:04:15 [INFO] PACKER_CONFIG env var not set; checking the default config file path
2024/02/03 07:04:15 [INFO] PACKER_CONFIG env var set; attempting to open config file: C:\Users\\AppData\Roaming\packer.config
2024/02/03 07:04:15 [WARN] Config file doesn't exist: C:\Users\\AppData\Roaming\packer.config
2024/02/03 07:04:15 [INFO] Setting cache directory: D:\imgFactory\packer_cache
e: cannot determine if process is in background: Process background check error: not implemented yet
2024/02/03 07:04:15 [INFO] Starting external plugin C:\Users\\AppData\Roaming\packer.d\plugins\github.com\hashicorp\vagrant\packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe start builder -packer-default-plugin-name-
2024/02/03 07:04:15 Starting plugin: C:\Users\\AppData\Roaming\packer.d\plugins\github.com\hashicorp\vagrant\packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe []string{"C:\\Users\\\\AppData\\Roaming\\packer.d\\plugins\\github.com\\hashicorp\\vagrant\\packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe", "start", "builder", "-packer-default-plugin-name-"}
2024/02/03 07:04:15 Waiting for RPC address for: C:\Users\\AppData\Roaming\packer.d\plugins\github.com\hashicorp\vagrant\packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe
2024/02/03 07:04:15 [ERR] Checkpoint error: Get "https://checkpoint-api.hashicorp.com/v1/check/packer?arch=amd64&os=windows&signature=1ce833eb-aff5-3e31-1314-967d9ac5eb8d&version=1.10.0": dial tcp: lookup checkpoint-api.hashicorp.com: no such host
2024/02/03 07:04:16 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:04:16 Plugin port range: [10000,25000]
2024/02/03 07:04:16 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:04:16 Plugin address: tcp 127.0.0.1:10000
2024/02/03 07:04:16 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:04:16 Waiting for connection...
2024/02/03 07:04:16 Received tcp RPC address for C:\Users\\AppData\Roaming\packer.d\plugins\github.com\hashicorp\vagrant\packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe: addr is 127.0.0.1:10000
2024/02/03 07:04:16 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:04:16 Serving a plugin connection...
2024/02/03 07:04:16 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:04:16 [TRACE] starting builder -packer-default-plugin-name-
2024/02/03 07:04:16 [INFO] Starting internal plugin packer-provisioner-file
2024/02/03 07:04:16 Starting plugin: C:\ProgramData\chocolatey\lib\packer\tools\packer.exe []string{"C:\\ProgramData\\chocolatey\\lib\\packer\\tools\\packer.exe", "plugin", "packer-provisioner-file"}
2024/02/03 07:04:16 Waiting for RPC address for: C:\ProgramData\chocolatey\lib\packer\tools\packer.exe
2024/02/03 07:04:16 packer.exe plugin: [INFO] Packer version: 1.10.0 [go1.20.11 windows amd64]
2024/02/03 07:04:16 packer.exe plugin: [INFO] PACKER_CONFIG env var not set; checking the default config file path
2024/02/03 07:04:16 packer.exe plugin: [INFO] PACKER_CONFIG env var set; attempting to open config file: C:\Users\\AppData\Roaming\packer.config
2024/02/03 07:04:16 packer.exe plugin: [WARN] Config file doesn't exist: C:\Users\\AppData\Roaming\packer.config
2024/02/03 07:04:16 packer.exe plugin: [INFO] Setting cache directory: D:\imgFactory\packer_cache
2024/02/03 07:04:16 packer.exe plugin: args: []string{"packer-provisioner-file"}
2024/02/03 07:04:16 packer.exe plugin: Plugin port range: [10000,25000]
2024/02/03 07:04:16 packer.exe plugin: Plugin address: tcp 127.0.0.1:10000
2024/02/03 07:04:16 packer.exe plugin: Waiting for connection...
2024/02/03 07:04:16 Received tcp RPC address for C:\ProgramData\chocolatey\lib\packer\tools\packer.exe: addr is 127.0.0.1:10000
2024/02/03 07:04:16 packer.exe plugin: [ERR] Checkpoint error: Get "https://checkpoint-api.hashicorp.com/v1/check/packer?arch=amd64&os=windows&signature=1ce833eb-aff5-3e31-1314-967d9ac5eb8d&version=1.10.0": dial tcp: lookup checkpoint-api.hashicorp.com: no such host
2024/02/03 07:04:16 packer.exe plugin: Serving a plugin connection...
2024/02/03 07:04:16 [INFO] Starting internal plugin packer-provisioner-windows-shell
2024/02/03 07:04:16 Starting plugin: C:\ProgramData\chocolatey\lib\packer\tools\packer.exe []string{"C:\\ProgramData\\chocolatey\\lib\\packer\\tools\\packer.exe", "plugin", "packer-provisioner-windows-shell"}
2024/02/03 07:04:16 Waiting for RPC address for: C:\ProgramData\chocolatey\lib\packer\tools\packer.exe
2024/02/03 07:04:16 packer.exe plugin: [INFO] Packer version: 1.10.0 [go1.20.11 windows amd64]
2024/02/03 07:04:16 packer.exe plugin: [INFO] PACKER_CONFIG env var not set; checking the default config file path
2024/02/03 07:04:16 packer.exe plugin: [INFO] PACKER_CONFIG env var set; attempting to open config file: C:\Users\\AppData\Roaming\packer.config
2024/02/03 07:04:16 packer.exe plugin: [WARN] Config file doesn't exist: C:\Users\\AppData\Roaming\packer.config
2024/02/03 07:04:16 packer.exe plugin: [INFO] Setting cache directory: D:\imgFactory\packer_cache
2024/02/03 07:04:16 packer.exe plugin: args: []string{"packer-provisioner-windows-shell"}
2024/02/03 07:04:16 packer.exe plugin: Plugin port range: [10000,25000]
2024/02/03 07:04:16 packer.exe plugin: Plugin address: tcp 127.0.0.1:10000
2024/02/03 07:04:16 Received tcp RPC address for C:\ProgramData\chocolatey\lib\packer\tools\packer.exe: addr is 127.0.0.1:10000
2024/02/03 07:04:16 packer.exe plugin: Waiting for connection...
2024/02/03 07:04:16 packer.exe plugin: [ERR] Checkpoint error: Get "https://checkpoint-api.hashicorp.com/v1/check/packer?arch=amd64&os=windows&signature=1ce833eb-aff5-3e31-1314-967d9ac5eb8d&version=1.10.0": dial tcp: lookup checkpoint-api.hashicorp.com: no such host
2024/02/03 07:04:16 packer.exe plugin: Serving a plugin connection...
2024/02/03 07:04:16 [INFO] Starting internal plugin packer-provisioner-windows-restart
2024/02/03 07:04:16 Starting plugin: C:\ProgramData\chocolatey\lib\packer\tools\packer.exe []string{"C:\\ProgramData\\chocolatey\\lib\\packer\\tools\\packer.exe", "plugin", "packer-provisioner-windows-restart"}
2024/02/03 07:04:16 Waiting for RPC address for: C:\ProgramData\chocolatey\lib\packer\tools\packer.exe
2024/02/03 07:04:16 packer.exe plugin: [INFO] Packer version: 1.10.0 [go1.20.11 windows amd64]
2024/02/03 07:04:16 packer.exe plugin: [INFO] PACKER_CONFIG env var not set; checking the default config file path
2024/02/03 07:04:16 packer.exe plugin: [INFO] PACKER_CONFIG env var set; attempting to open config file: C:\Users\\AppData\Roaming\packer.config
2024/02/03 07:04:16 packer.exe plugin: [WARN] Config file doesn't exist: C:\Users\\AppData\Roaming\packer.config
2024/02/03 07:04:16 packer.exe plugin: [INFO] Setting cache directory: D:\imgFactory\packer_cache
2024/02/03 07:04:16 packer.exe plugin: args: []string{"packer-provisioner-windows-restart"}
2024/02/03 07:04:16 packer.exe plugin: Plugin port range: [10000,25000]
2024/02/03 07:04:16 packer.exe plugin: Plugin address: tcp 127.0.0.1:10000
2024/02/03 07:04:16 packer.exe plugin: Waiting for connection...
2024/02/03 07:04:16 Received tcp RPC address for C:\ProgramData\chocolatey\lib\packer\tools\packer.exe: addr is 127.0.0.1:10000
2024/02/03 07:04:16 packer.exe plugin: [ERR] Checkpoint error: Get "https://checkpoint-api.hashicorp.com/v1/check/packer?arch=amd64&os=windows&signature=1ce833eb-aff5-3e31-1314-967d9ac5eb8d&version=1.10.0": dial tcp: lookup checkpoint-api.hashicorp.com: no such host
2024/02/03 07:04:16 packer.exe plugin: Serving a plugin connection...
2024/02/03 07:04:16 ui: vagrant.vs2022: output will be in this color.
2024/02/03 07:04:16 ui:
2024/02/03 07:04:16 Build debug mode: false
2024/02/03 07:04:16 Force build: true
2024/02/03 07:04:16 On error:
2024/02/03 07:04:16 Waiting on builds to complete...
2024/02/03 07:04:16 Starting build run: vagrant.vs2022
2024/02/03 07:04:16 Running builder:
2024/02/03 07:04:16 [INFO] (telemetry) Starting builder vagrant.vs2022
2024/02/03 07:04:16 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:04:16 Calling Vagrant CLI: []string{"--version"}
2024/02/03 07:04:16 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:04:16 [vagrant driver] stdout: Vagrant 2.4.1
2024/02/03 07:04:16 ui: ==> vagrant.vs2022: Deleting previous output directory...
2024/02/03 07:04:16 ui: ==> vagrant.vs2022: Creating a Vagrantfile in the build directory...
2024/02/03 07:04:16 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:04:16 Created vagrantfile at D:\imgFactory\output-vs2022\Vagrantfile
2024/02/03 07:04:16 ui: ==> vagrant.vs2022: Adding box using vagrant box add ...
2024/02/03 07:04:16 ui: vagrant.vs2022: (this can take some time if we need to download the box)
2024/02/03 07:04:16 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:04:16 [vagrant] Calling box add with following args win10-base --force --provider hyperv
2024/02/03 07:04:16 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:04:16 Calling Vagrant CLI: []string{"box", "add", "win10-base", "--force", "--provider", "hyperv"}
2024/02/03 07:04:18 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:04:18 [vagrant driver] stdout: ==> box: Box file was not detected as metadata. Adding it directly...
2024/02/03 07:04:18 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:04:18 [vagrant driver] stderr: A name is required when adding a box file directly. Please pass
2024/02/03 07:04:18 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:04:18 [vagrant driver] stderr: the `--name` parameter to `vagrant box add`. See
2024/02/03 07:04:18 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:04:18 [vagrant driver] stderr: `vagrant box add -h` for more help.
2024/02/03 07:04:19 ui: ==> vagrant.vs2022: Calling Vagrant Up (this can take some time)...
2024/02/03 07:04:19 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:04:19 Calling Vagrant CLI: []string{"up", "source", "--provider=hyperv"}
2024/02/03 07:04:22 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:04:22 [vagrant driver] stdout: Bringing machine 'source' up with 'hyperv' provider...
2024/02/03 07:04:22 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:04:22 [vagrant driver] stdout: ==> source: Verifying Hyper-V is enabled...
2024/02/03 07:04:22 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:04:22 [vagrant driver] stdout: ==> source: Verifying Hyper-V is accessible...
2024/02/03 07:04:23 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:04:23 [vagrant driver] stdout: ==> source: Importing a Hyper-V instance
2024/02/03 07:04:23 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:04:23 [vagrant driver] stdout: source: Creating and registering the VM...
2024/02/03 07:04:34 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:04:34 [vagrant driver] stdout: source: Successfully imported VM
2024/02/03 07:04:36 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:04:36 [vagrant driver] stdout: source: Configuring the VM...
2024/02/03 07:04:37 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:04:37 [vagrant driver] stdout: source: Setting VM Enhanced session transport type to disabled/default (VMBus)
2024/02/03 07:04:38 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:04:38 [vagrant driver] stdout: ==> source: Starting the machine...
2024/02/03 07:04:43 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:04:43 [vagrant driver] stdout: ==> source: Waiting for the machine to report its IP address...
2024/02/03 07:04:43 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:04:43 [vagrant driver] stdout: source: Timeout: 120 seconds
2024/02/03 07:04:44 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:04:44 [vagrant driver] stdout: source: IP: 192.168.0.10
2024/02/03 07:04:44 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:04:44 [vagrant driver] stdout: ==> source: Waiting for machine to boot. This may take a few minutes...
2024/02/03 07:04:46 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:04:46 [vagrant driver] stdout: source: SSH address: 192.168.0.10:22
2024/02/03 07:04:46 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:04:46 [vagrant driver] stdout: source: SSH username: IIF9FE
2024/02/03 07:04:46 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:04:46 [vagrant driver] stdout: source: SSH auth method: private key
2024/02/03 07:04:52 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:04:52 [vagrant driver] stderr: The configured shell (config.ssh.shell) is invalid and unable
2024/02/03 07:04:52 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:04:52 [vagrant driver] stderr: to properly execute commands. The most common cause for this is
2024/02/03 07:04:52 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:04:52 [vagrant driver] stderr: using a shell that is unavailable on the system. Please verify
2024/02/03 07:04:52 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:04:52 [vagrant driver] stderr: you're using the full path to the shell and that the shell is
2024/02/03 07:04:52 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:04:52 [vagrant driver] stderr: executable by the SSH user.
2024/02/03 07:04:52 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:04:52 Calling Vagrant CLI: []string{"ssh-config", "source"}
2024/02/03 07:04:59 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:04:59 [vagrant driver] stdout: Host source
2024/02/03 07:04:59 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:04:59 [vagrant driver] stdout: HostName 192.168.0.10
2024/02/03 07:04:59 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:04:59 [vagrant driver] stdout: User IIF9FE
2024/02/03 07:04:59 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:04:59 [vagrant driver] stdout: Port 22
2024/02/03 07:04:59 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:04:59 [vagrant driver] stdout: UserKnownHostsFile /dev/null
2024/02/03 07:04:59 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:04:59 [vagrant driver] stdout: StrictHostKeyChecking no
2024/02/03 07:04:59 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:04:59 [vagrant driver] stdout: PasswordAuthentication no
2024/02/03 07:04:59 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:04:59 [vagrant driver] stdout: IdentityFile C:/Users//.ssh/id_ed25519
2024/02/03 07:04:59 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:04:59 [vagrant driver] stdout: IdentitiesOnly yes
2024/02/03 07:04:59 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:04:59 [vagrant driver] stdout: LogLevel FATAL
2024/02/03 07:04:59 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:04:59 [vagrant driver] stdout: PubkeyAcceptedKeyTypes +ssh-rsa
2024/02/03 07:04:59 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:04:59 [vagrant driver] stdout: HostKeyAlgorithms +ssh-rsa
2024/02/03 07:04:59 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:04:59 [vagrant driver] stdout:
2024/02/03 07:05:00 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:05:00 Overriding SSH config from Vagrant with the username, password, and private key information provided to the Packer template.
2024/02/03 07:05:00 ui: ==> vagrant.vs2022: Using SSH communicator to connect: 192.168.0.10
2024/02/03 07:05:00 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:05:00 [INFO] Waiting for SSH, up to timeout: 6h0m0s
2024/02/03 07:05:00 ui: ==> vagrant.vs2022: Waiting for SSH to become available...
2024/02/03 07:05:00 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:05:00 [INFO] Attempting SSH connection to 192.168.0.10:22...
2024/02/03 07:05:00 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:05:00 [DEBUG] reconnecting to TCP connection for SSH
2024/02/03 07:05:00 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:05:00 [DEBUG] handshaking with SSH
2024/02/03 07:05:00 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:05:00 [DEBUG] handshake complete!
2024/02/03 07:05:00 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:05:00 [INFO] no local agent socket, will not connect agent
2024/02/03 07:05:00 ui: ==> vagrant.vs2022: Connected to SSH!
2024/02/03 07:05:00 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:05:00 Running the provision hook
2024/02/03 07:05:00 [INFO] (telemetry) Starting provisioner file
2024/02/03 07:05:00 ui: ==> vagrant.vs2022: Uploading C:\Users\\Downloads\dotnet-sdk-8.0.101-win-x64.exe => C:\Users\IIF9FE\dotnet-sdk-8.0.101-win-x64.exe
2024/02/03 07:05:00 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:05:00 [DEBUG] Opening new ssh session
2024/02/03 07:05:00 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:05:00 [DEBUG] Starting remote scp process: scp -vt C:/Users/IIF9FE
2024/02/03 07:05:00 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:05:00 [DEBUG] Started SCP session, beginning transfers...
2024/02/03 07:05:00 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:05:00 [DEBUG] scp: Uploading dotnet-sdk-8.0.101-win-x64.exe: perms=C0666 size=221616848
2024/02/03 07:05:03 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:05:03 [DEBUG] SCP session complete, closing stdin pipe.
2024/02/03 07:05:03 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:05:03 [DEBUG] Waiting for SSH session to complete.
2024/02/03 07:05:03 packer.exe plugin: [INFO] 221616848 bytes written for 'uploadData'
2024/02/03 07:05:03 [INFO] 221616848 bytes written for 'uploadData'
2024/02/03 07:05:03 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:05:03 [DEBUG] scp stderr (length 97): Sink: C0666 221616848 dotnet-sdk-8.0.101-win-x64.exe
2024/02/03 07:05:03 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: scp.exe: debug1: fd 0 clearing O_NONBLOCK
2024/02/03 07:05:03 packer.exe plugin: closing
2024/02/03 07:05:03 closing
2024/02/03 07:05:03 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:05:03 closing
2024/02/03 07:05:03 [INFO] (telemetry) ending file
2024/02/03 07:05:03 [INFO] (telemetry) Starting provisioner windows-shell
2024/02/03 07:05:03 ui: ==> vagrant.vs2022: Provisioning with windows-shell...
2024/02/03 07:05:03 packer.exe plugin: Found command: C:\Users\IIF9FE\dotnet-sdk-8.0.101-win-x64.exe /install /quiet /norestart
2024/02/03 07:05:03 ui: ==> vagrant.vs2022: Provisioning with shell script: C:\Users\\AppData\Local\Temp\windows-shell-provisioner1997105920
2024/02/03 07:05:03 packer.exe plugin: Opening C:\Users\\AppData\Local\Temp\windows-shell-provisioner1997105920 for reading
2024/02/03 07:05:03 packer.exe plugin: [INFO] 74 bytes written for 'uploadData'
2024/02/03 07:05:03 [INFO] 74 bytes written for 'uploadData'
2024/02/03 07:05:03 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:05:03 [DEBUG] Opening new ssh session
2024/02/03 07:05:03 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:05:03 [DEBUG] Starting remote scp process: scp -vt c:/Windows/Temp
2024/02/03 07:05:03 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:05:03 [DEBUG] Started SCP session, beginning transfers...
2024/02/03 07:05:03 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:05:03 [DEBUG] Copying input data into temporary file so we can read the length
2024/02/03 07:05:03 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:05:03 [DEBUG] scp: Uploading script.bat: perms=C0644 size=74
2024/02/03 07:05:03 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:05:03 [DEBUG] SCP session complete, closing stdin pipe.
2024/02/03 07:05:03 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:05:03 [DEBUG] Waiting for SSH session to complete.
2024/02/03 07:05:03 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:05:03 [DEBUG] scp stderr (length 70): Sink: C0644 74 script.bat
2024/02/03 07:05:03 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: scp.exe: debug1: fd 0 clearing O_NONBLOCK
2024/02/03 07:05:03 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:05:03 [DEBUG] Opening new ssh session
2024/02/03 07:05:03 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:05:03 [DEBUG] starting remote command: set "PACKER_BUILDER_TYPE=vagrant" && set "PACKER_BUILD_NAME=vs2022" && "c:/Windows/Temp/script.bat"
2024/02/03 07:05:03 ui: vagrant.vs2022:
2024/02/03 07:05:03 ui: vagrant.vs2022: iif9fe@VM-IMG123 C:\Users\IIF9FE>C:\Users\IIF9FE\dotnet-sdk-8.0.101-win-x64.exe /install /quiet /norestart
2024/02/03 07:05:39 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:05:39 [INFO] RPC endpoint: Communicator ended with: 0
2024/02/03 07:05:39 [INFO] 0 bytes written for 'stderr'
2024/02/03 07:05:39 [INFO] 111 bytes written for 'stdout'
2024/02/03 07:05:39 [INFO] RPC client: Communicator ended with: 0
2024/02/03 07:05:39 [INFO] RPC endpoint: Communicator ended with: 0
2024/02/03 07:05:39 packer.exe plugin: [INFO] 111 bytes written for 'stdout'
2024/02/03 07:05:39 packer.exe plugin: [INFO] 0 bytes written for 'stderr'
2024/02/03 07:05:39 packer.exe plugin: [INFO] RPC client: Communicator ended with: 0
2024/02/03 07:05:39 [INFO] (telemetry) ending windows-shell
2024/02/03 07:05:39 [INFO] (telemetry) Starting provisioner windows-restart
2024/02/03 07:05:39 ui: ==> vagrant.vs2022: Restarting Machine
2024/02/03 07:05:39 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:05:39 [DEBUG] Opening new ssh session
2024/02/03 07:05:39 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:05:39 [DEBUG] starting remote command: shutdown /r /f /t 0 /c "packer restart"
2024/02/03 07:05:39 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:05:39 [INFO] RPC endpoint: Communicator ended with: 0
2024/02/03 07:05:39 [INFO] 0 bytes written for 'stdout'
2024/02/03 07:05:39 [INFO] 0 bytes written for 'stderr'
2024/02/03 07:05:39 [INFO] RPC client: Communicator ended with: 0
2024/02/03 07:05:39 [INFO] RPC endpoint: Communicator ended with: 0
2024/02/03 07:05:39 packer.exe plugin: [INFO] 0 bytes written for 'stderr'
2024/02/03 07:05:39 packer.exe plugin: [INFO] 0 bytes written for 'stdout'
2024/02/03 07:05:39 packer.exe plugin: [INFO] RPC client: Communicator ended with: 0
2024/02/03 07:05:39 ui: ==> vagrant.vs2022: Waiting for machine to restart...
2024/02/03 07:05:39 packer.exe plugin: Check if machine is rebooting...
2024/02/03 07:05:39 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:05:39 [DEBUG] Opening new ssh session
2024/02/03 07:05:39 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:05:39 [DEBUG] starting remote command: shutdown /r /f /t 60 /c "packer restart test"
2024/02/03 07:05:39 ui error: ==> vagrant.vs2022: A system shutdown is in progress.(1115)
2024/02/03 07:05:39 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:05:39 [ERROR] Remote command exited with '1115': shutdown /r /f /t 60 /c "packer restart test"
2024/02/03 07:05:39 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:05:39 [INFO] RPC endpoint: Communicator ended with: 1115
2024/02/03 07:05:39 [INFO] 0 bytes written for 'stdout'
2024/02/03 07:05:39 [INFO] 40 bytes written for 'stderr'
2024/02/03 07:05:39 [INFO] RPC client: Communicator ended with: 1115
2024/02/03 07:05:39 [INFO] RPC endpoint: Communicator ended with: 1115
2024/02/03 07:05:39 packer.exe plugin: [INFO] 0 bytes written for 'stdout'
2024/02/03 07:05:39 packer.exe plugin: [INFO] 40 bytes written for 'stderr'
2024/02/03 07:05:39 packer.exe plugin: [INFO] RPC client: Communicator ended with: 1115
2024/02/03 07:05:39 packer.exe plugin: Reboot already in progress, waiting...
2024/02/03 07:05:49 packer.exe plugin: Check if machine is rebooting...
2024/02/03 07:05:49 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:05:49 [DEBUG] Opening new ssh session
2024/02/03 07:05:49 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:05:49 [ERROR] ssh session open error: 'read tcp 192.168.0.1:25486->192.168.0.10:22: wsarecv: An existing connection was forcibly closed by the remote host.', attempting reconnect
2024/02/03 07:05:49 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:05:49 [DEBUG] reconnecting to TCP connection for SSH
2024/02/03 07:05:52 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:05:52 [DEBUG] handshaking with SSH
2024/02/03 07:05:52 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:05:52 [DEBUG] handshake complete!
2024/02/03 07:05:52 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:05:52 [INFO] no local agent socket, will not connect agent
2024/02/03 07:05:53 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:05:53 [DEBUG] starting remote command: shutdown /r /f /t 60 /c "packer restart test"
2024/02/03 07:05:53 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:05:53 [INFO] RPC endpoint: Communicator ended with: 0
2024/02/03 07:05:53 [INFO] 0 bytes written for 'stdout'
2024/02/03 07:05:53 [INFO] 0 bytes written for 'stderr'
2024/02/03 07:05:53 [INFO] RPC client: Communicator ended with: 0
2024/02/03 07:05:53 [INFO] RPC endpoint: Communicator ended with: 0
2024/02/03 07:05:53 packer.exe plugin: [INFO] 0 bytes written for 'stderr'
2024/02/03 07:05:53 packer.exe plugin: [INFO] 0 bytes written for 'stdout'
2024/02/03 07:05:53 packer.exe plugin: [INFO] RPC client: Communicator ended with: 0
2024/02/03 07:05:53 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:05:53 [DEBUG] Opening new ssh session
2024/02/03 07:05:53 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:05:53 [DEBUG] starting remote command: shutdown /a
2024/02/03 07:05:53 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:05:53 [INFO] RPC endpoint: Communicator ended with: 0
2024/02/03 07:05:53 [INFO] 0 bytes written for 'stdout'
2024/02/03 07:05:53 [INFO] 0 bytes written for 'stderr'
2024/02/03 07:05:53 [INFO] RPC client: Communicator ended with: 0
2024/02/03 07:05:53 [INFO] RPC endpoint: Communicator ended with: 0
2024/02/03 07:05:53 packer.exe plugin: [INFO] 0 bytes written for 'stdout'
2024/02/03 07:05:53 packer.exe plugin: [INFO] 0 bytes written for 'stderr'
2024/02/03 07:05:53 packer.exe plugin: [INFO] RPC client: Communicator ended with: 0
2024/02/03 07:05:53 packer.exe plugin: Waiting for machine to become available...
2024/02/03 07:05:53 packer.exe plugin: Checking that communicator is connected with: 'powershell.exe -EncodedCommand JABQAHIAbwBnAHIAZQBzAHMAUAByAGUAZgBlAHIAZQBuAGMAZQAgAD0AIAAnAFMAaQBsAGUAbgB0AGwAeQBDAG8AbgB0AGkAbgB1AGUAJwA7AGUAYwBoAG8AIAAoACIAewAwAH0AIAByAGUAcwB0AGEAcgB0AGUAZAAuACIAIAAtAGYAIABbAFMAeQBzAHQAZQBtAC4ATgBlAHQALgBEAG4AcwBdADoAOgBHAGUAdABIAG8AcwB0AE4AYQBtAGUAKAApACkA'
2024/02/03 07:05:53 packer.exe plugin: Waiting for machine to reboot with timeout: 5m0s
2024/02/03 07:05:58 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:05:58 [DEBUG] Opening new ssh session
2024/02/03 07:05:58 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:05:58 [DEBUG] starting remote command: powershell.exe -EncodedCommand JABQAHIAbwBnAHIAZQBzAHMAUAByAGUAZgBlAHIAZQBuAGMAZQAgAD0AIAAnAFMAaQBsAGUAbgB0AGwAeQBDAG8AbgB0AGkAbgB1AGUAJwA7AGUAYwBoAG8AIAAoACIAewAwAH0AIAByAGUAcwB0AGEAcgB0AGUAZAAuACIAIAAtAGYAIABbAFMAeQBzAHQAZQBtAC4ATgBlAHQALgBEAG4AcwBdADoAOgBHAGUAdABIAG8AcwB0AE4AYQBtAGUAKAApACkA
2024/02/03 07:06:02 ui: vagrant.vs2022: VM-Img123 restarted.
2024/02/03 07:06:02 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:06:02 [INFO] RPC endpoint: Communicator ended with: 0
2024/02/03 07:06:02 [INFO] 0 bytes written for 'stderr'
2024/02/03 07:06:02 [INFO] 22 bytes written for 'stdout'
2024/02/03 07:06:02 [INFO] RPC client: Communicator ended with: 0
2024/02/03 07:06:02 [INFO] RPC endpoint: Communicator ended with: 0
2024/02/03 07:06:02 packer.exe plugin: [INFO] 22 bytes written for 'stdout'
2024/02/03 07:06:02 packer.exe plugin: [INFO] 0 bytes written for 'stderr'
2024/02/03 07:06:02 packer.exe plugin: [INFO] RPC client: Communicator ended with: 0
2024/02/03 07:06:02 ui: ==> vagrant.vs2022: Machine successfully restarted, moving on
2024/02/03 07:06:02 [INFO] (telemetry) ending windows-restart
2024/02/03 07:06:02 ui: ==> vagrant.vs2022: Packaging box...
2024/02/03 07:06:02 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:06:02 Calling Vagrant CLI: []string{"package", "source", "--output", "package.box"}
2024/02/03 07:06:07 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:06:07 [vagrant driver] stdout: ==> source: Verifying Hyper-V is enabled...
2024/02/03 07:06:09 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:06:09 [vagrant driver] stdout: ==> source: Attempting graceful shutdown of VM...
2024/02/03 07:06:11 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:06:11 [vagrant driver] stderr: The configured shell (config.ssh.shell) is invalid and unable
2024/02/03 07:06:11 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:06:11 [vagrant driver] stderr: to properly execute commands. The most common cause for this is
2024/02/03 07:06:11 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:06:11 [vagrant driver] stderr: using a shell that is unavailable on the system. Please verify
2024/02/03 07:06:11 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:06:11 [vagrant driver] stderr: you're using the full path to the shell and that the shell is
2024/02/03 07:06:11 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:06:11 [vagrant driver] stderr: executable by the SSH user.
2024/02/03 07:06:11 ui: ==> vagrant.vs2022: destroying Vagrant box...
2024/02/03 07:06:11 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:06:11 Calling Vagrant CLI: []string{"destroy", "-f", "source"}
2024/02/03 07:06:17 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:06:17 [vagrant driver] stdout: ==> source: Stopping the machine...
2024/02/03 07:06:24 packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe plugin: 2024/02/03 07:06:24 [vagrant driver] stdout: ==> source: Deleting the machine...
2024/02/03 07:06:25 [INFO] (telemetry) ending vagrant.vs2022
2024/02/03 07:06:25 ui: Build 'vagrant.vs2022' finished after 2 minutes 9 seconds.
2024/02/03 07:06:25 ui:
==> Wait completed after 2 minutes 9 seconds
2024/02/03 07:06:25 ui:
==> Builds finished. The artifacts of successful builds are:
2024/02/03 07:06:25 machine readable: vagrant.vs2022,artifact-count []string{"1"}
2024/02/03 07:06:25 machine readable: vagrant.vs2022,artifact []string{"0", "builder-id", "vagrant"}
2024/02/03 07:06:25 machine readable: vagrant.vs2022,artifact []string{"0", "id", "hyperv"}
2024/02/03 07:06:25 machine readable: vagrant.vs2022,artifact []string{"0", "string", "Vagrant box 'package.box' for 'hyperv' provider"}
2024/02/03 07:06:25 machine readable: vagrant.vs2022,artifact []string{"0", "files-count", "1"}
2024/02/03 07:06:25 machine readable: vagrant.vs2022,artifact []string{"0", "file", "0", "output-vs2022\\package.box"}
2024/02/03 07:06:25 machine readable: vagrant.vs2022,artifact []string{"0", "end"}
2024/02/03 07:06:25 ui: --> vagrant.vs2022: Vagrant box 'package.box' for 'hyperv' provider
2024/02/03 07:06:25 [INFO] (telemetry) Finalizing.
2024/02/03 07:06:25 [WARN] (telemetry) Error finalizing report. This is safe to ignore. Post "https://checkpoint-api.hashicorp.com/v1/telemetry/packer": dial tcp: lookup checkpoint-api.hashicorp.com: no such host
2024/02/03 07:06:25 waiting for all plugin processes to complete...
2024/02/03 07:06:25 C:\ProgramData\chocolatey\lib\packer\tools\packer.exe: plugin process exited
2024/02/03 07:06:25 C:\ProgramData\chocolatey\lib\packer\tools\packer.exe: plugin process exited
2024/02/03 07:06:25 C:\Users\\AppData\Roaming\packer.d\plugins\github.com\hashicorp\vagrant\packer-plugin-vagrant_v1.1.2_x5.0_windows_amd64.exe: plugin process exited
2024/02/03 07:06:25 C:\ProgramData\chocolatey\lib\packer\tools\packer.exe: plugin process exited

Contributor guide

Open the contributing guide

Research direction

Start at the Vagrant builder's Windows command-execution path and reproduce the issue by running the reported Packer build on Windows 10. Confirm that the implied bash -l dependency no longer prevents the build from creating its output file.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.