Sunday, July 24, 2016

Setting up a freebsd box with Vagrant

It makes sense to be able to spin up a freebsd system to use as for test of new ideas and concepts. It is also a good way for one to familiarize himself with the platform and experiment with new settings and technologies.

One of the easiest ways to do this is to use Vagrant. All it is needed is the following Vagrantfile:

# -*- mode: ruby -*-"
# vi: set ft=ruby :

box_type  = "freebsd/FreeBSD-10.3-RELEASE"

Vagrant.configure("2") do |config|
  config.vm.box = "#{box_type}"
  config.vm.synced_folder ".", "/vagrant", :disabled => true
  config.vbguest.auto_update = false
  config.ssh.shell = "sh"
  config.vm.base_mac = "080027D14C66"

  config.vm.provider :virtualbox do |vb|
    vb.customize ["modifyvm", :id, "--memory", "1024"]
    vb.customize ["modifyvm", :id, "--cpus", "1"]
    vb.customize ["modifyvm", :id, "--hwvirtex", "on"]
    vb.customize ["modifyvm", :id, "--audio", "none"]
    vb.customize ["modifyvm", :id, "--nictype1", "virtio"]
    vb.customize ["modifyvm", :id, "--nictype2", "virtio"]
  end

end

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.