Virtualisation: A Symfony Developer’s Best Friend - Part 1

At any given time, I have about 3-4 web app ideas floating around in my cranium. I like to test theories, assemble rough prototypes and basically braindump onto some virtual “paper”. My development platform of choice is FreeBSD, which I have used consistently for the past 10 years. I’m command-line through and through, baby, so you better get used to it! I like using Windows, but not as a development environment, and I believe I don’t look metrosexual enough to own a Mac (I lack the sweaters and “sports-casual” look).

Unfortunately, renting a FreeBSD box isn’t the most cost-effective option as a testbed for Symfony doodling, which brings me to the crux of this article. Wouldn’t it be wonderful if I could mix the pointy-clickyness of Windows with the stability and flexibility of FreeBSD?

Well, dear reader, you can. VMware Server is not only your friend, it is your saviour. Allow me to park this rambling narrative for a few moments in favour of a website quote:

“Begin enjoying the benefits of server virtualization with the free VMware Server. VMware Server installs on any existing server hardware and partitions a physical server into multiple virtual machines by abstracting processor, memory, storage and networking resources, giving you greater hardware utilization and flexibility. Streamline software development and testing and simplify server provisioning as you utilize the ability to “build once, deploy many times.”

Free!! That’s the best price!! Okay, now we’ve established our base, we need to find a way of smothering it with a layer of hot, melted FreeBSD. We could create a virtual machine from scratch using the FreeBSD ISOs, but wouldn’t it be nice if we could somehow source a pre-built bundle replete with .vmx configuration file? Thankfully, you can grab the latest VMs from the lovely people over at Thoughtpolice - the latest build of FreeBSD that they cater for is 7.0 and they even give you a whizz-bang guide on how to get up and running in less than a minute. Here’s a nice bulleted list for those who hate extracting information from meandering commentary:

  • Download and install the latest version of VMware Server from the VMware website
  • Download the FreeBSD VM via BitTorrent, and extract the archive to a sensible location on your PC
  • Read the “FreeBSD 7.0 in 1 minute” guide
  • Run VMware Server Console, select “Local host” and click “OK
  • Click on “Open Existing Virtual Machine
  • Navigate to the place you saved your VM, then open the “freebsd-7.0-i386.vmx” file
  • You will see a breakdown of the resources available to your VM, so adjust them accordingly. I can recommend the following settings, if your PC is fairly recent and has >2GB RAM available:
    • Memory: 384MB (more than enough, but I like the number)
    • Ethernet: Bridged (I have a cable router, so I bridge onto the network in order to map ports between my internal LAN and my external interface - if you have problems doing this, select NAT)
    • Processors: 1 (if you have a multi-core processor, you will run into some mild TSC/timestamp issues initially despite only specifying a single processor here - I will show you how to fix this later on)
    • Leave everything else as default!
  • When you’re happy, click “Start this virtual machine” - you will be prompted to create a new UUID, so select “Create” and click “OK
  • Your VM will start up - cue lots of scrolling jargon that you don’t really need to pay attention to!
  • You will eventually arrive at a “login:” prompt - congratulations, you made it!
  • Log in as “root” using the password “thoughtpolice
  • This is as far as we want to go just now, so issue the command “shutdown -h now” in order to shutdown your VM - wait for confirmation that it is safe to power off, then do so by clicking the big red STOP button in the toolbar at the top of your VM’s window
  • You will be taken back to the VM information screen - close down the application, in your own time of course
  • You’re done! Well, for the time being at least

That was easy, wasn’t it? Believe me, we’ve only just scratched the surface! Stay tuned for the next installment.

This entry was posted on Sunday, April 27th, 2008 at 11:39 am and is filed under Tutorial. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

12 Responses to “Virtualisation: A Symfony Developer’s Best Friend - Part 1”

  1. halfer Says:

    Nice to see you blogging, superhaggis!

    I agree, VMWare Server is pretty good. I installed it on Vista a while back, and a predefined linux image - downloaded from the net - worked like a charm and feels really stable. The only trouble is that Apache 2.2.x has been so good on Vista, I’ve not actually /used/ the VMWare installation!

  2. Josh Says:

    I like using Ubuntu over VMWare.

  3. catchamonkey Says:

    Excellent work haggis, beat me to it by a clear mile!

  4. brett Says:

    Great post. I use VMWare Fusion on OS 10.5. I’ve installed Ubuntu as a local development server. When I am ready to deploy. I simply deploy from the VM to the production server. Everything works great. Be sure to install the VMWare Tools. That makes life a lot better when switching from Mac to the VM.

  5. Virtualisation: A Symfony Developer’s Best Friend - Part 2 « Symfony Stuff Says:

    [...] Symfony Stuff Me, myself and Symfony.. « Virtualisation: A Symfony Developer’s Best Friend - Part 1 [...]

  6. neonard0 Says:

    Great work! for those who want more information about the networking between the host and the guest machine I’ve found this great post:
    http://www.supinfo-projects.com/en/2006/virtual_network/introduction/

    It has a clear example and the information you need to start playing with the Virtual Network

  7. tjqm htvpnk Says:

    pkiy vpmuc iryf bygk vgsmkrl qbyh dfpitzwh

  8. olympic Says:

    rvsdbwn hkxp yznpv

  9. white Says:

    bwkriod imhyqzt

  10. warden staff wow warhammer ogre army list warcraft tft no cd crack Says:

    nzjtvq dlxp xuwiovq qudbp

  11. water Says:

    whox mowax

  12. Virginia Says:

    Ran in front locomotive, which arrived late.

Leave a Reply