Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

block in windows_hyperv_admin Error when trying vagrant up

Tags:

vagrant

I'm using Vagrant for my environment and I've got a little issue shown below.

kk@Lenovo MINGW64 ~/sravz/vm1
$ vagrant up
C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.4/lib/vagrant/util/platform.rb:85:in `block in windows_hyperv_admin?': undefined method `include?' for #<Vagrant::Util::Subprocess::Result:0x2634e88> (NoMethodError)
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.4/lib/vagrant/util/platform.rb:89:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.4/lib/vagrant/util/platform.rb:89:in `windows_hyperv_admin?'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.4/plugins/providers/hyperv/provider.rb:20:in `usable?'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.4/lib/vagrant/environment.rb:381:in `block in default_provider'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.4/lib/vagrant/environment.rb:379:in `each'

I have initialised my project with vagrant init but for some reason vagrant up refuses to work.

like image 325
Sravanthi Avatar asked Dec 24 '22 04:12

Sravanthi


2 Answers

I had the same issue, and as @Frédéric Henri mentioned, this is related with this issue: https://github.com/mitchellh/vagrant/issues/7465.

I just followed the suggestion made in one of the comments and now is working fine :)

I had the same issue (initially thought it was because of Hyper-V, which I already uninstalled and the errors remained). But if you installed Virtualbox today, the issue is probably because 5.1 has just been released a few hours ago (creating an environment variable VAGRANT_DEFAULT_PROVIDER set to "virtualbox" shows a message that says it only supports up to 5.0).

*Uninstall 5.1, and install Virtualbox 5.0.x instead until that issue is closed, that fixed it for me.

You can find the older releases here. For 5.0.x. specifically, here.

like image 87
Vallel Avatar answered Jan 30 '23 20:01

Vallel


you might have hit https://github.com/mitchellh/vagrant/issues/7465

Basically you need to make sure virtualbox is installed on your machine.

like image 29
Frederic Henri Avatar answered Jan 30 '23 22:01

Frederic Henri