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

Building ubuntu1404 hangs on 'network-preseed' #579

Open
ElonSatoshi opened this issue Oct 21, 2022 · 1 comment
Open

Building ubuntu1404 hangs on 'network-preseed' #579

ElonSatoshi opened this issue Oct 21, 2022 · 1 comment

Comments

@ElonSatoshi
Copy link

ElonSatoshi commented Oct 21, 2022

Issue Description

Please check the General Issues section in the wiki before you submit the issue.
If you didn't find your issue mentioned, please give a thorough description of the issue you're seeing.
Also, please be sure to include any troubleshooting steps that you've already attempted.

Running ./build.sh ubuntu1404 results in a hang when building the Virtualbox image.

Eventually, the Virtualbox machine gets stuck on a screen that looks like this:

image

I can switch to a system log using alt-f4, which looks like this:

image

If I try Ctrl-C at the blank purple screen, it lets me select a language, location, and then continues to hang up.

image

I've tried duckduckgoing that last INFO message and browsing various Stackexchange threads, and I haven't found an issue similar to mine. The closest possibility was not enough disk space. I checked, I have over 100GB free on my hard drive.

I've looked through the issues on this repository and haven't found a similar issue.

I checked the General Issues section in the wiki. I looked under 'Waiting for SSH takes a long time'. I read through #20 . I tried to start SSH manually by opening a TTY with alt-f2.

image

Interestingly, I don't have this issue while building the libvirt version of ub1404. The problem is, the ./build.sh script will attempt to build both the libvirt and the virtualbox, successfully finish building the libvirt box, then fail to build the virtualbox box, and will add neither to vagrant.

Host System

  • OS: Arch Linux
  • Packer Version: 1.8.3
  • Vagrant Version: Vagrant 2.3.2
  • VirtualBox Version: VirtualBox Graphical User Interface Version 7.0.2 r154219

Command Output

> ./build.sh ubuntu1404                                                 02:40:29
building ubuntu 1404
Compatible version of VirtualBox found.
Virtualbox images will be built.
/home/user/git-repos/metasploitable3/build.sh: line 92: packer-io: command not found
Compatible version of packer was found.
Correct version of vagrant was found.
Compatible version of vagrant-libvirt plugin was not found.
Compatible version of vagrant-reload plugin was found.
Requirements found. Proceeding...
Building the Vagrant box for virtualbox...
virtualbox-iso: output will be in this color.

==> virtualbox-iso: Retrieving Guest additions
==> virtualbox-iso: Trying /usr/lib/virtualbox/additions/VBoxGuestAdditions.iso
==> virtualbox-iso: Trying /usr/lib/virtualbox/additions/VBoxGuestAdditions.iso
==> virtualbox-iso: /usr/lib/virtualbox/additions/VBoxGuestAdditions.iso => /usr/lib/virtualbox/additions/VBoxGuestAdditions.iso
==> virtualbox-iso: Retrieving ISO
==> virtualbox-iso: Trying http://old-releases.ubuntu.com/releases/14.04.0/ubuntu-14.04-server-amd64.iso
==> virtualbox-iso: Trying http://old-releases.ubuntu.com/releases/14.04.0/ubuntu-14.04-server-amd64.iso?checksum=sha256%3Aababb88a492e08759fddcf4f05e5ccc58ec9d47fa37550d63931d0a5fa4f7388
==> virtualbox-iso: http://old-releases.ubuntu.com/releases/14.04.0/ubuntu-14.04-server-amd64.iso?checksum=sha256%3Aababb88a492e08759fddcf4f05e5ccc58ec9d47fa37550d63931d0a5fa4f7388 => /home/user/.cache/packer/110e9dcdcb48bd4ab673fbe6336d9b7444a59e18.iso
==> virtualbox-iso: Starting HTTP server on port 9001
==> virtualbox-iso: Creating virtual machine...
==> virtualbox-iso: Creating hard drive output-virtualbox-iso/metasploitable3-ub1404.vdi with size 40000 MiB...
==> virtualbox-iso: Mounting ISOs...
    virtualbox-iso: Mounting boot ISO...
==> virtualbox-iso: Creating forwarded port mapping for communicator (SSH, WinRM, etc) (host port 4326)
==> virtualbox-iso: Executing custom VBoxManage commands...
    virtualbox-iso: Executing: modifyvm metasploitable3-ub1404 --memory 4096
    virtualbox-iso: Executing: modifyvm metasploitable3-ub1404 --cpus 2
==> virtualbox-iso: Starting the virtual machine...
==> virtualbox-iso: Waiting 20s for boot...
==> virtualbox-iso: Typing the boot command...
==> virtualbox-iso: Using SSH communicator to connect: 127.0.0.1
==> virtualbox-iso: Waiting for SSH to become available...
@AngelKing86
Copy link

This is a problem with packer and the correct download of the preseed.cfg
I use VirtualBox 7.0.4 on Windows 11 with WSL enabled

If there are multiple network adapters in the system. For me, the download path was determined to be 10.0.2.2, but correct would be 10.0.2.3

As a workaround i change the line 88 in ubuntu_1404.json template file

from
" preseed/url=http://{{ . HTTPIP }}:{{ . HTTPPort }}/preseed.cfg",
to
" preseed/url=http://10.0.2.3:{{ . HTTPPort }}/preseed.cfg",

and now the setup running without problems. I thin its a problem with packer and WSL enabled systems.

Reference:
HTTPIP on Windows gets IP address from wrong Ethernet adapter #10168
hashicorp/packer#10168

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

No branches or pull requests

2 participants