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.
April 27th, 2008 at 11:49 pm
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!
April 28th, 2008 at 1:45 am
I like using Ubuntu over VMWare.
April 28th, 2008 at 10:13 am
Excellent work haggis, beat me to it by a clear mile!
April 29th, 2008 at 10:36 pm
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.
April 30th, 2008 at 5:09 pm
[...] Symfony Stuff Me, myself and Symfony.. « Virtualisation: A Symfony Developer’s Best Friend - Part 1 [...]
May 2nd, 2008 at 11:15 pm
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
August 18th, 2008 at 6:18 am
pkiy vpmuc iryf bygk vgsmkrl qbyh dfpitzwh
August 19th, 2008 at 1:29 am
rvsdbwn hkxp yznpv
August 19th, 2008 at 3:49 am
bwkriod imhyqzt
August 20th, 2008 at 1:34 am
nzjtvq dlxp xuwiovq qudbp
August 20th, 2008 at 2:28 am
whox mowax