[lxc-users] lxc 1.1.3, fedora guest complains no enabled repos; stale /var/cache/lxc ?

Dan Kegel dank at kegel.com
Tue Sep 8 17:43:45 UTC 2015


Short story: I had to update lxc-templates *and* nuke
/var/cache/lxc/fedora before I could
create fully-working fedora guests.

Long story:

I'm on Ubuntu 14.04, and have added the lxc-stable ppa.
dpkg-query -l shows

ii  lxc
1.1.3-0ubuntu1~ubuntu14.04.1~ppa1
ii  lxc-templates
1.1.3-0ubuntu1~ubuntu14.04.1~ppa1
ii  lxcfs
0.10-0ubuntu1~ubuntu14.04.1~ppa1

Creating a fedora 22 guest seems to work:

$ sudo lxc-create -n fedora22 -t fedora  -- -R 22
Host CPE ID from /etc/os-release:
Checking cache download in /var/cache/lxc/fedora/x86_64/22/rootfs ...
Cache found. Updating...
Yum command has been deprecated, redirecting to '/usr/bin/dnf -y update'.
See 'man dnf' and 'man yum2dnf' for more information.
To transfer transaction metadata from yum to DNF, run:
'dnf install python-dnf-plugins-extras-migrate && dnf-2 migrate'

Error: There are no enabled repos.
Update finished
...
$ sudo lxc-start -n fedora22

It lets me log in etc., but dnf can't install anything;
/etc/yum.repos.d is empty
(maybe that error message meant something).
But I know this should work; it worked on a different machine yesterday.

Maybe my earlier bad run with the old templates left some cruft somewhere.

I tried removing /var/cache/lxc/fedora and retrying; that seems to have helped,
I can now install things inside the new container.
So maybe installing a new templates package should clear that cache...?
- Dan


More information about the lxc-users mailing list