Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failed to create a centos8 LXC container on centos8 #21

Open
f18m opened this issue Oct 10, 2019 · 1 comment
Open

failed to create a centos8 LXC container on centos8 #21

f18m opened this issue Oct 10, 2019 · 1 comment

Comments

@f18m
Copy link

f18m commented Oct 10, 2019

The template below is mostly useful for bug reports and support questions.
Feel free to remove anything which doesn't apply to you and add more information where it makes sense.

Required information

  • Distribution: Centos
  • Distribution version: 8.0.1905
  • The output of
    • lxc-start --version: 3.2.1
    • uname -a: Linux arkadia 4.18.0-80.7.1.el8_0.x86_64 Prefix tests with lxc-test- lxc#1 SMP Sat Aug 3 15:14:00 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Issue description

I installed LXC3 on Centos8 using:
https://copr.fedorainfracloud.org/coprs/ganto/lxc3/

and then tried to run:

root@arkadia ~]# lxc-create -n test2 -t centos -- -R 8 
Host CPE ID from /etc/os-release: cpe:/o:centos:centos:8
Checking cache download in /var/cache/lxc/centos/x86_64/8/rootfs ... 
Downloading CentOS minimal ...
Failed to set locale, defaulting to C
Failed to set locale, defaulting to C
Unable to detect release version (use '--releasever' to specify release version)
CentOS-8 - Base                                                                              36  B/s |  38  B     00:01    
Error: Failed to synchronize cache for repo 'base'
Reinstalling packages ...
mkdir: cannot create directory '/var/cache/lxc/centos/x86_64/8/partial/etc/yum.repos.disabled': File exists
mv: cannot stat '/var/cache/lxc/centos/x86_64/8/partial/etc/yum.repos.d/*.repo': No such file or directory
mknod: /var/cache/lxc/centos/x86_64/8/partial//var/cache/lxc/centos/x86_64/8/partial/dev/null: File exists
mknod: /var/cache/lxc/centos/x86_64/8/partial//var/cache/lxc/centos/x86_64/8/partial/dev/urandom: File exists
cp: cannot stat '/var/cache/lxc/centos/x86_64/8/partial/var/cache/yum/*': No such file or directory
chroot: failed to run command 'yum': No such file or directory
Failed to download the rootfs, aborting.
Failed to download 'CentOS base'
failed to install CentOS
lxc-create: test2: lxccontainer.c: create_run_template: 1648 Failed to create container from template
lxc-create: test2: tools/lxc_create.c: main: 331 Failed to create container test2

Steps to reproduce

  1. Step one: get a centos8 minimal
  2. Step two: install copr and lxc3 from ganto/lxc3 COPR repo
  3. Step three: try to create a centos8 container
@stgraber stgraber transferred this issue from lxc/lxc Oct 10, 2019
@f18m
Copy link
Author

f18m commented Oct 12, 2019

From a first debugging the problem looks to be wrong repository names: if I cat the file mentioned by the lxc-create, i.e.
/var/cache/lxc/centos/x86_64/8/partial/etc/yum.repos.d/lxc-centos-temp.repo

I find it contains:
mirrorlist=http://mirrorlist.centos.org/?release=8&arch=x86_64&repo=os
which does not work; the right setting is instead:
mirrorlist=http://mirrorlist.centos.org/?release=8&arch=x86_64&repo=BaseOS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant