Saturday, June 27, 2020

[Solved] Unknown configuration section 'hostmanager'

Recently working with the vagrant I came across this issue of 

Unknown configuration section 'hostmanager'

I have defined the hostmanager in my Vagrantfile but its an additional plugin which you need to install first before you can make the use of it.

Run the following command to resolve this issue
 vagrant plugin install hostmanager  


  1. This works for me...
    a. vagrant plugin install vagrant-hostmanager
    b. vagrant plugin install vagrant-vbguest

  2. Error message:
    $ Vagrant up
    bash: vagrant: command not found

    or Error message:
    * Unknown configuration section 'hostmanager'.


    Step one:
    On your host machine you need to install VirtualBox and the VirtualBox is a hypervisor that helps you to build Virtual Machine.

    Step two:
    If you have Hyper-V hypervisor in your PC, first, you disable it.
    Right-click > Windows Power Shell > Run as administrator > Copy the Below command

    `Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-All`

    *execute the code with power shell and Your Hyper-V will disable

    Step three:
    Download the [Vagrant installer](https://releases.hashicorp.com/vagrant/2.2.9/vagrant_2.2.9_x86_64.msi) and install it on your windows machine.

    Step Four:
    Now you can execute your “vagrant up” Command using Git Bash. Just type the following command to verify Vagrant.
    `$ vagrant --version`
    `$ git --version`
    Step Five:
    Need to install the Vagrant plugin. Execute the below command by Git Bash
    `$ vagrant plugin install vagrant-hostmanager`

    And finally, execute this one.

    `$ vagrant up`

  3. $ vagrant plugin install Vagrant-hostmanager

    Installing the 'Vagrant-hostmanager' plugin. This can take a few minutes...
    Vagrant failed to properly resolve required dependencies. These
    errors can commonly be caused by misconfigured plugin installations
    or transient network issues. The reported error is:

    Unable to resolve dependency: user requested 'Vagrant-hostmanager (> 0)'

    Geetin above error when installing hostmanager plugin
    plz help on this