Setup of native Windows testing environment under Linux (Ubuntu)

Featured Image

Greetings everyone! Today I’ll explain how to setup native testing environment for major browsers on Ubuntu. Or to be exact on VirtualBox (with Windows XP). My assumption is that you have installed WAMP under Linux and you have a working project on localhost. If you perhaps didn’t understand something in this brief introduction, please do “google it“. 😀

If you’ve ever done any front-end coding for a website, you know what pain in the ass cross-browser compatibility can be. And If you’re developing on Linux (Ubuntu distribution in my case), you will have quite a problem with testing it out properly. There’s a much simpler solution for this (IEs 4 Linux, Opera, Firefox) but at the same time, its not the right solution because you won’t have Safari, IE 7 nor IE 8 (or even IE 9). The other big problem are MS fonts, that you cant render in 100% same way as on Windows.

The solution I find the best is to download “VirtualBox OSE” under Ubuntu and then install Windows through it. That way you will get both native environment for Internet Explorers and for other browsers. So, my idea was to guide you through the process of setting it up.

Installation itself on Ubuntu is pretty much simple:

  1. Go to Application -> Ubuntu Software Center and download VirtualBox OSE.
  2. When you’re done, you need to get ISO file of Windows installation CD / DVD
  3. Start the VirtualBox OSE (on Application -> Accessories menu)
  4. Press the “New” button, and follow the instructions (let’s call our windows – “Virtual XP” for this example).
  5. After you set it up, right click on “Virtual XP” and go to “Settings”
  6. Under “Storage” part of the settings, you will have both your virtual disc and your CD / DVD drive already setup, so select the CD / DVD drive and on right side  click on open icon
  7. Again, click on “New” button in Virtual Media Manager window
  8. Now navigate through your file system and locate your Windows XP image file
  9. After you open it, just set focus on it and click “Select”
  10. You should now see “CD/DVD Device: your_image_file.iso” – if so click “OK”
  11. Locate “Virtual XP” on VirtualBox OSE default widow and double-click it
  12. Your ISO file should boot at this moment, and you just need to follow Windows installation instructions
  13. After you install the Windows, you just need to download and install browsers

Note: You can choose other version of Windows if you wish, but You might do some specific changes that I haven’t described here.

And now to the fun part – setting up our “Virtual XP” to connect to our LAMP server on Linux.

  1. Open up Network Connections on Ubuntu (System -> Preferences -> Network Connections), edit your network connection
  2. Go to “IPv4 Settings” tab, and add yourself a fixed IP. In our example, I used “” with gateway “” (if you aren’t certain how IPs, Gateways and Netmasks work – look here)
  3. Navigate to “?C:\Windows\System32\drivers\etc” and open hosts file with Notepad.
  4. enter this line at the bottom of the file: “      mysite.loc” where “mysite.loc” is your virtual host you setup on LAMP.
  5. Save the file.
  6. Open “mysite.loc” in browser you wish to test it out in, and enjoy the magic 😀

That’s about it. I hope you’ve learned something here today, and that this article helped you.

Until next time, bye!


  1. I’ve opened 300MB sql dumps in TextPad and edited them, the tools are there that will do it.

    As you said, it flows both ways despite what anyone says.

    The main point we both are making is that you can have both worlds so your development environment actually works to allow for real world presentation of your website.

    I just got really tired of a noisy and inadequate pair of computers here and since my day job runs on the Windows platform, it’s the host system for Linux which provides the server environment, which mirrors the actual dedicated Linux server at work.

  2. Hi,

    I agree that it could go reverse. But my choice of OS is Linux as back-end developer. And I’m used to develop on it. So in this specific case, this is my choice. And I agree that working with Windows and Magento can be a nightmare.

    For example 150+ MB of SQL dump, and I needed to replace domains inside it. Vim did it in 30 sec or so, and I’m unsure can it be even opened on Windows… 😀

    But I don’t want flame to get started (Windows or Linux) and I’ll say that this is MY opinion, and I’m sure this goes both ways.

    Thanks for reply! 😉

  3. Or do the reverse. I’ve been running Ubuntu as a Virtual PC machine on Windows 7 Professional. With a quad core processor and 8GB of memory you can give Linux 2GB memory and have the real equivalent of a second single processor computer running LAMP.

    The beginning of most peoples problems developing on Magento starts with WAMP on Windows XP. Dump it, you’ll be far happier running your test server on a native environment. Plus it makes moving your live environment to the test as easy as a tarball and sql dump restore.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <blockquote cite=""> <code> <del datetime=""> <em> <s> <strike> <strong>. You may use following syntax for source code: <pre><code>$current = "Inchoo";</code></pre>.