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

Incorrect HTTP address in boot command #12367

Closed
justwiebe opened this issue Apr 13, 2023 · 2 comments
Closed

Incorrect HTTP address in boot command #12367

justwiebe opened this issue Apr 13, 2023 · 2 comments
Labels

Comments

@justwiebe
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction 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

I have the same issue as #9207 when trying to build a RHEL 9 image. The IP address is 10.0.2.2 when that doesn't appear in any of my interfaces.

Reproduction Steps

packer build -force -on-error=ask -var-file=settings.json java.json

The build will not be able to access the http folder

Packer version

Packer v1.8.6

Simplified Packer Template

{
  "builders": [
    {
      "boot_command": [
        "<tab><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
        "inst.text inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{user `ks_path`}}<enter><wait>"
      ],
      "boot_wait": "10s",
      "export_opts": [
        "--manifest",
        "--vsys",
        "0",
        "--description",
        "{{user `description`}} - Redacted Java Development v{{user `box_version`}}",
        "--version",
        "{{user `box_version`}}"
      ],
      "format": "ova",
      "guest_additions_path": "/tmp/VBoxGuestAdditions.iso",
      "guest_os_type": "RedHat9_64",
      "http_directory": "http",
      "iso_checksum": "{{user `iso_checksum_type`}}:{{user `iso_checksum`}}",
      "iso_url": "https://mirror.stream.centos.org/9-stream/BaseOS/x86_64/iso/CentOS-Stream-9-20230410.0-x86_64-boot.iso",
      "output_directory": "./build/ova/java",
      "shutdown_command": "echo 'vagrant' | sudo -S /sbin/halt -h -p",
      "ssh_password": "vagrant",
      "ssh_port": 22,
      "ssh_timeout": "10000s",
      "ssh_username": "vagrant",
      "type": "virtualbox-iso",
      "virtualbox_version_file": ".vbox_version",
      "vm_name": "redacted-java"
    }
  ]
}

Operating system and Environment details

Windows 10

Log Fragments and crash.log files

image

Set the env var PACKER_LOG=1 for maximum log detail.

@justwiebe justwiebe added the bug label Apr 13, 2023
@justwiebe
Copy link
Author

Of course just after posting this I found #12118. Adding the below fixed it for me

vboxmanage = [
    ["modifyvm", "{{.Name}}", "--nat-localhostreachable1", "on"],
  ]

@github-actions
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 May 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant