Vagrant plugin hostmanager missing

I’m seeing the following errors when trying to run vagrant up:

vagrant-hostmanager missing, please install the plugin with this command:
vagrant plugin install vagrant-hostmanager

Or install landrush for multisite subdomains:
vagrant plugin install landrush

I’ve tried uninstalling and reinstalling the plugins and I also previously downgraded vagrant to 1.8.6 as mentioned elsewhere on this forum. Anyone know how I can fix this: The relevant section in the Vagrantfile seems to be:

if Vagrant.has_plugin?('vagrant-hostmanager') && !multisite_subdomains?(wordpress_sites)
    config.hostmanager.enabled = true
    config.hostmanager.manage_host = true
    config.hostmanager.aliases = hostnames + redirects
  elsif Vagrant.has_plugin?('landrush') && multisite_subdomains?(wordpress_sites)
    config.landrush.enabled = true
    config.landrush.tld = config.vm.hostname
    hostnames.each { |host| config.landrush.host host, ip }
  else
    fail_with_message "vagrant-hostmanager missing, please install the plugin with this command:\nvagrant plugin install vagrant-hostmanager\n\nOr install landrush for multisite subdomains:\nvagrant plugin install landrush"
end

If I disable multisite in wordpress_sites.yml vagrant provision times out at at:

TASK [common : Checking essentials] ********************************************

or sometimes at

==> default: Bindfs seems to not be installed on the virtual machine, installing now 

I am also unable to destroy the box as I get the aforementioned plugin missing errors.

Same here. Vagrant is updated to the latest version 2.1.2 and running e.g. vagrant plugin listoutside the trellis folder returns the correct list of plugins:

landrush (1.2.0)
  - Version Constraint: > 0
vagrant-bindfs (1.1.0)
  - Version Constraint: > 0
vagrant-hostmanager (1.8.9)
  - Version Constraint: > 0

However within the trellis folder I can’t run the same command as it returns

vagrant-hostmanager missing, please install the plugin with this command:
vagrant plugin install vagrant-hostmanager

Or install landrush for multisite subdomains:
vagrant plugin install landrush

That also doesn’t allow me to run vagrant provision and even vagrant plugin install vagrant-hostmanager.

Is this a compatibility issue with the latest Vagrant version? Or any other idea how to solve this?

Thanks in advance

Fast solution: downgrading your Vagrant version should solve it. 2.0.1 works for me.

Dear @knowler. Thanks a lot for your answer. You’re right that using version 2.0.1 is working for me as well. But version > 2.1.0 brings some useful additions such as integrated triggers, which I would like to use to dump my DB on vagrant halt as described here: Keep database synced between computers in Trellis/Bedrock/Sage setup

I’ve been in contact with the developer of “vagrant-hostmanager” as I thought it might be an issue of the plugin, that it’s not recognized. And he gave me some hints, which might be useful for Trellis as well:

Best regards!

1 Like

Can you open an issue on Trellis about this please?

I am also getting this error today.

I only noticed because I had to downgrade to 2.1.2 after upgrading to Vagrant 2.1.3 which made things worse.

Here are some related tickets over at Hashicorp:

https://github.com/hashicorp/vagrant/issues/10153