I have students running Mac and Windows. Every semester, there are always lots of questions about how to install tool “X”. I would like to create a single Linux virtual machine (I have tried VirtualBox) and distribute the image. That way, all the tools are preinstalled, and everyone is using Linux.

The question is, given people have different graphics hardware, how does this work? Or does it work? And if it does, how do I distribute it? Do they have to install VirtualBox, then load some file I give them, or can I create a single installer easily?

  • 13
    Virtualbox allow you to export an Appliance. That file can be imported in any virtualization software (VMWare, Virtualbox etc.) and configures itself to the local hardware. This seems to be what you are asking for. A single installer is not possible, because you can't run the same program on WIndows (.exe) and Mac (.app).
    – GiantTree
    Aug 30, 2015 at 17:51
  • Do I have to install again differently, or can I save my virtual machine as an appliance?
    – Dov
    Aug 30, 2015 at 17:54
  • You can save any virtual machine as an Appliance in Virtualbox. Just do: File -> Export Appliance Ctrl+E
    – GiantTree
    Aug 30, 2015 at 17:55
  • Some are suggesting Vagrant as a solution as file size may be an issue during downloads of your appliance file. Truth be told, if you install a minimalistic environment and use thin provisioning when creating the virtual HD, you might end up with a very do-able 100MB or less file. Just wanted to add that in there since no one else addressed it.
    – Geruta
    Aug 31, 2015 at 0:28
  • 1
    @gronostaj: Sounds kinda like this poor VM got catched in the matrix! :O
    – Zaibis
    Sep 1, 2015 at 9:36

5 Answers 5


I like mperrin’s Vagrant-centric answer, but as you might see from the comments there, my personal opinion is to “keep it simple” and I would recommend a simple export of a VirtualBox OVA as you have configured and passing that along to your students.

That said, you ask this:

The question is, given people have different graphics hardware, how does this work? Or does it work? And if it does, how do I distribute it? Do they have to install VirtualBox, then load some file I give them, or can I create a single installer easily?

Veering into DevOps

I’m not too sure what you are teaching or doing or what you expect your students to get out of this whole exercise, but a lot of the concerns you are airing veer into the realm of DevOps (development and operations) and you might want to consider mixing that concept into your teachings.

Now I don’t think the whole concept of DevOps needs to be conveyed, but in my mind your creation of a stable VirtualBox OVA that you then pass onto students and ask them to use on their home/school machines would definitely open a door to questions about how one should deal with different hardware/system setups and how one might adapt.

So my recommendation for you is to strongly recommend that students use the VirtualBox OVA you would setup, but also be open to allowing students to simply install tools on their own. My gut tells me 95%—or more—of the students would happily and easily use the VirtualBox OVA method, but you can’t expect it to be 100% perfect.

Perhaps in the end you should just have some baseline of requirements for course tool usage and be flexible in their implementation.

Be Flexible Regarding How Tools are Used

For example, I do lots of PHP development and do systems administration/DevOps related to PHP development. And since I am on a Mac I prefer to use MAMP for local development. But I work with developers who use Linux or Windows for their development. Heck, some like using Vagrant coupled with VirtualBox for their LAMP development needs. And my attitude is I don’t care what their base OS setup is. As long as their PHP version is inline with the versions my clients use, I’m fine with whatever.

Occasionally a developer will state a bug is caused because—for example—code I have tested on MAMP is “not the same” as what would be on a Linux LAMP setup. And I say with 100% confidence, that I have always proven the issue is not the base OS but rather the PHP coding itself.

So all this blather is to basically convey the following: Just be flexible in your explanation of the use of a VirtualBox setup to the students and don’t expect spoon-feeding an OS to simply end all problems. It might knock 95% of your issues out of the park, but that remaining 5% will always have to be addressed in some way. So look at a VirtualBox setup—and perhaps a Vagrant script—as a tool that can be used in an arsenal to make life easier for some, but not necessarily the end-all solution for all issues.

  • 3
    teaching C++, java, Data structures, and this is an attempt to get away from sysadmin/devops which doesn't interest me!
    – Dov
    Aug 31, 2015 at 2:48
  • 1
    @Dov Well, if that is the case, exporting a VirtualBox OVA and distributing that to folks in your class is the best way to go. Aug 31, 2015 at 3:16

You should have a look to Vagrant.

Vagrant supports VirtualBox and allows you to:

Create and configure lightweight, reproducible, and portable development environments.

It will be much easier to share a single or bunch of text files than a big export of VirtualBox image. Especially if you want to manage updates.

Once VirtualBox and Vagrant are installed a simple:

vagrant up


A single Vagrantfile can also handle specificities of Windows or Mac hosts.

  • 7
    While Vagrant is not a bad idea, simply exporting a VirtualBox appliance, instructing students to install VirtualBox and then having them import that appliance into VirtualBox gets the job done in a few steps without Vagrant literally rebuilding a machine from scratch or having the risk of Vagrant idiosyncrasies popping into the mix. Aug 30, 2015 at 21:35
  • 1
    You're right, exports are surely the most straight forward and simplest approach. But depending on the needs, i thought vagrant has to be mentioned here. Managing uploads / downloads of large ova files can be problematic especially if updates needs to be done on a per project basis. More comparison on the two approaches can be found in this very good thread superuser.com/questions/584100/…
    – mperrin
    Aug 30, 2015 at 21:55
  • Pretty good notes on that other post. My feeling is this: If you feel you need Vagrant for deploying more than 2 servers via scripting, go for it. But for most desktop users and simple developers, just “rolling your own” via VirtualBox works just as well. Aug 30, 2015 at 22:19
  • 1
    In your case, another advantage of vagrant over an export is the ability for your students to learn the "how to" install and configure the image by inspecting the provisioning script. Much easier than going through the history of the image.
    – mperrin
    Aug 31, 2015 at 5:29

It wouldn't matter at all - virtualbox (and well every other virtualisation software )emulates its own video adaptor (IIRC cirrus logic). While the traditional virtualbox file's split up into different files for settings and storage, you can export it into an ovf file as suggested. If your students can install virtualbox or vmware it should be trivial. If not, they need to learn.

Installing virtualbox is fairly trivial (assuming you have hardware support).

There's a few things I'd suggest - keep the VM to 32 bit (so you don't need to worry about VT-X support on the host), creating a howto for installing virtualbox on the big 2 OSes (windows is straightforward, linux needs a few additional steps), and importing the OVF file. This also means if students want to use vmware player or the like they can. Use NAT for networking unless you need to run a server accessible from the outside.

If performance is not an issue, you probably could just bundle everything up into a QEMU instance (they can be set up to run self contained) and suitable startup scripts. I'd consider this a last resort.

I'd note many universities do actually supply a VM with suitable tools (IIRC stanfords CS 50 does this, and is a freely available course from edx), so it might be worth looking at how they do it.


As an alternative to most virtualization technology, Linux (e.g. Ubuntu) can be installed on a thumbdrive. Pretty much every computer will boot off a thumbdrive, and most modern installers will detect graphics cards/network cards at boot time. If you install a 32-bit Ubuntu, it will run on almost all hardware the people are likely to have at home.

They are easy to hand out, and don't require ANY additional installed software. They can also easily be moved from machine to machine - unplug from the school computer, put it in your pocket. When you get home, just plug it in.

They can be had fairly cheaply (I realize that school budgets are very limited!); depending on what application would be run on the machine, 4gb should be enough, perhaps 8gb.

  • Everyone in grad school has a laptop. I don't think there is a need for a usb.
    – Dov
    Aug 31, 2015 at 2:46
  • @Dov: Still, when students participate in different courses, it makes sense to have an isolated, disposable system for some of them, even if it always run on a laptop. It also offers the advantage of being able to use the complete hardware resources and reducing distractions.
    – MakisH
    Oct 9, 2020 at 14:31

Another option to consider. If you're not really worried about them having a GUI, you could use something like terminal.com.

You can create your own public snapshot and simply keep that available for your students. It's similar to the VirtualBox approach, but rather than installing the VMs on their own machine it's on the cloud someone else's machine.

Then all they need is a sufficiently modern web browser. And if they're interested they can set it up so they can use SSH/Putty/etc.

According to their figures, if the students are using the micro instance (256 MB RAM, a couple of GB disk space), if they pause the VM when they're not using it it would cost them $9/yr running it for 8h/day. I can't speak for terminal.com, but I suspect if you contacted them they may be able to provide you with some sort of educational discount.

  • A similar service is [SDF.org](sdf.org/?join)'s free public shell access for educators. Teach FAQ. Not a VM, but it's still good.
    – HSchmale
    Sep 1, 2015 at 12:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.