Maybe we can cache the png data per detected OS value rather than per
VM? Not sure if that collides with licensing issues, but would likely
mean storing less data on disk.

You can't do that without getting into trademark issues. The icon
that is displayed must have come from precisely the same guest.
The icons are not large anyhow.
One thing I meant to ask about Dan's proposal:

Technically, a UUID should be unique enough. But right now, libvirt
does not enforce cross-connection uniqueness, and it is possible to
reuse a uuid value across hypervisors (even though such reuse violates
the definition of uuid), so using $CONN_URI protects us from that
potential for reuse. Besides, we already use $CONN_URI in the paths of
other files, such as per-domain logs (for example,
/var/log/libvirt/$CONN_URI/$DOMAIN_NAME.log), so it's a reasonable
proposal to keep that naming hierarchy elsewhere.