Every now and then I'd like to play with a fresh minimal install of Ubuntu (to test sysadminish scripts, application install instructions, package dependency lists etc.).
I'd like to have a tool as simple to use as testdrive: pick a version (say, 'maverick'), run a command, get a shell in a new virtual machine.
I'd like that shell to be in the current terminal, rather than a new GUI window that testdrive uses. Setting up the new VM to accept SSH logins with my ssh public key is fine.
I'd like the VM to have network access out of the box; NAT to a virtual network interface is fine.
Why a VM? Chroots don't really cut it: installing, say, Apache in a chroot would fail because it would try to listen on port 80, which is already taken. Containers might work, though, if there are any that are supported by standard Ubuntu kernels.
First, I think this is an excellent suggestion, and definitely something that TestDrive could/should support!
In the meantime, you can grab a UEC image, untar it, and launch it in KVM:
Enjoy!
You can also use TestDrive to launch a UEc Server Image. The way you can use it is:
When launching, it will show you grub, where you should select:
You could also use TestDrive as follows, to specify the release. By default it will use natty:
Vagrant, while still not present in the standard Ubuntu repositories, now has a ready-to-use .deb and now works with virtualbox-ose.
Installation is as simple as
sudo dpkg -i vagrant_1.0.0_i686.deb
sudo ln -s /opt/vagrant/bin/vagrant /usr/local/bin
to make it appear on your $PATHUsage is as simple as
vagrant box add lucid32 http://files.vagrantup.com/lucid32.box
(once)mkdir sandbox && cd sandbox && vagrant init lucid32
(creates a ./Vagrantfile you can customize if you want)vagrant up && vagrant ssh
(you're now in a shell session inside a new VM)vagrant suspend
(orhalt
, ordestroy
) when you're done.