Creating Virtual Machines for multiple purposes.
- single CPU
- 64-bit
- 1024 MB RAM
- Virtual Disk Image (VDI) and
- 80 GB space
- Dynamically allocated disk space.
Before we began the installation of Ubuntu, one question that
arose in our minds was whether we could deploy the same VM on
the second server but configured differently to support a
groupware product like
Kolab . So we quickly
decided to first create a Ubuntu VM with a base install of the
server and then
clone this base VM as many times as needed. Thankfully,
cloning support is built into VirtualBox. So we started the VM,
booted off the ISO and installed Linux with only the SSH
daemon. Once the installation was complete, we rebooted the
Linux VM and patched it with updates using
sudo apt-get update && sudo apt-get upgrade
The base install was ready. We once again shut down the
VM and quickly created two clones. We ensured that the check
boxes for the MAC addresses to be re-initalized were ticked so
that the NICs of the two VMs would have distinct MAC
addresses. Otherwise ARP was going to go bonkers :-) We booted
the first clone and installed
git ,
LAMP as well as configured additional users that were
expected to administer the system. The second clone was booted
and checked to verify it was okay. The remaining configuration
of the two servers is still underway. I shall report on that in
another article.
This however gave me another idea. For a long time now, I
have wanted to re-visit some old DOS games but of course they
don't work in modern systems very well. Would a VM work? A
little bit of googling and turned out that yes, someone had
already
made it work! So quick as a flash I created a VM with
500MB disk space which booted
MS DOS 6.22 . Great. Copying files into the DOS VM is tricky
on some systems. There is a clever trick that I used to copy
over files from my host to the VM (essentially some hacked
CONFIG.SYS and HIMEM.SYS files etc.). The trick uses the fact
that DOS can recognize ISO 9660 format CDs. So if I could copy
over my old DOS games
( Day of
the Tentacle anyone?) onto a virtual CD (.iso), then I
could load that virtual CD into the DOS VM. Turns out you can
convert any arbitary directory into a ISO 9660 .iso file using a
tool called mkisofs on Linux. I used mkisofs to create an iso
file from the directories containing the utilities using the
command
mkisofs -J -allow-leading-dots -R -V “Utils”
-iso-level 4 -o ./configfiles.iso DOSFiles/
This created a file with the name configfiles.iso which
was quickly mapped onto the CDROM drive of the VM through the
VirtualBox menu. Voila! Instant access to the files on the host
without requiring them to be first copied into the VM and then
deleted once their use is done. That's it for now. I will get
back to you after re-living some DOTT!