oinume journal

Scratchpad of what I learned

Make VirtualBox's network faster with paravirtualized network adapter

I develop applications with Vagrant and VirtualBox and feel frustrated about slowness of VirtualBox. Since I found virtio (paravirtualized network adapter), I tried it out on my application.

How to enable virtio with Vagrant

Add following lines into your Vagrantfile.

v.customize ["modifyvm", :id, "--nictype1", "virtio"]
v.customize ["modifyvm", :id, "--nictype2", "virtio"]

Results

I ran time vagrant provision with old and new settings and virtio-net is 1.2x faster than 82540EM (default network adapter).

  • vagrant provision 14.85s user 12.49s system 5% cpu 8:20.59 total with Intel PRO/1000 MT Desktop (82540EM)
  • vagrant provision 14.63s user 12.62s system 6% cpu 7:00.70 total with virtio-net

Ansible: Up and Running

Ansible: Up and Running