Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### Change here for more memory/cores ###
- VM_MEMORY=4096
- VM_CORES=4
- Vagrant.configure('2') do |config|
- config.vm.box = 'ubuntu/bionic64'
- config.vm.network "forwarded_port", guest: 8080, host: 8080
- config.vm.provider :vmware_fusion do |v, override|
- v.vmx['memsize'] = VM_MEMORY
- v.vmx['numvcpus'] = VM_CORES
- end
- config.vm.provider :virtualbox do |v, override|
- v.memory = VM_MEMORY
- v.cpus = VM_CORES
- required_plugins = %w( vagrant-vbguest )
- required_plugins.each do |plugin|
- system "vagrant plugin install #{plugin}" unless Vagrant.has_plugin? plugin
- end
- end
- config.vm.provision 'shell' do |s|
- s.inline = 'echo Setting up machine name'
- config.vm.provider :vmware_fusion do |v, override|
- v.vmx['displayname'] = "VM Name"
- end
- config.vm.provider :virtualbox do |v, override|
- v.name = "VM Name"
- end
- end
- config.vm.provision 'shell', privileged: true, inline:
- "apt-get -q update
- apt-get -q install nodejs -y
- apt-get -q -y autoremove
- apt-get -q -y clean
- update-locale LC_ALL=C"
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement