Cannot run multiple Laravel Homestead boxes

Discussion in 'Parallels Provider for Vagrant' started by ad_4, Oct 25, 2023.

  1. ad_4

    ad_4 Bit poster

    Messages:
    2
    Hi,
    I cannot get a second box to come up if one is already running. I'm using Laravel Homestead (which is using Laravel Settler as a box "provider" and that in turn seems to be based on the bento ubuntu image of ubuntu 20.04.05, box is called `laravel/homestead-arm`) with a local install on 2 separate repositories. This used to work fine for me on my previous, Intel Macbook, with both Virtualbox and Parallels as Vagrant providers. However it doesn't work on the M1 Mac.

    It appears to be some issue with networking setup, where provisioning fails midway through (so e.g. system package updates run fine, but some Homestead provisioning i.e. composer update does not) saying that there's no internet access anymore. Also the other box that was running when while I try to provision the second one looses all open SSH connections and when I try to reconnect there (with vagrant ssh) I get prompted for password (which doesn't normally happen). After supplying it I get logged into the box that failed to provision and not the one I was trying to provision. Also trying to run `vagrant ssh <id>` with ids of both boxes I always get logged into the same box -- the one that failed to provision.
    It feels like maybe it's a similar issue to the one described here: https://forum.parallels.com/threads/parallels-18-vagrant-multi-machine-issues.360012/ , but because it's Homestead box with it's own versions that workaround won't work for me.

    I've tried disabling static ip configuration on the second box (I've had different IPs configured for each anyway), https://developer.hashicorp.com/vagrant/docs/providers/virtualbox/configuration#linked-clones in the Vagrantfile, restarting the system/vagrant/boxes, reinstalling vagrant.

    Any idea how I could work-around this or at least debug it to confirm what is happening?

    Versions:
    Homestead 14.5.0
    Vagrant 2.4.0
    MacOS 14.0
    Parellels Desktop Mac Pro Edition 19
     
  2. ad_4

    ad_4 Bit poster

    Messages:
    2
    What I've noticed is that both boxes provision 2 network adapters each: one to the shared network and one to the private network. `vagrant ssh-config` hostname seems to suggest that SSH access is setup on the shared network and the second box to go up is taking over the IP address on the shared network. Hence `vagrant ssh` stops working correctly. The exact same setup works with no issues on vagrant with virtualbox as a provider, so makes me wonder if there's some difference in network configuration that I'd need to get this to work.
     

Share This Page