Enable Hyper-V on Windows 10 and install Vagrant


Hasselblad Promise Vagrant is a tool for building and managing virtual machine environments in a single workflow. With an easy-to-use workflow and focus on automation, Vagrant has shortened the setup time of the development environment, increased productivity, and made “work on my machine” a relic of the past.

Please note that the Hyper-V provider and Windows 8.1 and later only . Earlier versions of Hyper-V did not contain the APIs needed to make Vagrant work properly.

If Hyper-V is installed and SMB is enabled, you can skip step 1.

Step 1: Enable Hyper-V and SMB

Follow the steps below to enable Hyper-V and SMB on your Windows computer.

Search Control Panel

Press the Windows key and search for “ control panel “. Launch it when it appears.

Click program

Click “Turn Windows features on or off”

Scroll down to find Hyper-V and expand it.

Check Hyper-V management tools and Hyper-V platform and click “ it is good “,As shown above.

Look for SMB 1.0 / CIFS file sharing support and check.

Restart your computer

If you like PowerShell, just run the following command. Make sure you are running Powershell as administrator:

                        Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All
 Enable-WindowsOptionalFeature -Online -FeatureName "SMB1Protocol" -All

Step 2: Install the executable

Navigate to the folder where you downloaded the Vagrant executable and double-click the folder to begin the installation process.

Step 3: Follow the installation steps

Please follow the screenshot below to install Vagrant

If you receive the following message, just click “ More information

Then “still running”

This will open an installation wizard as shown below. Just follow the “ next “And configure as needed

Accept the terms in the license agreement and click “ next

If it works for you, you can choose to install Vagrant elsewhere.

Click “ installation “To begin the installation process.

When all installation is complete, the wizard should end as shown below. Just click “ Finish Complete the work at this stage.

Step 4: Restart the computer

After completing the setup steps, restart your computer for the changes to take effect.

Step 5: Add our first homeless box

The box is the package format for the Vagrant environment. Anyone on any platform supported by Vagrant can use the box to build the same working environment. The easiest way to use the box is from Public directory Homeless box. You can also add and share your own custom boxes on this site.

Launch Powershell as administrator and enter the following command:

                        vagrant box add hashicorp/bionic64

This will give us a standard Ubuntu 18.04 LTS 64-bit device

Confirm later with the following command

                        vagrant box list

After the download is complete, navigate to the folder where you want to keep the Vagrantfile and run the following command.

                        vagrant init hashicorp/bionic64

To start the virtual machine, run the following command in PowerShell

                        vagrant up --provider hyperv

You can then use

                        vagrant ssh

Our virtual machine should now be visible in Hyper-V Manager as shown below

in conclusion

We have successfully enabled Hyper-V, installed Vagrant, and started our virtual machine. Thank you for visiting and following the guide.

If you want to run Vagrant in other environments, you can share other related guides below for your consideration.

How to install Vagrant on CentOS 8 / RHEL 8

How to use Vagrant in Libvirt on Linux

Running CentOS 8 VM with Vagrant on KVM / VirtualBox / VMWare / Parallels

How to install Vagrant and VirtualBox on Fedora 31/30/29

How to run Kali Linux on VirtualBox with Vagrant

How to run Kali Linux on VirtualBox with Vagrant

Related Posts