Vagrant VM for HipHop VM
Shell PHP
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.



Setup a test environment for HHVM.

The final VM will contain HHVM, Nginx, PHP, MySQL, ab.



Clone the repository:

$ git clone
$ cd hhvm-vagrant-vm

And copy your project source into this folder:

$ cp -R /var/www/site/* ./

Finally, you should run:

$ vagrant up

By default the VM uses 2GB of memory and 4 CPU core. If you want to use more memory or cores you can edit this settings directly in the Vagrantfile.

If something goes wrong (i.e. insufficient memory when compiling HHVM), you can log into the virtual machine and run building HHVM manually:

$ vagrant ssh
$ sudo -s
$ cd /root/dev/hhvm
$ export CMAKE_PREFIX_PATH=`pwd`/..
$ make -j3

Once everything is done you can log into the virtual machine, setup your project in /var/www/site folder:

$ vagrant ssh
$ cd /var/www/site
$ ...

Start HHVM:

$ sudo /etc/init.d/hhvm start

Now you can browse your project on the host machine by entering for serving site using PHP-FPM and for serving site using HHVM.

Virtual Machine Management

When done just log out with ^D and suspend the virtual machine

$ vagrant suspend

then, resume to testing again

$ vagrant resume


$ vagrant halt

to shutdown the virtual machine, and

$ vagrant up

to boot it again.

You can find out the state of a virtual machine anytime by invoking

$ vagrant status

Finally, to completely wipe the virtual machine from the disk destroying all its contents:

$ vagrant destroy


  • Virtual Machine user/password: vagrant/vagrant
  • Serving site using PHP:
  • Serving site using HHVM:
  • SSH into your vm using your favorite ssh client: ssh:// (username+password: "vagrant")
  • Start nginx: sudo /etc/init.d/nginx start
  • Start php-fpm: sudo /etc/init.d/php5-fpm start
  • Start HHVM: sudo /etc/init.d/hhvm start


For building latest version of HHVM you should run the following command on the host machine:

$ vagrant destroy && vagrant up