虚机安装
Vagrant创建虚机
方式一
方式二
$ /Users/helei/vagrant $ cd /Users/helei/vagrant$ vagrant box add {title} {url} $ vagrant init {title} $ vagrant up# 安装box $ vagrant box add CentOs7 /Users/helei/vagrant/centos-7.0-x86_64.boxDownloading or copying the box... Extracting box...te: 47.5M/s, Estimated time remaining: --:--:--) Successfully added box 'base' with provider 'virtualbox'!# 如果是才add 的box,就必须执行本步骤,初始化一次后,以后启动系统,就不需要执行本步骤。 $ vagrant init CentOs7A `Vagrantfile` has been placed in this directory. You are now ready to `vagrant up` your first virtual environment! Please read the comments in the Vagrantfile as well as documentation on `vagrantup.com` for more information on using Vagrant.# 启动系统 $ vagrant upBringing machine 'default' up with 'virtualbox' provider... [default] Importing base box 'base'... [default] Matching MAC address for NAT networking... [default] Setting the name of the VM... [default] Clearing any previously set forwarded ports... ...
Vagrantfile文件模板
Vagrant基本操作
参考文章
Last updated