StackStorm / packer-st2

Packer templates for building & deploying Vagrant & OVA with StackStorm installed
https://app.vagrantup.com/stackstorm/boxes/st2
Apache License 2.0
13 stars 7 forks source link

Incorrect IP address range #68

Open matthew-lxr opened 8 months ago

matthew-lxr commented 8 months ago

Hello,

I am getting the following error, which I am unable to override.

The IP address configured for the host-only network is not within the
allowed ranges. Please update the address used to be within the allowed
ranges and run the command again.

  Address: 10.10.10.10
  Ranges: 192.168.56.0/21

Valid ranges can be modified in the /etc/vbox/networks.conf file. For
more information including valid format see:

  https://www.virtualbox.org/manual/ch06.html#network_hostonly

From what I understand the need to be changed or ST2 needs to run on a different IP address.

arm4b commented 7 months ago

Thanks for the report.

Yeah, looks like it's not recommended anymore to have that IP range for Virtualbox per https://www.virtualbox.org/manual/ch06.html#network_hostonly

On Linux, macOS and Solaris Oracle VM VirtualBox will only allow IP addresses in 192.168.56.0/21 range to be assigned to host-only adapters.

If you're interested, you can submit a PR to change the IP (to something like 192.168.56.56) so other folks won't have this issue in the future. The code is here: https://github.com/StackStorm/packer-st2/blob/28f2bb3bf9ee1511b2944d19d369cd2c0242142b/Vagrantfile.template#L42-L45

As a workaround, you can add 10.10.10.10 to your /etc/vbox/networks.conf to make it work per Virtualbox instructions.

Alternatively, you can just access the stackstorm web UI via https://127.0.0.1:9000/ https://github.com/StackStorm/packer-st2/blob/master/Vagrantfile.template#L33-L35

matthew-lxr commented 7 months ago

Okay, I will take a look at doing the PR. I am not sure how I update /etc/vbox/networks.conf when the box will not start.

arm4b commented 7 months ago

Okay, I will take a look at doing the PR. I am not sure how I update /etc/vbox/networks.conf when the box will not start.

The Virtualbox as a service should be running. It's just a st2 box that's not starting. networks.conf setting applies to Virtualbox itself.

You can update /etc/vbox/networks.conf with

      * 10.0.0.0/8 192.168.0.0/16
      * 2001::/64

restart Virtualbox service and try to run vagrant up for stackstorm box again.

matthew-lxr commented 7 months ago

Ah, thank you for the information.

matthew-lxr commented 7 months ago

I have submitted https://github.com/StackStorm/packer-st2/pull/69 It was not clear how to contribute and the build seems to be failing due to the packer provider cancelling.