Vagrant up with HyperV

I have hyperv enabled on my system. When I issued vagrant up command, I get the following:
PS C:\m103> cd .\m103-vagrant-env
PS C:\m103\m103-vagrant-env> vagrant up
Bringing machine ‘mongod-m103’ up with ‘hyperv’ provider…
==> mongod-m103: Verifying Hyper-V is enabled…
==> mongod-m103: Verifying Hyper-V is accessible…
==> mongod-m103: Box ‘ubuntu/trusty64’ could not be found. Attempting to find and install…
mongod-m103: Box Provider: hyperv
mongod-m103: Box Version: >= 0
==> mongod-m103: Loading metadata for box ‘ubuntu/trusty64’
mongod-m103: URL: https://vagrantcloud.com/ubuntu/trusty64
The box you’re attempting to add doesn’t support the provider
you requested. Please find an alternate box or use an alternate
provider. Double-check your requested provider to verify you didn’t
simply misspell it.

If you’re adding a box from HashiCorp’s Vagrant Cloud, make sure the box is
released.

Name: ubuntu/trusty64
Address: https://vagrantcloud.com/ubuntu/trusty64
Requested provider: [:hyperv]
PS C:\m103\m103-vagrant-env>

Is there a way to work on this lab with hyperv?

Hey @Saheli_27970

Have you enable Virtualization in your BIOS setting?
Check out this write up.

https://bce.berkeley.edu/enabling-virtualization-in-your-pc-bios.html

Hi @Saheli_27970,

Please disable hyper-v before using virtualBox/vagrant and retry running your command.

Please let me know if you have any questions.

Thanks,
Muskan
Curriculum Support Engineer

Thanks for your responses.
The issue I am facing seems to be due to the mismatch between the box installed into Vagrant as seen from the list command -
PS C:\m103\m103-vagrant-env> vagrant box list
centos/7 (hyperv, 1905.1)

and the configuration of box mentioned in Vagrantfile -
Vagrant.configure(“2”) do |config|
config.vm.box = “ubuntu/trusty64”

Should there be any issues in passing “centos/7” for config.vm.box parameter as it supports hyperv? I have a constraint on installing VirtualBox on the system I am working on, hence I need a way to work with hyperv.

Yes I have virtualization enabled. But instead of VirtualBox I am trying to figure out if I can use HyperV for provisioning Vagrant.

Is it possible to work with hyper-v to create the Vagrant environment, probably by using a different box?

Not sure, but maybe this could help

Hi @Saheli_27970,

I would highly recommend you to disable Hyper V running on your windows machine. Our virtual environments are not designed to work with it.

Additionally, we are not aware of any workaround to using hyper-v enabled alongside our virtual environment. So you must disable it to continue using vagrant/VirtualBox.

If you have any other issue, please feel free to get back to us.

Thanks,
Muskan
Curriculum Support Engineer

1 Like