Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Urgent : SSH Timeout with VirtualBox and ubuntu iso #13196

Closed
rohank63 opened this issue Oct 30, 2024 · 8 comments · Fixed by #13214
Closed

Urgent : SSH Timeout with VirtualBox and ubuntu iso #13196

rohank63 opened this issue Oct 30, 2024 · 8 comments · Fixed by #13214

Comments

@rohank63
Copy link

rohank63 commented Oct 30, 2024

Hi Team, I am having ssh timeout issues for the last 2 days. I read out different articles (stackoverflow / packer doc) and tried different ways but the issue still persists. I would be thankful if anyone can solve it.

I am getting this repeatedly, this goes on for more than couple of hours. And after the timeout specified in my config I get timeout.

 Attempting SSH connection to 127.0.0.1:4222...
 [DEBUG] reconnecting to TCP connection for SSH
 [DEBUG] handshaking with SSH
 [DEBUG] SSH handshake err: SSH handshake err: ssh: handshake failed: read tcp 127.0.0.1:49743->127.0.0.1:4222: read: connection reset by peer

I am using VitualBox 7.1.4 , and Packer v1.11.2 on Mac M3 .

"variables":{
    "vm_name": "ubuntu2204-x86_64"
 },
 "builders": [
   {
     "vm_name": "{{user `vm_name`}}",
     "type": "virtualbox-iso",
     "guest_os_type": "Ubuntu22_LTS_64",
     "iso_urls": [
       "iso/ubuntu-22.04.1-live-server-amd64.iso",
       "https://old-releases.ubuntu.com/releases/22.04.1/ubuntu-22.04.1-live-server-amd64.iso"
     ],
     "iso_checksum": "sha256:10f19c5b2b8d6db711582e0e27f5116296c34fe4b313ba45f9b201a5007056cb",
     "iso_interface": "sata",
     "boot_wait": "8s",
     "boot_keygroup_interval": "1000ms",
     "boot_command": [
       "c<wait>",
       "set gfxpayload=keep<enter><wait>",
       "linux /casper/vmlinuz --- ",
       "quiet net.ifnames=0 biosdevname=0 ",
       "autoinstall ds=nocloud;seedfrom=/cidata/<enter><wait>",
       "initrd /casper/initrd<enter><wait>",
       "boot<enter>"
     ],
     "guest_additions_mode": "disable",
     "memory": "2048",
     "cpus": 2,
     "disk_size": 32768,
     "cd_files": [
       "templates/http/user-data",
       "templates/http/meta-data"
     ],
     "cd_label": "cidata",
     "output_directory": "{{user `vm_name`}}",
     "shutdown_timeout": "5m",
     "post_shutdown_delay": "1m",
     "communicator": "ssh",
     "ssh_username": "someValue",
     "ssh_password": "someValue",
     "ssh_port": 22,
     "ssh_pty": true,
     "ssh_handshake_attempts": "50000",
     "ssh_timeout": "1h"
   }
 ],

In Virtual Box I can see network as NAT with port forwarding enabled.

image

@KinoFool
Copy link

Hello,

Since the latest version of macos (15.1), our VM deployment on Proxmox has stopped working, and we have SSH related errors.

We have tested the deployment on Linux systems where it works as intended, but we're encountering SSH errors on multiple Mac M3 running the latest macOS version.

We need to investigate what's happening, but I suspect the latest macOS update is breaking or interfering with Packer...

@Xavier2p
Copy link

Hello,

I have the same problem on macOS 15.1 on M3.

From Linux, I don't have any issue.

@rohank63
Copy link
Author

rohank63 commented Nov 1, 2024

@KinoFool @Xavier2p
But I am using Sonoma 14.7

@Xavier2p
Copy link

Xavier2p commented Nov 1, 2024

Sonoma 14.7 is the last version too. I think it's a security bug or something like that @rohank63

@cedric-lovit
Copy link

Same here on Mac os 15.x

@edigaryev
Copy link
Contributor

Should be fixed by #13214.

@lbajolet-hashicorp
Copy link
Contributor

As mentioned in the related PR by @edigaryev (thanks again!), this will be fixed with the next Packer release, i.e. 1.12.0, scheduled for next January.

In the meantime, if you hit this bug, you can play with the nightly, available on Github: https://github.com/hashicorp/packer/releases/tag/nightly

Note: there'll be a bit of latency until it's available, so if you have an error with today's nightly, you can try again when it's re-built tomorrow.

Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants