Some hacking – Using Keka to import data from OS X to my VMs

Ever since I started using VirtualBox, I have needed a way to get data from my host operating system (Mac OS X) to the guests. This data includes drivers that I want to install in the guest, and programs and games that I want to run in the guest.

Sure there’s Guest Additions, but that has its own problems. For one thing, it only works with Mac, Windows, and Linux guests; there’s no drag-and-drop feature for things like DOS. Secondly, it requires the guest to have Internet access so you can install the guest addition drivers; if I have Internet access, then all I need to do is just email the files to myself in the host and download them in the guest. So basically, guest additions are merely a convenience that makes the already possible more practical; they do not enable you to do anything you couldn’t do before.

I realized my best bet for guests that either don’t have networking drivers installed or aren’t in the Mac/Windows/Linux category would be to find a way to turn the directories in my OS X filesystem into disk images, either floppy images or ISO files, so I could then insert them into the virtual drives of my VMs. I found a utility called Keka, which can be downloaded here. Keka is a file compression, extraction, and archiving utility for OS X. It can archive or compress files in several formats, and it can extract even more formats. Formats it creates include zip, gzip, bzip2, 7zip, tar, DMG, and ISO.

Keka

Though it is a graphical program, the interface for Keka isn’t particularly intuitive. It allows you to select a format to archive a directory to, but gives no indication of how to select a directory for archiving.  Through wild guesswork I discovered that you can do this by dragging the icon for the directory into the Keka window, after which it will automatically create an archive in the selected format.  Who knew?

The next step is of course to insert the newly created ISO into my virtual machines.  I can only do this with VMs that recognize optical disks, obviously, so MS-DOS 5.0 doesn’t work.  However, I was able to import Deluxe Paint into my FreeDOS VM.  I’m in the process of trying to import Norton Commander.

Storage

As an experiment, I tried converting some of the DOS folders to ISO files and using them to install software directly, as if they were floppies.  This didn’t work, because the installers require the disk to be mounted on drive A.  Obviously I wouldn’t be able to just change the extension, because it would still have the ISO-9660 filesystem, rather than the FAT filesystem, and it wouldn’t be recognized as a floppy.

Yeah, I kinda figured that wouldn’t work.

I’ve also tried using some software and games in VMs that I’m running on live ISOs, but there were some problems.  First, VirtualBox only allows for one optical drive.  You can work around this limitation by adding a USB drive and telling the VM to treat it as an optical drive, but when I did this, the VM tried to boot from the wrong ISO.  Maybe I should select the “Live CD/DVD” option.

Advertisements