2. Run the first vagrant host

Source: Internet
Author: User

1. Initializing the Environment (online)

Vagrant Init centos6.7 https://github.com/CommanderK5/packer-centos-template/releases/download/0.6.7/ Vagrant-centos-6.7.box


2. Initializing the Environment (offline)

Vagrant Init centos6.7/path/to/vagrant-centos-6.7.box==> correctly executes the init command, it outputs the following message: A ' Vagrantfile ' has been placed in This directory. You're nowready to ' vagrant up ' your first virtual environment! Readthe comments in the vagrantfile as well as documentation on ' vagrantup.com ' for more information on using Vagran T.


3. Start

Vagrant up==> Normal Start, will output the following information bringing machine ' default ' up with ' VirtualBox ' provider...==> default:box ' CentOS ' could Not being found.  Attempting to find and install ... default:box provider:virtualbox default:box Version: >= 0==> Default:box File is not detected as metadata. Adding It directly...==> default:adding box ' CentOS ' (v0) for Provider:virtualbox default:unpacking necessary fil Es from:file://c:/me/vagrant-centos-6.7.box ...


4. SSH connection

#由于windows本身不带ssh工具, we can according to the information below, through the Xshell remote

Vagrant ssh ' ssh ' executable not found on any directories in the%PATH% variable. is ANSSH client installed? Try installing Cygwin, MinGW or Git, all of the Whichcontain an SSH client. Or Use your favorite SSH client with the Followingauthentication information shown below:host:127.0.0.1port:2222username : Vagrantprivate Key:c:/me/.vagrant/machines/default/virtualbox/private_key


5. View host Status

The Vagrant status==> output is the following current machine States:default running (VirtualBox), the VM is running. To stop the This VM, you can run ' vagrant Halt ' toshut it down forcefully, or can run ' vagrant suspend ' to simplysuspend t He virtual machine. In the either case, the to restart it again,simply run ' vagrant up '.


6. Save the current state of the virtual machine

Vagrant suspend==> output is as follows ==> default:saving VM state and suspending execution ...


7. Turn off the host

Vagrant halt==> output is as follows ==> default:attempting graceful shutdown of VMS ...


8. View the host list

Vagrant Box list==> outputs the following CentOS (VirtualBox, 0)


9. Removing the host

Vagrant Box Remove centos==> output is as follows box ' CentOS ' (v0) with provider ' VirtualBox ' Appearsto still is in use by at least one Vagrant environment. Removingthe box could corrupt the environment. We recommend Destroyingthese environments First:default (id:53661dff77cf466a88eb73346d11e488) is you sure your want to REM Ove this box? [y/n] yremoving box ' CentOS ' (v0) with provider ' VirtualBox ' ...


10. Remove all vagrant hosts

Vagrant destory ==> Output as follows Default:are you sure do want to destroy the ' default ' VM? [y/n] y==> default:destroying VM and associated drives ...


This article is from "Mr. Peach" blog, please be sure to keep this source http://peach3412.blog.51cto.com/12037226/1847113

2. Run the first vagrant host

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.