Vagrant 创建虚拟机

时间:2022-10-20 16:49:03

Vagrant  创建虚拟机

1. 下载相关软件

虚拟机软件:vmware  virtualbox

Vagrant 软件:vagrant

cd /tmp
wget http://download.virtualbox.org/virtualbox/5.1.28/VirtualBox-5.1-5.1.28_117968_el6-1.x86_64.rpm
wget https://releases.hashicorp.com/vagrant/2.0.0/vagrant_2.0.0_x86_64.rpm

2. 安装虚拟机软件和vagrant软件
rpm -ivh VirtualBox-5.1-5.1.28_117968_el6-1.x86_64.rpm
rpm -ivh vagrant_2.0.0_x86_64.rpm

VBoxManage --version
/sbin/vboxconfig

vagrant -v
mkdir /var/tmp/vagrant; cd /var/tmp/vagrant

vagrant box add bento/centos-7.3 --provider=virtualbox
vagrant box list

http://www.vagrantbox.es/

vagrant box add centos-6.7  https://github.com/CommanderK5/packer-centos-template/releases/download/0.6.7/vagrant-centos-6.7.box