nixbox icon indicating copy to clipboard operation
nixbox copied to clipboard

Support for Virtualbox 7.0+

Open pmaterer opened this issue 2 years ago • 3 comments

I was trying to build virtualbox-iso.virtualbox on macOS 12.4 using Virtualbox 7.0.4, and I noticed the HTTP server Packer creates was not reachable. After some research I found the issue here. With VBox 7.0+, the config option --nat-localhostreachable was introduced and is set to off by default.

So to fix the issue something like this will need to be done:

source "virtualbox-iso" "virtualbox" {
...
  vboxmanage           = [["modifyvm", ..., "--nat-localhostreachable1", "on"]]
...
}

With that in place the build works on Virtualbox 7.0+. However I haven't tested if this breaks builds with older versions of VBox.

pmaterer avatar Mar 06 '23 19:03 pmaterer

Hello @pmaterer, I submitted a fix for this to the virtual box plugin directly: https://github.com/hashicorp/packer-plugin-virtualbox/pull/122

pdietl avatar Jan 07 '24 14:01 pdietl

It's not working old version

ifurther avatar Jan 14 '24 14:01 ifurther

Yeah @ifurther the PR I mentioned above should work on old and new versions.

pdietl avatar Jan 14 '24 23:01 pdietl