Want to distribute Linux virtual machine for students to work on
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.
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
Will:
- Download the base image you have chosen.
- Configure the virtual hardware and network (NAT for example).
- Configure shared folders between the host and the virtual machine.
- Run the provision scripts you wrote.
- Run the machine and manage simple SSH access through
vagrant ssh
.
A single Vagrantfile can also handle specificities of Windows or Mac hosts.
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.
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.