Muffinresearch Labs by Stuart Colville

Solved: VirtualBox Ubuntu Karmic Server VM crashes | Comments (0)

Posted in Code, Linux/Unix on 8th February 2010, 10:12 pm by Stuart

Had a weird issue when setting up an Ubuntu Karmic JEOS VM under VirtualBox. When it was installed it rebooted and then the VM window dissappeared. I tried to boot it a second time and it got to grub and then as soon as I selected the kernel I wanted to boot again it crashed.

Kernel logs were showing that VirtualBox was segfaulting. I decided to take a look at the VBox.log for the vm and I found this:

00:08:38.967 VM: Raising runtime error 'PAEmode' (fFlags=0x1)
00:08:38.967 Changing the VM state from 'RUNNING' to 'FATAL_ERROR'.
00:08:38.967 Console: VM runtime error: fatal=true , errorID=PAEmode
message="The guest is trying to switch to the PAE mode which is currently
disabled by default in VirtualBox. PAE support can be enabled using the
VM settings (General/Advanced)"

I then went into the advanced settings and turned on PAE. As soon as I did that the problem was solved and the VM booted without an issue.

Post Tools

Howto: SSH into VirtualBox 3 Linux Guests | Comments (1)

Posted in Code, Linux/Unix on 8th February 2010, 1:11 pm by Stuart

In a previous post I wrote about using a TAP interface to be able to SSH into linux guests from the host. Since then changes in the newer versions of VirtualBox have seen the addition of a virtual interface on the Host by default. This post details how to utilise this to allow communication from your host to your guests by simply configuring a second network interface on the guest.

Note: the same result can be used by using one bridged interface to a physical network interface. However, I prefer to do it this way as I’m using a laptop and I don’t know at what point I’ll be using a wired, wireless or 3G connection. The following config will always work irrespective of where you are. That said feel free to detail any experiences of alternative methods in the comments.

The following assumes you are using Linux as a host.

The process is very straightforward if you already have a linux VM or if you are creating one from scratch the process is essentially the same note if you are doing this prior to installing an OS the only thing to note is which interface should be your primary interface. In most case this should always be the NAT adapter. Here’s a screenshot showing the dialogue you’ll see when installing JEOS as an example.

All you need to do is access the settings when the guest is off and add a second network interface to the guest. By default you should have one interface already which is using NAT. This should be left alone as this provides access to the internet. Select the tab “Adapter 2″ and change “attached to” to “Host-only Adapter” this will have the name vboxnet0 by default.

screenshot showing virtualbox guest adapter2 being configured to use host-only networking

Once that’s set, boot the Guest image.

Once booted; from the console of the guest VM you’ll need to set-up the configuration for the second network interface in this case “eth1″ as we already have “eth0″ defined. To do this all you need to do is edit /etc/network/interfaces to add the eth1 configuration.

This is a simple as adding the following lines based on our vboxnet0 is configured to 192.168.56.1 (based on running ifconfig on the host.

auto eth1
iface eth1 inet static
    address 192.168.56.10
    netmask 255.255.255.0

Save this and then run the following to fire up eth1:

sudo ifup eth1

Note: If you haven’t already installed openssh-server now would be a good time to do so! sudo apt-get install openssh-server

Now you can drop into the terminal and ssh into your VM e.g:

ssh jeos@192.168.56.10

That’s it.

Post Tools

2009 | Comments (0)

Posted in General on 31st December 2009, 6:14 pm by Stuart

So that was 2009! It seemed to go by very quickly by all accounts. Here’s a few of my highlights from this year.

Birth of our third child

The most incredible thing that happened in 2009 was the birth of our beautiful daughter Molly in January. It’s been amazing this year watching her grow from being a tiny baby to having her own personality. Judging by how determined she is I’m sure she’s going to keep her Mum and Dad very busy over the coming months.

Project Fondue

Project Fondue a side project with former colleagues Ed Eliot and Cyril Doussin kicked off properly at the beginning of 2009. We released several utility sites such as Favicon Generator, Unix Permissions Calculator and reStructuredText API app. We’re busy working on new and exciting things for 2010 so expect to see those announced over at the Project Fondue blog in due course.

Switch from OSX to Linux

2009 was the year I switched from OSX to Ubuntu Linux as my primary OS. So far I’ve found it to be a wholly liberating experience and there’s very little I miss from OSX (apart from Together and Omnigraffle).

Linux has proven itself to be the most suitable OS for my needs and it’s made development very straightforward; mostly that’s thanks to the package management but also I really like to be able to use Gnu tools over their BSD counterparts as shipped with OSX without wrangling with macports and fink.

This year I’ve also taken the time to learn how to use vim properly as my primary editor. Textmate was great but I’m not held back at all by using vim and it comes with the benefit that it’s the same editor on my machine as it is on every server I work on. To see my vim config and plugins check out the following branch: https://code.edge.launchpad.net/~muffinresearch/+junk/dotvim

Another big part of using linux and open source software is that when something isn’t quite right or you want it to work in a different way it’s really easy to get involved and file a bug or create a patch for something. Using Linux you really come to appreciate this openness and I’ve found that because of this I’m tending to try and avoid using propriety software or devices powered by propriety software, for example when I get a new phone I’ll buy an Android phone rather than an iPhone.

In the hardware department the switch to Linux has meant it was time to say goodbye to Apple’s shiny machines with the exception of the MacBook Pro I’m currently running Ubuntu on at work. There’s no question that the Lenovo kit that I now use as my primary machine certainly appears to be far more robust/serviceable compared to anything I’ve used made by Apple. Though I’ll have a better idea of that in a year’s time as one and a half years seems to be the point at which Apple laptops start to break down from my experience.

Coding Projects

This year I’ve worked on quite a bit of code outside of my day to day work from the aforementioned Project Fondue apps to various libraries and modules. I’ve learnt a lot from working on applications that scratch an itch as it means you’re really driven to make that code the best it can be through using test-suites and re-factoring code to progressively move it forward.

In 2010 I plan to go back to any incomplete projects. Starting with my PyGTK Gmail notification app which is closely modelled on Google’s own notifer app for OSX (this will be up on launchpad in the new year). Having spent some time playing with PyGTK I’ve really enjoyed it and I’m looking forward to finishing that and maybe working on some other GUI apps with Python.

I also want to revisit other projects that have fallen by the wayside and either finish them or take the decision to shut them down where they’ve either served their purpose or been superseded. I’m also going to try and release any code I’ve been working but not put out there so that it’s available for other people to use/adopt/improve etc.

If you’re interested in checking out my current list of released projects then see my launchpad page for more info.

Something else that needs more work is python-yql a project for being able to use Yahoo Query Language from Python. I’d really like to get interested parties involved in 2010 with a view to improving python-yql and building out the token storage backends, improving the tests and adding a good set of examples.

Another thing I’m going to look to find time for in 2010 is to finally get my blog moved over to Zine from wordpress. We’ve been using Zine on the Project Fondue Blog and it’s been a pleasure to use. I’ll hopefully also have a little spare time to lend a hand actually contributing to the Zine project itself.

Events

I’ve not had a chance to go to many events this year with the exception of Euro DjangoCon in Prague which was really good and above expectations. Sadly I missed out on heading to SXSW this year and I’m not going in 2010 at the moment. Though just maybe I will return to Austin for SXSW 2011 – I’ll start saving now!

I did get the chance to go to LugRadio Live 2009 for the first time which was a really good event with lots of interesting presentations and a hilarious live show. Whilst this was “the last ever LugRadio Live” there was talk of a similar event being organised by the people behind OggCamp next year so that’s something to look out for.

Hopes for 2010

Here’s a big slice of wishful thinking for 2010!

I’d really like to see something happen in terms of making it possible for Distributed version control systems to work together. More recently I’ve been spending a little bit of time using both Mercurial and git to be able to work on a couple of difference projects hosted on bitbucket and github. However, it would be so much better if I could more easily contribute to projects that don’t user bazaar (my VCS of choice) without having to use several different clients. I’m not totally sure what the solution is here — branch mirrors in several VCS formats is one possibility but doesn’t really address the need to allow easy contribution and this kind of thing almost encourages forking of code away from the development of the original project.

It looks like bazaar is making some good in-roads into having some degree of interoperability with other VCSs through plugins such as the excellent bzr-svn and bzr-git but there’s a way to go. Ultimately it shouldn’t matter what VCS you or I prefer to use. What matters is that we can contribute to each other’s projects. Anyway I’ll probably extrapolate my thoughts on this subject in a future post.

My Second big wish for 2010 is to see a proper Python SDK for android. Whilst the scripting environment is cool it reminds me a little of PyS60 which never really went anywhere. I’d really like to be able to build an app with a Python SDK – not sure that will happen though.

In conclusion

It’s been a good year and I’m very much looking forward to what will happen in 2010. Here’s wishing everyone a Happy New Year and all the best for 2010!

Post Tools

Using Loggerhead with mod_wsgi|(0)

Here’s a post I wrote over on the Project Fondue Blog about our use of Loggerhead with mod_wsgi under Apache. Loggerhead is the rather nice branch viewer for bazaar branches as used on Launchpad.net.

If you’re not already subscribed to the Project Fondue blog feed then I can recommend it, as there should be some interesting posts coming out of there in the coming months (yes I’m unashamedly biased!).

Ubuntu: Turn off changing workspace with mouse wheel|(1)

I found the changing with the workspace with the mouse wheel really annoying. To disable it go to System => Preferences => CompizConfig (available if the compizconfig-settings-manager package is installed) and uncheck “Viewport Switcher” which is under the “Desktop” heading.

Photos on Flickr

© Copyright 2004-10 Stuart Colville, all rights reserved. May contain traces of Muffin. Powered by WordPress. Hosting by Slicehost.com This page was baked in 0.616s.