简体   繁体   中英

How to start a VM though Vagrant

I have never used Vagrant before. Now, Im investigating to use it for my project. Here is my problem so need some help from every one.

Currently , I have a CentOS guest that has been installed via Virtual Machine in MAC host. Im going to install Vagrant into MACbook then I want to use Vagrant command line for control CentOS by terminal. As far as I know, after install Vagrant we have to add a box then start up this box ( Windows, *Unix,...). So in my case I ALREADY have a CentOS VM , I do NOT want add a box (because I have to install all of package, soft again). How to integrate the current CentOS with vagrant ?

Please help me if you know. Thank you so much !

How to create a "base box", as it's known in vagrant, is all there in the documentation: http://docs.vagrantup.com/v2/virtualbox/boxes.html

Honestly though, if you're new to it all, I would advise that it would be easier to start with vagrant and a fresh CentOS VM, rather than the approach you're trying. eg:

$ vagrant init chef/centos-7.1
$ vagrant up --provider virtualbox

The installation of packages, software etc can all be defined in the Vagrantfile (see: http://docs.vagrantup.com/v2/provisioning/ ).

This approach avoids ending up with a snowflake server .

By far, the easiest way to configure and use virtual machines is with PuPHPet . Check it out!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM