QEMU is an emulator. It is available for Raspberry Pi and it can emulate old versions of Ubuntu and other OSes without installing them onto your Raspberry Pi.
Find the .img file that contains your desired OS.
Type into the terminal:
qemu-system-i386 -m 256M -hdd osname.img
Replace 256 with the amount of RAM (in megabytes) you want the Virtual Machine to have. The more intensive the OS, the more RAM Required. 128M is the Max on 256MB Raspberry Pis. On 512MB Raspberry Pis, you can use 450M. On 1GB Raspberry Pis, you can use 750M.
If you need unofficial help with QEMU, comment on this post with your question.
Cheers!
Epic Chas Gamer 😀