Create a run Management VirtualBox virtual machine on windows with vagrant

Source: Internet
Author: User
Tags virtual environment

Baidu Encyclopedia: Vagrant is a ruby-based tool for creating and deploying virtualized development environments. It uses Oracle's Open source VirtualBox virtualization system to create automated virtual environments using chef.
Experience:
1. With vagrant, I can quickly automate the creation of new virtual machines from the template box virtual machine, start-and-stop virtual machines, develop tests, and do not use destroy virtual machines.
2.Vagrant supports Windows, MacOS, Linux, so windows, MacOS users are blessed.
3.box, download from http://www.vagrantbox.es/, you can also make your own box

My tests:
Install the necessary software on Windows, download the virtual machine box file, create a virtual machine template configuration file, produce a virtual machine, run a Run ~ ~ ~

=====================================
Download Install VirtualBox for Windows

Download install vagrant Software, install, restart Windows Server as prompted
Www.vagrantup.com

On the http://www.vagrantbox.es website, find Ubuntu precise VirtualBox
Download Precise64.box file, approximately 300 MB

=====================================
Go to DOS command line
CD \
MD Cloud (Cloud is just a learning directory of my Own)
CD Cloud
Copy the Precise64.box here.

Add Precise64.box to vagrant inside, name Devstack5
Vagrant Box Add–name Devstack5 Precise64.box
Show:
==> Box:box file is not detected as metadata. Adding it directly ...
==> box:adding Box ' devstack5 ' (V0) for provider:
box:unpacking Necessary Files From:file://c:/cloud/precise64.box
box:progress:100% (rate:980m/s, estimated time remaining:–:–:–)
==> box:successfully added box ' devstack5 ' (v0) for ' VirtualBox '!

View Box list
Vagrant Box List
DEVSTACK5 (VirtualBox, 0)

Initialize the virtual machine configuration file (template? )
Vagrant Init Devstack5
A has been placed in the this Vagrantfile directory. You is now
Ready to vagrant up your first virtual environment! Please read
The comments in the Vagrantfile as well as documentation on
vagrantup.comFor more information on using Vagrant.

Look at this file.
Edit
Copy overlay content, comments script #config. Vm.provision "Shell", Path: "Script.sh"
Http://www.tuicool.com/articles/uUVJNf

The first time you start a virtual machine, the VirtualBox virtual machine is created automatically based on the Vagrantfile file above
Vagrant up

To see, in the following directory, there are the virtual machine files that you just created and are running, ah, good large vmdk virtual machine image file!
C:\Users\Administrator\VirtualBox VMs

Start the Oracle VirtualBox GUI program to see which virtual machines are running merrily
Login username vagrant, password vagrant
You can change the root password. sudo passwd root

Well, create a virtual template and launch a virtual machine.

=====================================
Now I want to use this precise64.box virtual machine template, and then create a virtual machine.

Vagrant Box Add–name OpenStack Precise64.box
MD OpenStack
CD OpenStack
Vagrant Init OpenStack generates a new virtual machine configuration file (template?). )
Vagrant Box List
Vagrant up
Ha, start a virtual machine again! Praise!

=====================================
Postscript:
Vagrant Halt: Stop
Vagrant up: Boot, first boot is clone a new VM, and boot
Vagrant destroy: Left Hem, right hem, I'm tired of playing, kill the virtual machine process and physical files, recycling resources!

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Create a run Management VirtualBox virtual machine on windows with vagrant

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.