[Introduction] Build a virtual environment of Vagrant + VirtualBox on Window10 [Environment construction]

For the first time, I built a Vagrant environment with Window 10. Build CentOS 7 using Vagrant and VirtualBox by referring to various introductory articles.

It was my first experience, so it was hard because I got a lot of unexpected errors ...

I hope it will be useful so that later students can easily build the environment.

environment

Window10 Vagrant2.2.10 VirtualBox5.2.44

Vagrant practice file creation procedure

Disable Hyper-V

Window10 users who have used ** Docker ** should first turn off Hyper-V.

Please be sure to turn it off! !! !! !! !!

bcdedit /set hypervisorlaunchtype off
You have successfully completed this operation.

VirtualBox installation

I installed the latest version of 5 series. Get the installer from here and run it.

vagrant installation

I downloaded the latest version 2.2.10 at the time of writing. Basically, let's install the latest version (64bit). Get the installer from here and run it. After installation, you need to restart the OS.

After rebooting, start the command prompt and check the version.

vagrant -v
Vagrant 2.2.7

Install the plugin at the command prompt. Introduce an omnibus plugin that installs Chef as needed and a VirtualboxGuestAddition tool for host-guest shared folder configuration. (If not, an error will occur) Also install vagrant-hostmanager for replication.

vagrant plugin install vagrant-omnibus
vagrant plugin install vagrant-vbguest
vagrant plugin install vagrant-hostmanager

If you want to uninstall

vagrant plugin uninstall vagrant-omnibus
vagrant plugin uninstall vagrant-vbguest
vagrant plugin uninstall vagrant-hostmanager

View installed pluigin

vagrant plugin list

Addition of CentOS7 box

vagrant is managed using an image file and a configuration file called a box. Download the CentOS 7.7 box from vagrantcloud.com and add it for virtualbox.

This can be done at ** _ Command Prompt _ **.

_ It's anxious because the processing time is long, so it's already a break. _

> vagrant box add bento/centos-7.7 --provider virtualbox
==> box: Loading metadata for box 'bento/centos-7.7'
    box: URL: https://vagrantcloud.com/bento/centos-7.7
==> box: Adding box 'bento/centos-7.7' (v202002.04.0) for provider: virtualbox
    box: Downloading: https://vagrantcloud.com/bento/boxes/centos-7.7/versions/202002.04.0/providers/virtualbox.box
    box: Download redirected to host: vagrantcloud-files-production.s3.amazonaws.com
    box: Progress: 100% (Rate: 457k/s, Estimated time remaining: --:--:--)
==> box: Successfully added box 'bento/centos-7.7' (v202002.04.0) for 'virtualbox'!

Create and initialize vagrant management folder

Initialize the project by creating a file in the location where you want to manage vagrant.

vagrant init bento/centos-7.7

A Vagrantfile of about 10MB is created. Log files and management information are saved when the virtual machine starts.

Start virtual machine

Start the virtual machine with the vagrant up command.

vagrant up

Connect to virtual machine

vagrant ssh

You can now connect to the virtual machine you created for practice! !!

When you want to use Docker again

Set back to Auto

bcdedit /set hypervisorlaunchtype auto

And reboot

Created on 2020/10/14 Updated on 2020/10/23

References

  1. vagrant + VirtualBox + CentOS 7.7 environment construction (Windows 10)
  2. When I try to start Vagrant on Windows, it says Raw-mode is unavailable courtesy of Hyper-V
  3. VirtualBox cannot be used in Window10.

Recommended Posts

[Introduction] Build a virtual environment of Vagrant + VirtualBox on Window10 [Environment construction]
Build a CentOS 8 virtual environment on your Mac with VirtualBox
Ruby on Rails environment construction using VirtualBox, Vagrant, cyberduck
Build a XAMPP environment on Ubuntu
Steps to build a Ruby on Rails development environment with Vagrant
Build a Java development environment on Mac
Build a JMeter environment on your Mac
Build a Laravel environment on an AWS instance
A reminder of Docker and development environment construction
Build a Java runtime environment on Sakura VPS
How to build a Pytorch environment on Ubuntu
Memo to build a Servlet environment on AWS EC2
Install Ubuntu 20.04 in virtual box on windows10 and build a development environment using docker
Build a Ruby on Rails development environment on AWS Cloud9
[Environment construction] Build a Java development environment with VS Code!
[2021] Build a Docker + Vagrant environment for using React / TypeScript
Build a "Spring Thorough Introduction" development environment with IntelliJ IDEA
Introduction to Metabase ~ Environment Construction ~
Ruby ① Build a Windows environment
[Introduction] Installation of Docker Desktop for Mac for the first time and setup of virtual environment construction of CentOS
A story of frustration trying to create a penetration environment on Ubuntu 20.04
Build a development environment where Ruby on Rails breakpoints work on Windows
Build a Node.js environment with Docker
Build a Tomcat 8.5 environment with Pleiades 4.8
Build a Minecraft server on AWS
Make a language! (JavaCC environment construction)
Ruby on Rails 6.0 environment construction memo
Rails on Docker environment construction procedure
Build Virtual Box & Vagrant & Centos7 & GitLab
Build Virtual Box & Vagrant & Centos7 & Artifactory
Build Unity development environment on docker
How to build a Ruby on Rails environment using Docker (for Docker beginners)
Build a hot reload development environment with Docker-compose using Realize of Go
How to build a Ruby on Rails development environment with Docker (Rails 6.x)
Build a bulletin board API with authentication and authorization with Rails 6 # 1 Environment construction
Environment construction of Ruby on Rails from 0 [Cloud9] (From Ruby version change to Rails installation)
How to solve the local environment construction of Ruby on Rails (MAC)!
Build a development environment on AWS EC2 with CentOS7 + Nginx + pm2 + Nuxt.js
How to build a Ruby on Rails development environment with Docker (Rails 5.x)