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

File server timeout for Rocky kickstart #12890

Open
mkm29 opened this issue Mar 17, 2024 · 2 comments
Open

File server timeout for Rocky kickstart #12890

mkm29 opened this issue Mar 17, 2024 · 2 comments
Labels

Comments

@mkm29
Copy link

mkm29 commented Mar 17, 2024

Overview of the Issue

I am attempting to use Packer to build some Rocky Linux 8.9 ISOs for Vagrant, however I get a timeout when trying to access the file from the built in file server

Reproduction Steps

You can find my code (quite simple) here

Packer version

From packer version: 1.10.2

Simplified Packer Template

You can find the HCL config here

Operating system and Environment details

Linux pop-os 6.6.10-76060610-generic x86_64

Log Fragments and crash.log files

After the machine is initially bootstrapped I get the following error (on the VM)

curl (7) Failed to connect to 10.0.2.2 port 8222: Connection times out
[ <ts>] dracut-initqueue[920]: Warning: anaconda: failed to fetch kickstart from http://10.0.2.2:8222/ks.cfg
...

During which time Packer prints these errors (over and over):

2024/03/17 16:46:18 packer-plugin-virtualbox_v1.0.5_x5.0_linux_amd64 plugin: 2024/03/17 16:46:18 [INFO] Attempting SSH connection to 127.0.0.1:2874...
2024/03/17 16:46:18 packer-plugin-virtualbox_v1.0.5_x5.0_linux_amd64 plugin: 2024/03/17 16:46:18 [DEBUG] reconnecting to TCP connection for SSH
2024/03/17 16:46:18 packer-plugin-virtualbox_v1.0.5_x5.0_linux_amd64 plugin: 2024/03/17 16:46:18 [DEBUG] handshaking with SSH
2024/03/17 16:46:18 packer-plugin-virtualbox_v1.0.5_x5.0_linux_amd64 plugin: 2024/03/17 16:46:18 [DEBUG] SSH handshake err: ssh: handshake failed: read tcp 127.0.0.1:47068->127.0.0.1:2874: read: connection reset by peer
@mkm29 mkm29 added the bug label Mar 17, 2024
@mkm29
Copy link
Author

mkm29 commented Mar 23, 2024

I fixed it, needed to add this configuration to my source

  vboxmanage           = [
    ["modifyvm", "{{ .Name }}", "--memory", "${var.memsize}"],
    ["modifyvm", "{{ .Name }}", "--cpus", "${var.numvcpus}"],
    ["modifyvm", "{{ .Name }}", "--nat-localhostreachable1", "on"]
  ]

@tenthirtyam
Copy link

You can self-close the issue when you're ready.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants