cd GOAD vagrant plugin install vagrant-vmware-desktop
修改 Vagrantfile
改为调用VMware创建虚拟机
1 2 3
# Uncomment this depending on the provider you want to use #ENV['VAGRANT_DEFAULT_PROVIDER'] = 'virtualbox' ENV['VAGRANT_DEFAULT_PROVIDER']='vmware_desktop'
顺带修改下CPU与内存,电脑足够强可不修改,默认即可。
1 2 3 4
config.vm.provider"vmware_desktop"do|v| v.vmx["memsize"]="4096" v.vmx["numvcpus"]="1" end
修改ansible\hosts
注释 29-30行,开启33-34行
1 2 3 4 5 6 7
; adapter created by vagrant and virtualbox (comment if you use vmware) ; nat_adapter=Ethernet ; domain_adapter=Ethernet 2
; adapter created by vagrant and vmware (uncomment if you use vmware) nat_adapter=Ethernet0 domain_adapter=Ethernet1
构建VM
执行 vagrant up 创建并下载五个虚拟机。漫长的等待后显示以下内容,即表示所有vm已成功创建并运行。