HyperV provider - Vagrant could not detect VirtualBox!

1,136 views
Skip to first unread message

zveratko

unread,
Mar 17, 2020, 5:27:42 AM3/17/20
to Vagrant
Does vagrant need VirtualBox to run?
 I have switched to WIN10 and I am forced to run hyperV. I found out that VBox will not work with hyperV enabled so I decided to remove it. But now I'm getting

Vagrant could not detect VirtualBox! Make sure VirtualBox is properly installed.
Vagrant uses the `VBoxManage` binary that ships with VirtualBox, and requires
this to be available on the PATH. If VirtualBox is installed, please find the
`VBoxManage` binary and add it to the PATH environmental variable.

Why is that? Does vagrant have dependency on VBox even when I am using 'hyperv' provider?

Jeff Bonhag

unread,
Mar 17, 2020, 11:54:26 AM3/17/20
to vagra...@googlegroups.com
Hi there,

Vagrant doesn't require VirtualBox, but if you have Hyper-V and VirtualBox installed at the same time, it will prioritize VirtualBox over Hyper-V. This means that running `vagrant up` will try to bring up a VirtualBox-backed machine when both providers are installed. (Note that you can request a specific provider like `vagrant up --provider hyperv`).

It sounds like you may still have a VirtualBox-backed VM on your Windows machine. Can you please check the output of `vagrant global-status`?

If you see something like:

    0eedc3c  default virtualbox poweroff C:/Users/vagrant/vbox-test

then Vagrant is going to keep trying to use VBoxManage to interact with that VM. I'd suggest that you reinstall VirtualBox, run a `vagrant destroy` on the VirtualBox-backed machine, and then uninstall VirtualBox again.

Hope this helps!

Jeff

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/6d799979-657b-41d1-ae2e-08d7d2b44021%40googlegroups.com.

dragon788

unread,
Mar 18, 2020, 2:33:08 PM3/18/20
to Vagrant
If you are using the latest version of Vagrant the Hyper-V provider is built in. As mentioned if the box you have supports your provider it should start without prompting, but if you have a box that supports multiple providers the default is Virtualbox, another possibility is the box that you tried to grab does NOT support HyperV a a provider, in which case the odds are good that it does support the default Virtualbox provider.

Depending on how you install Vagrant though, some package providers _helpfully_ install Virtualbox automatically even though it should be an optional dependency. Vagrant comes with Virtualbox, HyperV and Docker support out of the box because these "plugins" are maintained by Hashicorp so they make sense to be bundled, but there are many other provider plugins available for libvirt and AWS and parallels and may others, and these are distributed separately so that they can be updated independently of Vagrant itself.

The "easy" way to avoid getting Virtualbox boxes when trying to `vagrant init somebox` is to set the VAGRANT_DEFAULT_PROVIDER environment variable to your preferred provider at a user or system level so that it always uses the one you have available.

zveratko

unread,
Mar 19, 2020, 2:57:00 AM3/19/20
to Vagrant
The whole think happened after I uninstalled VBox because I decided to go for HyperV ( and I had of course hyperv provider specified in my vagrant file) After realizing that vagrant will no take care of static IP, I have disabled the whole hyperV thingy and went back for VBox. Which of course gave me another hard time getting "guru meditation state" when using more than one CPU.

I will be fine with VBox now, but I disabled Windows 10 Bitlocker, which I thought need some hyperV support. I am not able to say if the bitlocker and hyperV are somehow connected. If I remember swiching off virtualization in BIOS led to Bitlocker stopped working.
Do you know if the Bitlocker requires hyperV support? 

I really don't know where I got the impression that VBox will not run with Windows10 and Bitlocker enabled.

zveratko

unread,
Mar 19, 2020, 3:00:27 AM3/19/20
to Vagrant
I have had the provider specified, but it did not help. I reinstaled vagrant, vbox to no avail. But anyway I gave up and switched off hyperV and set back to VBox completely.


On Tuesday, March 17, 2020 at 4:54:26 PM UTC+1, Jeff Bonhag wrote:
Hi there,

Vagrant doesn't require VirtualBox, but if you have Hyper-V and VirtualBox installed at the same time, it will prioritize VirtualBox over Hyper-V. This means that running `vagrant up` will try to bring up a VirtualBox-backed machine when both providers are installed. (Note that you can request a specific provider like `vagrant up --provider hyperv`).

It sounds like you may still have a VirtualBox-backed VM on your Windows machine. Can you please check the output of `vagrant global-status`?

If you see something like:

    0eedc3c  default virtualbox poweroff C:/Users/vagrant/vbox-test

then Vagrant is going to keep trying to use VBoxManage to interact with that VM. I'd suggest that you reinstall VirtualBox, run a `vagrant destroy` on the VirtualBox-backed machine, and then uninstall VirtualBox again.

Hope this helps!

Jeff

On Tue, Mar 17, 2020 at 5:27 AM zveratko <martin...@gmail.com> wrote:
Does vagrant need VirtualBox to run?
 I have switched to WIN10 and I am forced to run hyperV. I found out that VBox will not work with hyperV enabled so I decided to remove it. But now I'm getting

Vagrant could not detect VirtualBox! Make sure VirtualBox is properly installed.
Vagrant uses the `VBoxManage` binary that ships with VirtualBox, and requires
this to be available on the PATH. If VirtualBox is installed, please find the
`VBoxManage` binary and add it to the PATH environmental variable.

Why is that? Does vagrant have dependency on VBox even when I am using 'hyperv' provider?

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagra...@googlegroups.com.

dragon788

unread,
Mar 19, 2020, 9:52:54 AM3/19/20
to Vagrant
In the Vagrantfile the provider blocks do NOT actually tell Vagrant which provider to use, they simply tell it that if that provider is selected from the command line or environment variable what changes to make to the box configuration.

In recent versions of Windows 10 with versions of Virtualbox higher than 6, it is supposed to be possible for Virtualbox and hyper-V to coexist.

If you had installed Virtualbox you would definitely need to add `--provider hyperv` to your `vagrant up` and other commands, and you'd want to check with `vagrant global-status` that there wasn't a Virtualbox box already present in that directory.

Martin Wortner

unread,
Mar 20, 2020, 3:19:55 AM3/20/20
to vagra...@googlegroups.com
Thank you for this really important detail, I thought that the vagrant file provider specifies which provider is used. It probably explains a lot of problems I have experienced. Are you sure about the coexistence I have red that the hyperV block the instruction to itself and virtualBox just fallbacks to run on HyperV.

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/05656f7f-7c45-4c07-b229-9a7a8d019200%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages