hashicorp / hashicorp/packer

ssh connection timeout for packer build for qemu with most recent focal-server-cloudimg-amd64.img

Open
#12,853 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Go
Stars
15.8k
Forks
3.3k
PR merge metrics
PR metrics pending

Description

#### Community Note

* Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original issue to help the community and maintainers prioritize this request
* Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
* If you are interested in working on this issue or have submitted a pull request, please leave a comment

When filing a bug, please include the following headings if possible. Any
example text in this template can be deleted.

#### Overview of the Issue

`packer build` for qemu times out when trying to make ssh connection

#### Reproduction Steps

```
{
"builders": [
{
"type": "qemu",
"cpus": "{{user `builder_cpus`}}",
"disk_cache": "directsync",
"disk_discard": "ignore",
"disk_image": true,
"disk_interface": "virtio",
"disk_size": "120G",
"headless": true,
"http_directory": "http",
"iso_checksum": "file:https://cloud-images.ubuntu.com/focal/currentSHA256SUMS",
"iso_url": "https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img",
"memory": "{{user `builder_mem_mb`}}",
"output_directory": "images",
"qemuargs": [
[
"-smbios",
"type=1,serial=ds=nocloud-net;instance-id=packer;seedfrom=http://{{ .HTTPIP }}:{{ .HTTPPort }}/"
]
],
"skip_compaction": true,
"ssh_password": "xxxxxxxxxx",
"ssh_username": "packer",
"ssh_timeout": "5m",
"ssh_wait_timeout": "10m",
"vm_name": "{{user `image_name`}}"
}
}
```

Note that replacing

```
"iso_checksum": "file:https://cloud-images.ubuntu.com/focal/current/SHA256SUMS",
"iso_url": "https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img",
```

with

```
"iso_checksum": "file:https://cloud-images.ubuntu.com/focal/20240220/SHA256SUMS",
"iso_url": "https://cloud-images.ubuntu.com/focal/20240220/focal-server-cloudimg-amd64.img",
```

resolves the issue so it seems to have been introduced in the most recent cloud image build
### Packer version

packer(1.10.1-1)

and

Packer v1.8.5 (local environment)

### Operating system and Environment details

`x64 0001-com-ubuntu-server-focal Canonical 20_04-lts-gen2 Canonical:0001-com-ubuntu-server-focal:20_04-lts-gen2:20.04.202402050 20.04.202402050`

and

Ubuntu 20.04.6 LTS

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.