Virtual FileMaker Development Environment

Recently, I’ve switched to using virtual machines for almost all of my web development environments and it has been fantastic. With tools like vagrant and virtual box, it’s incredibly simple to start up and shut down virtual machines that are tailored to your project. I was really wishing that I could do the same thing with my FileMaker development environment … so I set one up. There are plenty of articles out on the web that explain why virtual development environments are advantageous, that’s not what I want to cover. I want to cover the how.

Caveats

To make a virtual development environment for use with FileMaker Server, you have two (2) OS flavor choices: MacOS or Windows. I’m more comfortable with nix environments; so, I’m writing my outline for a mac setup. If enough people tweet me, asking for the windows version, I’ll write another post. Also, to be able to legally use Mavericks as a virtual machine, you must be on a mac, running mavericks.  The other caveat, which should be obvious, is you have to own a license for FileMaker Server and you need FileMaker Pro or FileMaker Pro Advanced installed on your local machine. This blog post assumes that you’ve already downloaded the installer for FileMaker Server and have your licensing information handy. With that out of the way, let’s get into the instructions.

Recommended Computer Specs

Running virtual machines requires a bit of horse power. These specs aren’t required, but they’re strongly suggested:

  • Macbook Pro ____ or newer
  • 8gb of ram or more
  • At least 30gb of free space on your Hard Drive
  • An SSD is preferable

Downloads

Virtual Box

To set up your virtual environment you’ll need an application to run the virtual machine. There are several applications you can use: VMWare Fusion (pay), Paralells (pay), and Virtual Box (free). I’ll be using Virtual Box for this demo. Download Virtual Box and install it.

Mavericks

Open up the App Store and search for Mavericks. Once you find OS X Mavericks, click download. You’ll get a message notifying you that Mavericks is already installed on your computer. Click “Continue”. Once you’ve logged in with your iCloud account the download will start. Once the download is finished the installer will automatically launch. You can close it out. The Installer will have been download to your Applications folder and named “Install OS X Mavericks”.

Ruby

A step in these instructions requires a ruby gem called iesd to allow the virtual machine to use the Mavericks installer as a boot drive. Before you get started make sure you have ruby installed and the iesd gem installed.

Installing your Mavericks VM

  Open Virtual Box.   Initiate the New Machine creation:

  • From the menu options, select Machine -> New
  • On the naming screen, give your VM a name, e.g. FileMaker Server 13 VM
  • Select the type Mac OS X
  • Select the version Mac OS X (64-bit)
  • screenshot

Allocate memory:

  • By default, Virtual Box will allocate 2gb of memory. Mavericks requires at least 2gb of ram to run so you can leave it at 2048mb or increase it
    • Something to keep in mind is that when you give more memory to a virtual machine, you’re creating more overhead for the application running the VM which could possibly slow performance.

Create a Virtual Hard Drive Virtual Box gives you several options as far as specifying what disk your Virtual Machine will use as a hard drive.

  • For our purposes we’ll want to select Create a Virtual Hard Drive now.
  • A drop down screen will display asking you which format you want to use. Select VDI (VirtualBox Disk Image)
    • Using a different format will allow you to more easily use the image with different virtualizing application
    • I suggest using VDI because:
      • You’ll likely not use the image with another software
      • It’s easier to manipulate the image after the fact (e.g. resizing the image if you start to run out of space) using the VirtualBox tools if it’s a VDI format
  • The next screen will ask you how you want to handle the size.
    • I know that I have a large amount of free space on my computer’s drive so I prefer a Fixed Size. That way I always know the footprint my image will take up
    • Dynamic sizing may be more convenient for you, but if you pick this remember two things:
      • You’ll need to keep an eye out for your drive running out of free space as your image grows and as you put more files on the drive either in or out of the VM
      • The image size does not shrink if you delete files from your virtual machine’s hard drive, i.e. you can go up in size but you’ll never go back down
  • The next screen will ask you to select your file location and size
    • For location,
      • I would suggest storing the virtual machine and any other machine in a specific sub folder like ~/virtualMachines. I’m using the Desktop as a demo location only
      • Name your image something like FileMakerServerVMHD
    • For size,
      • you have to remember that you need to account for the OS, FileMaker Server, any other applications you’d want to install, and any Databases you host on the server
      • I would suggest a 20 to 30 gb hard drive 
    • Once you click continue, VirtualBox will start creating your Virtual Machine

Installing Mavericks Now we need to install mavericks on the virtual machine. To do so, we need to tell VirtualBox to use our Mavericks installer as the boot drive. To do this we’ll use the ruby gem iesd:

  • Open the terminal and change to the directory where your “Install OS X Mavericks” file is located, in my case it’s on the desktop:
    • cd ~/Desktop
  • Run the iesd command to pull out and prepare an installer “dvd”:
    • iesd -i "Install OS X Mavericks.app" -o "~/Desktop/MavericksInstaller.dmg" -t BaseSystem

This will create a new dmg on your desktop called MavericksInstaller.dmg. Now you can tell VirtualBox to use this as the boot disk:

  • Select your virtual machine in VirtualBox and click the Settings button
  • Select the Storage tab
  • Click on the Controller: SATA line
  • An icon of a DVD with a plus sign over it will appear. Click that icon
  • From the drop down screen click the Choose Disk button
  • In the dialog box that appears, point to the MavericksInstaller.dmg file on your desktop

Now when you start the virtual machine, it will use the MavericksInstaller.dmg as the boot disk. Start the machine. From here you’ll see a lot of command line text. This is your OS starting up in verbose mode. Once it’s done, you will walk through the steps of installing Mavericks as you would on any other computer. I’m not going to outline those steps here.