KVM/QEMU guest not shutting down?

One of my KVM/QEMU guests wasn’t shutting down correctly when the host issued the ACPI shutdown command.
Having checked that the guest’s XML definition included the <acpi/> tag in the <features>…</features> section, and that acpid was installed on the guest and that acpi-tools was installed on the guest, I realised that this was an Ubuntu 14.04 client O/S and therefore that it was doing something other than shutdown when it was told to. I believe that this will only happen on the “client” installs of Ubuntu – installing the server grade Ubuntu will not do this, although I’ve not confirmed this.
Essentially, the problem is that when the ACPI command to shutdown is received, the client version of Ubuntu will notice, and instead of actioning the request, will display a dialogue box on the console to the effect of “What do you really want to do, shutdown, restart, log-off or lock the screen?”. To change this, edit the file /etc/acpi/events/powerbtn (as root) and comment out the line reading:

add below it the line:


This will instruct the computer to poweroff when the power button ACPI event is received. Like I said, probably only a problem for the non-server versions of Ubuntu. Serves me right for not installing the correct Server OS, I suppose…

Updating PHP (or adding modules)

My first instinct when wanting to add a module to PHP is to hit the shell.  However, in cPanel, this is somewhat harder to do.  Especially as on my CentOS 5.4 x_64 build, yum appears to be broken irretrievably – I’ve installed the EPEL repo, but cannot select any software to install from it (I was after the php-mbstring package, I understand).

However, cPanel to the rescue.  Hit WHM as your root user, and go to “Software”.  In there, is an “Easy Apache” section.  Go through the “wizard” presented, and fill in the details you want (I’d base the settings on the existing build if I were you).  In step 5, use the “exhaustive options list” and select all the modules you want.

Having filled in the configuration filename, description and extended description boxes, push the “build” button and let cPanel chunter away for a bit.  You’ll then be asked about suExec and default PHP handlers for .php types.  Accept the defaults (or the settings you had last time if you’re conservative, although for me, these were the same) and away you go.  I’ve now got mysqli and mbstring (why aren’t these default modules anyway?) installed on the server.  No yum needed, Hurrah!

Windows 7 & ipv6

My windows 7 has been native ipv6 (dual stacked with legacy ip addresses) for quite some time. I’ve only just discovered how to get it to use a static IPv6 address over the autoconfigured IPv6 address (the reason is that the statically allocated ipv6 address is way more memorable than the MAC address of the windows 7’s wireless adapter).

Anyway; basically Windows 7 likes to use the autoconfigured ipv6 address in preference; we need to tell the stupid thing that the static one should be the default.
In an administrator command prompt, type:

netsh interface ipv6 show interfaces

And look for the interface name for the adapter that’s currently connecting you to the internet.

Using this name, type in the command:

netsh interface ipv6 set interface "<interface name>" advertise=enable managed=enable

Replace <interface name> with the name you found in step 1.  Keep the quotes, lose the angle brackets.

This will tell windows that you really know what you’re doing, and it can use the ipv6 address in the network connection’s ipv6 static dialog box (which you’d already configured fully, right?) and forget about that monstrousity it auto generated from the MAC address.  Job done.

IPv6 is here – happy days!

Well, ipv6 works. This may not come as a big surprise to some of you, but more specifically, I’ve got native IPv6 working on my ADSL line. Thanks to my ISP, I’ve managed to set up the ADSL modem to be bridged, and my main router uses PPPoE to connect to them to achieve connectivity.
The router is an RB750 which for 40 quid all-in is quite a bargain, by the way – and in version 5 of the OS it runs, it’ll do ipv6 over ppp! So I got the allocation from the ISP, plugged in the relevant things into the router (not forgetting the all important ::/0 default route to direct packets up the PPPoE link, thanks to Michael for the tip) and it’s all working.
ipv6.google.com resolves, connects, and displays a page.
Even better, so does http://www.ipv6porn.co.nz/

IPv6 on the horizon

In the latest of the sporadic updates, I’m preparing my home internet for IPv6 with the little routerbox. I’ve enabled PPPoE logins, and my ISP is preparing a set of IPv6 addresses to route at me. With any luck, I’ll be IPv6 enabled by next week. This site is hosted elsewhere, I’ve got no idea when they’re going to do their migration, but all my sites hosted at home will be available on the next gen internet protocol.

Oh, and advice to ZyXEL P660R-D1 ADSL modem owners: If you’re thinking of going from routing mode to bridging mode (for PPPoE clients behind the modem), do a modem reset beforehand – my device failed to work in PPPoE bridging mode until I’d factory reset it. I suspect that this was down to the fact I’d got static routing rules in the device, but I can’t be sure about that, and I am disinclined to debug the kit.

Good times!

New router update

The Routerbox 750 has arrived, and is now configured.  The packets that comprise this post are flowing through it now :D

It’s different enough from anything I’ve seen before that the specifics of it threw me for a bit, but it’s all configured and works.  And it’s way faster than the old firebrick was – I’m seeing webpages load a lot faster than they did before, it’s actually a very noticeable speedup.

The only thing I need to say to anyone getting one is that the default gateway is a pig to make work – it’s not just good enough to put in the IP address, you have to also populate the interface too.  But that done, it’ll work like a champ.

I’m a happy camper :D

New router

I’m in the market for a new router at the end of the month, I think; the one I’ve got is yonks old and it’s routing speed isn’t brilliant.  Superb web configuration, dead easy to use, but it’s throughput is limited to 10Mbit/S.  This was plenty fast enough in the days of ADSL, when 8Mbit/S was all we could get into the home, but these days it’s a little bit slow, what with line speeds being up to 21Mbit/S (on BT’s ADSL anyway).

I think I’ve narrowed the choice down to one of these routers from mikrotik.com; there’s a couple of resellers in the UK.  Couple that board with one of their wifi adapters and it’s a neat little 197Mbit/S router – should be futureproof unless I get fiber to the home at some point ;)

Ok, it’s a bit DIY, but I don’t have a problem with that.  I quite fancy a nice handmade teak box for the thing…

UPDATE: One of the UK distributors is selling the RB750 for £39 including a box, the OS, PSU, P&P and VAT. For that price, I’ve bought one.  It’s slower than the 433AH (above) but it’s still in the same ballpark.  Good enough for what I want, and cheaper if I don’t like it, and end up getting rid…

How to see a call stack of a 32 bit executable in a 64 bit kernel debug session

Most of you aren’t going to care about this post, you can safely ignore it, but I need a semi-permanent place to store such vital information so that I’ve got it available in future.  Sorry people ;)

In the 64 bit kernel debugging session, issue the command:

!load wow64exts.dll

Then, to switch between the 32 bit and 64 bit contexts, issue:



Handy camera gadget

For those of you with older cameras, although the affliction seems to be limited to Canon DSLRs, you may be finding the price and size of CF cards to be a bit, well, inflated.  The final nail in the coffin was that my new laptop has got an integrated SD card reader in it, and whilst I have a USB CF card reader, it’s a pain in the neck to use properly.

So, enter the CF to SD adapter.  It’s the size of a Type II CF card (the big one, with the step on the top; you know, the slot type used by the IBM microdrives), and it has a slot in the side that takes an SD card.

Twenty quid from Maplins, part number A47FF

And in the camera (Canon EOS 40D) I’ve got, it works with an 8GB  SD-HC card, despite what the staff answer to a question said.

Tomtom GO 720 not finding mp3 files?

Couldn’t find this on any forum on t’internet, so thought I’d post it here just in case it helps someone.

If your tomtom go 720 won’t find MP3 files after having copied them onto either the onboard flash disk, or an SD card (IMHO the most sensible thing to do), then there’s every chance you’ve been stuffed by the new ID3 tag formatting.  The new format just simply isn’t recognised.

The solution?  Download mp3tag and use it to remove the new ID3 tag, leaving behind a version of ID3 tag no more than version 2.3; this is the version of ID3 tag that I’ve currently got, and all MP3s are recognised by the tomtom.  It’s a bit of a pain in the neck, but at least there is a solution.

This site is not bad for your computer’s health part 2

Well, the site’s now clean (and has been for a number of hours now).
Google has done a sweep, and is telling me that not only is the site clean (bottom of picture) but that the site is still linked to badware (top of picture).
My challenge to google is tell me which one is correct, and if it’s the bottom statement, unblock my site. This is getting beyond a joke.

How not to design a user interface

This site is not bad for your computer’s health

… despite Google telling you that it is.
Google’s not always right, it seems.

Google’s assertion that this site is hosting “badware” (warning – made up word) is at best misleading, and at worst an out-and-out untruth.

My reasoning:

  1. Misleading: The version of WordPress I use to power this blog had a security vulnerability in it, which meant people could maliciously edit posts I’d made and inject content. In all of these cases, the additional material injected was a link to another website.
  2. Untruth: As above, the link on my site was just that – a link to another website. My website had absolutely no “badware” on it at any time. It’s a small distinction to make, but if my business was using wordpress, and the world at large was presented with a page from google saying my site could not be trusted and that it was trying to hack their computers, I think I, like many other business owners, would be upset at the loss of business (short term) and reputation (long term) that this causes.

Things that – in my opinion – Google needs to fix.

  • Correct the warning that users see after clicking on a link. The warning page – as pointed out above – is wrong. It should simply state that Google’s automated tool for protecting the internet community has detected that a link on this site has been found to point to a “badware” distribution site. Even changing the sense of the sentence “Warning – visiting this web site may harm your computer!” into a more passive form, so that the implication that “this web site” is actively trying to do something bad is removed.
  • Provide people who’s websites get infected with at least a count of distinct issues that have been found on their website. At the moment, the Google warning email just says that the website is serving up “badware”. This website actually suffered from two seperate problems, after finding the first, I resubmitted for testing, and they came back with the same – unhelpful – statement; that my website was still hosting “badware”. If I had been told that there were 2 (or however many are found) instances of the problem, I wouldn’t have stopped after finding the first.
    The sheer number of people requesting help on the ‘Stop “badware”‘ group pages is indicative that something is seriously wrong with the reporting mechanism.
  • Speed up their review process. If they are making wild accusations that a website is actively hosting “badware”, then they should be as quick to unblock a site as they are to block it. If an online company gets blocked – as has happened (sorry, can’t find the link to the page that I found before) – then Google will hold their website in the blocked state until a retest is done. This can take a long time, during which time, people cannot access the site from google’s search results, and due to the nature of the wording of the warning, harm is done to the business’ reputation
  • Before the browsers start using this “badware” security alert mechanism to block websites in the browser, the process needs to be streamlined, so that an automatic check can not only condemn a website, but also give it a clean bill of health. The process of freeing a website from purgatory should be near real-time. I do not believe that an automatic check of the website cannot be done within a period of half an hour – Google has a famously large number of servers and bandwidth available to it. If it cannot be done in this realtime manner, I think it is too flawed to be useful.

I would like to point out that this last point, about browsers using the Google “badware” database as a check is, in principle a very good idea; afterall, protecting people from “badware” is something that would make the internet a much nicer place to play.
However, with the caveats listed above, the database becomes even more insidious – without turning the whole security mechanism off, I cannot access my own website, even though it is clean (I know it is, I’ve just finished cleaning it, and upgraded the software so it won’t happen again).
It is this real-time checking of the “badware” database by browsers that is the painful part when the database is too slow to de-list websites.

And don’t think that browsers aren’t going to do this. Firefox 3 Beta 3 has the feature turned on by default.

EDIT: Someone else has had the same problem, and has the same problems with the process:

Sony support nonsense.

I have Windows XP installed on my sony laptop. Unfortunately (for me) it’s not the XP that came with the machine, as I replaced the Hard Disk, and have used an XP install disk, rather than the system recovery disk – the laptop is well over 4 years old, and the system recovery disk is lost in the mists of time.
Anyway, the install wasn’t performed with the system recovery disk, and one of the programs that Sony provide an install package for on their website won’t work, having installed from that package.

So, I contact sony support, and it turns out that because the bits on my hard disk weren’t placed there by the recovery disk, they won’t support that version of XP; even though it’s a vanilla XP installation.

This raises the question:
My laptop was bought before Windows XP SP2 was released, and given that SP2 fundamentally changed how Windows works (at least in user mode – there were small kernel mode changes), would I get support for a windows install (from their recovery disk) with SP2 applied? The question has been asked. I’ll keep you updated.

DNS woes


DNS is a pain in the neck. My ISP’s primary nameserver went down yesterday (which may not be your yesterday – it depends how quickly the DNS issues get resolved as to when you will see this) which wouldn’t ordinarily cause a problem. What did cause a problem was that I’d got the address of the seocondary nameserver wrong in the DNS registry, so as soon as the primary went down (and computers should have started using the secondary) the domain disappeared, leaving only a pair of smoking boots behind.
Of course, I never noticed the duff configuration on the domain since the primary DNS server has been very reliable over the last few years. That’ll teach me, I guess.
Anyway, yesterday, I corrected the registry’s nameserver data, and this morning (I’ve checked) the internet has caught up with that change, but unfortunately things are still broken as I wait for the DNS caching servers to all consider the data they hold to be too old and re-query for it. Until that point, I can’t be emailed, nor can the website be resolved.
When you can read this, the problems are over.

Bloody Logitech

Logitech Wireless desktop MX3100 keyboard and mouse.

Very nice bits of kit, all things considered, but hopeless drivers from an out-of-the-box install. Firefox’s Back and Forward functions aren’t triggered by the back and forward buttons on the mouse (which is their flagship MX1000 product). This, I thought is just wrong. It turns out that it is. There’s a new version of the SetPoint software – version 2.31 – which fixes this issue, but it’s been a painful process to find this out. The Logitech website says that Firefox doesn’t work with the SetPoint software, which is utter garbage.
Maybe they’ll get their lives sorted out at some point and update their website, but somehow I doubt it…

I hope this info is useful for somebody who’s just installed the boxed CD software and found it’s not working.

Windows Mobile 2003 (WinCE)

Wince I certainly did. After Other Half’s purchase of a new phone/PDA combo unit, we’ve been trying all afternoon to get the builtin wi-fi going on the wireless network we have here at home. For reasons best known to myself, I’ve been typing in a 128bit WEP key all afternoon trying to get this bloody thing on the network, and it’s been sitting there smugly saying “Nope. I’ll connect, but you can’t use it.” Or error messages to that effect, anyway :)

So, after much pratting about, and talk (from Orange, who are providing the phone) of returning the thing as faulty, I have a brainwave, after Other Half read a page on the internet about connecting this specific device the net. The page she was reading had nothing to do with the MAC filtering on the Wifi Access Point, but it kicked off a train of thought in my tiny little mind that maybe, as the WAP was doing MAC filtering, I *really* ought to add this device’s MAC address to the WAP.

Easy, you’d think. Just go to the WAP, login and type in the 16 digits between me and Wireless freedom. Not so, with WinCE – there’s no apparent way to get hold of a MAC address on Windows Pocket PC Edition 2003. The internet comes to our rescue, though, some smart cookie has written a WinCE program to show the status of the Wifi adapter in gory detail. One of the things it tells you isthe MAC address, fortunately.

So, for all you lucky, lucky people with Windows Mobile 2003, I’ll point you to the following website so you can find out this sort of thing: vxIPConfig.

Sorted :)

Spam control

Hopefully after yesterday we should be seeing less spam on the site in comments and trackbacks. I upgraded to WordPress 1.5 2 days ago which has some anti-spam measures itself, plus I’ve installed a couple of plugins (yay, proper plugins in 1.5) one of which is called Spam Karma. It’s the business. Normally, I get up in the morning, and there’s usually 30 or 40 spams, 5 or so make it through moderation into the live comment system. Not today; every single one has been binned (correctly) and my email hasn’t gone loopy with moderation requests. I really am impressed with this plugin, and recommend it to anyone running WP 1.5 :) Actually, I’d recommend anybody not running WP 1.5 to upgrade and install the plugin, it’s that impressive.

Spam Karma is available from Dr Dave’s blog or is available as a one click install in WP-Plugin Manager (an excellent plugin manager tool) available from Dr Dave’s blog again, listed in the Plugin management section. Highly recommended :)

Have a nice spam-free blog :)

Virtual Hosting part one.

There’s a master plan afoot. I’m now running a completely  dynamic virtual hosting system on this server. Web services, name services and email are all dynamically worked out from SQL queries. “Why is this newsworthy?” you ask? Well, it’s to do with me showing off, basically. This is (as you can see from the title) only part one (part zero which I achieved about 18 months ago was web and mail services run dynamically, but the web was a cheat, which required a filesystem hack). Now, though, it’s all done “properly” from SQL databases. Which of course means that I’m going to need some management software to add/remove/administer domains properly   rather than hacking rows into databases like I have to do now. Maybe part one-and-a-half should be rationalisation of the databases into one single database, just to make it a little easier on myself. But maybe that gets done after the management interface is finished. Just maybe. I’ll let you know.