Learn to use simple vagrant

1. Install vagrant

Older versions of vagrant can http://downloads.vagrantup.com/ download, support system platform mac, debian / ubuntu, centos, windows. If you want to download the latest version of the vagrant, the need FQ. Everyone makes their own find FQ tool.

 

2. Download vagrant existing virtual machine.

Vagrantbox.es: A list of base boxes for Vagrant  site we have installed virtual machine. After a good download, add a virtual machine than vagrant network download virtual machine is much simpler, especially in the case of bad network better. I chose Provider is virtualbox system.

 

3. Install virtualbox

Since I use linux system, in the Download VirtualBox for Linux Hosts download virtualbox version for their own system.

Pay attention to the page, and there was of how to use apt-get and yum install, since you can directly update their systems to install the new version of virtualbox.

I usually Download VirtualBox download Oracle VM VirtualBox Extension Pack, is useful when installing enhancements.

 

4.virtualbox 64-bit virtual system problems.

virtualbox using the 64-bit virtual systems to be configured at bios, reference VirtualBox install the 64-bit system error solutions to meet three conditions, namely:

1.64 the CPU
2. The mounting system 64 must
3.cpu allow hardware virtualization

My motherboard model is Jetway HA03, no Advanced-cpu setup-virtualization options, google N long, the [help] Hummer HA03-Ultra motherboard BIOS how open VT? With these clues, this option in the BIOS and CPU overclocking that one together.

Quickly checked the overclocking English translation, the original is overclock. Shutdown re-examination, I finally found it.

Press del to enter bios setup interface, Power User Overclock Settings -> CPU Feature, the Secure Virtual Machine Mode is set to Enabled, save the boot, you can see there is an option virtualbox 64-bit systems.

Here, can not help but want to say loudly, Jetway your BIOS setup dare to follow the crowd about it?

 

5. Use vagrant

Now all the conditions are, and now can finally use a vagrant. A lot of information on the Internet, using Vagrant to create cross-platform development environment , I think it is the best.

Import a virtual machine, vagrant box add 

View virtual machine images, vagrant box list

Open the virtual machine, I am here to make the mistake, directly open the virtual machine in the directory import virtual machine images, which of course is not.

The correct approach is to create a new directory, then this directory init, then turn on the virtual machine.

mkdir ubuntu
cd ubuntu
vagrant init ubuntu-12.04-amd64
vagrant up

Which, ubuntu-12.04-amd64 you import the virtual machine image name. Interface system through the command line to start the virtual machine generally does not appear, can only be managed through ssh, for people like me used to the command line, a lot of convenience.

Here starts the virtual machine will appear in virtualbox management interface. In the virtual machine image downloaded from the Internet, usually with their own version of virtualbox inconsistent, this virtual machine can be started directly in virtualbox management interface, then install enhancement tools, so start the process on the case of error it does not appear.

 

Reproduced in: https: //my.oschina.net/u/191928/blog/618653

Guess you like

Origin blog.csdn.net/weixin_33810006/article/details/91986990