Search code examples
virtualizationvirtualboxvagrant

Should I use VirtualBox on a production server?


I just completed my vagrant box for a product that made by my company. I needed that because we're running same product on different operating systems. I want to serve sites inside virtual machines, I have questions:

  1. Am I on correct way? Can a virtual machine used as production server?

If you say yes:

  1. How should I keep virtualbox running? Are there any script or sth to restart if something crashes?
  2. What happens if somebody accidentally gives "vagrant destroy" command? What should I do if I don't want to lose my database and user uploaded files?
  3. We have some import scripts that running every beginning of the month. sometimes they're using 7gb ram (running 1500 lines of mysql code with lots of asynchronised instances). Can it be dangerous to run inside VirtualBox?
  4. Are there any case study blog post about this?

Solution

  • Vagrant is mainly for Development environment. I personally recommend using Type 1 hypervisor (Bare metal), VirtualBox is a desktop virtulization tool (Type 2, running on top of a traditional OS), not recommended for production.

    AWS is ok, the VMs are running as Xen guest, Xen is on bare metal;-)