hashicorp / packer-plugin-virtualbox

Packer plugin for VritualBox Builder
https://www.packer.io/docs/builders/virtualbox
Mozilla Public License 2.0
22 stars 36 forks source link

Building virtualbox-iso within nested virtualization does not type the boot command #84

Open hc-github-team-packer opened 1 year ago

hc-github-team-packer commented 1 year ago

This issue was originally opened by @blaargh in https://github.com/hashicorp/packer/issues/11744 and has been migrated to this repository. The original issue description is below.


Community Note

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

Overview of the Issue

In our toolchain we want to build packer vm's from within a virtual machine. Nested VT-X is working correctly. When using packer build to build Ubuntu 22.04 via virtualbox-iso, the boot command is not being typed.

Reproduction Steps

  1. Get a Ubuntu vm running
  2. Install virtualbox + packer
  3. Build packer with the the template below

Packer version

1.8.0

Simplified Packer Template

https://gist.github.com/blaargh/eddca388c44099785e899edb67f28903

Operating system and Environment details

Ubuntu 22.04 in virtual machine hosted on ESXi 6.7

Log Fragments and crash.log files

2022/05/02 10:06:58 packer-builder-virtualbox-iso plugin: stdout: Waiting for VM "Ubuntu-Desktop-22.04" to power on... 2022/05/02 10:06:58 packer-builder-virtualbox-iso plugin: VM "Ubuntu-Desktop-22.04" has been successfully started. 2022/05/02 10:06:58 packer-builder-virtualbox-iso plugin: stderr: ==> virtualbox-iso: Waiting 4s 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... 2022/05/02 10:07:06 packer-builder-virtualbox-iso plugin: [INFO] Waiting for SSH, up to timeout: 2h46m40s

Nothing is crashing, the boot command just instantly moves on to the SSH command