Silly Old Recycling Rules

With luck, this is our last recycling week on the old system where we separate our recycling into categories. Apart from the fact that it’s a small amount of work, the thing that makes that really annoying is that the tubs they give you can’t hold half the categories you’re supposed to divide your recycling into (in the mandated paper bags).

I’ve managed to get the large majority of the recycling out of the house, and get a photo. This is not the amount we produce every two weeks, we’re not good at getting to it each and every recycling period, so we tend to do a big pile and then miss a few. The point here is that even if it was just one period (which is two weeks), the bags wouldn’t all fit in the bins.  And we have three times as many bins as usual—one extra new style because we’re a duplex, and one old style because we haven’t destroyed it yet.

ddb 20130516 010-018
Our recycling pile today

Just for the record, here’s the city’s list of categories we’re supposed to sort into right now:

Minneapolis recycling categories, captured 5/16/2013
Minneapolis recycling categories, captured 5/16/2013

Linux network init failures especially in virtual machines

My situation is a virtual machine image that I want to use in multiple places, running it on multiple host systems (it lives on an external disk drive, so it’s easily taken to these various places). The host systems in my experiments are all Windows 7 boxes.

The symptom is that, when booted in a new environment, networking in the guest Linux installation doesn’t come up. Specifically, I see IPv6 addresses assigned but not regular Inet addresses.  Sometimes, the boot brings up the setup utility (but there’s nothing I’ve found to configure the network in a way that’s useful there).

It appears that fairly common network init code in Linux is remarkably unstable when a disk (or disk image) is migrated from one real or virtual system to another.  This code seems to exist in a wide range of Linux distributions, but my actual experiments have been with Centos 6.4 guest systems in a Virtualbox VM.

The root cause seems to be that Linux stores a UUID for the network connection and the MAC address both in  /etc/sysconfig/network-scripts/ifcfg-eth0 and /etc/udev/rules.d/70-persistent-net.rules. When you create a new virtual machine, you get a new MAC address (and it asks you if you want that even if you copy one). And you really don’t want multiple machines with the same MAC address operating in the same LAN segment (or larger bridged network).

The solution is, after booting the new virtual machine from the old disk image, to log in and do some configuration editing.  (Note: Since the network doesn’t come up, you can’t get in via SSH.  And you can’t paste into the Virtualbox console window.  Thus you must know a password for a sudo-capable account, and type it in manually. Given my penchant for 20-character random passwords, this was a royal pain.) Specifically, I deleted the hardware (MAC) address and the UUID lines from ifcfg-eth0, and the entire line referring to etho from 70-persistent-net.rules. I then rebooted the system.  (There are arguments that just restarting the network would suffice, but when I tried that earlier this afternoon it did not appear to work. I have not investigated that bit further.)

I also had a huge amount of trouble finding clear enough discussions on the web, and had to do a lot of experimenting to get this result.  And I had enough cases of a VM that brought up networking one boot but not the next that I’m a bit worried still.