Description of problem: When trying to create various LXC containers, most included templates do not work for various reasons. Version-Release number of selected component (if applicable): lxc-1.0.5-3.mga5 How reproducible: Always # lxc-create --name alpine -t alpine which: no apk in (/usr/local/sbin:/usr/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/usr/bin:/sbin:/bin) Determining the latest release... v3.2 Using static apk from http://wiki.alpinelinux.org/cgi-bin/dl.cgi/v3.2/main/x86_64 Downloading alpine-mirrors-3.1.3-r2.apk tar: Ignoring unknown extended header keyword 'APK-TOOLS.checksum.SHA1' tar: Ignoring unknown extended header keyword 'APK-TOOLS.checksum.SHA1' Downloading apk-tools-static-2.6.3-r0.apk tar: Ignoring unknown extended header keyword 'APK-TOOLS.checksum.SHA1' tar: Ignoring unknown extended header keyword 'APK-TOOLS.checksum.SHA1' Downloading alpine-keys-1.1-r0.apk tar: Ignoring unknown extended header keyword 'APK-TOOLS.checksum.SHA1' tar: Ignoring unknown extended header keyword 'APK-TOOLS.checksum.SHA1' tar: Ignoring unknown extended header keyword 'APK-TOOLS.checksum.SHA1' tar: Ignoring unknown extended header keyword 'APK-TOOLS.checksum.SHA1' tar: Ignoring unknown extended header keyword 'APK-TOOLS.checksum.SHA1' alpine-devel@lists.alpinelinux.org-4a6a0840.rsa.pub: OK Verification Failure Failed to download a valid static apk lxc_container: container creation template for alpine failed lxc_container: Error creating container alpine # lxc-create --name alt -t altlinux 'apt-get' command is missing lxc_container: container creation template for alt failed lxc_container: Error creating container alt # lxc-create --name arch -t archlinux /usr/share/lxc/templates/lxc-archlinux: line 53: pacman: command not found network link interface, br0, does not exist lxc_container: container creation template for arch failed lxc_container: Error creating container arch # urpmi pacman No package named pacman # lxc-create --name centos -t centos Host CPE ID from /etc/os-release: This is not a CentOS or Redhat host and release is missing, defaulting to 6 use -R|--release to specify release Checking cache download in /var/cache/lxc/centos/x86_64/6/rootfs ... Downloading centos minimal ... http://mirror.centos.org/centos/6.5/os/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found Trying other mirror. Error: Cannot retrieve repository metadata (repomd.xml) for repository: CentOS-6-x86_64-base. Please verify its path and try again Failed to download the rootfs, aborting. Failed to download 'centos base' failed to install centos lxc_container: container creation template for centos failed lxc_container: Error creating container centos # lxc-create --name fedora -t fedora Host CPE ID from /etc/os-release: This is not a fedora host and release missing, defaulting to 20 use -R|--release to specify release Checking cache download in /var/cache/lxc/fedora/x86_64/20/rootfs ... Downloading fedora minimal ... Fetching rpm name from http://fedora.ip-connect.vn.ua/fedora-archive/fedora/linux/releases/20/Everything/x86_64/os//Packages/f... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 178 100 178 0 0 195 0 --:--:-- --:--:-- --:--:-- 342 100 119k 0 119k 0 0 75311 0 --:--:-- 0:00:01 --:--:-- 75311 Fetching fedora release rpm from http://fedora.ip-connect.vn.ua/fedora-archive/fedora/linux/releases/20/Everything/x86_64/os//Packages/f/fedora-release-20-1.noarch.rpm...... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 34036 100 34036 0 0 63188 0 --:--:-- --:--:-- --:--:-- 63263 Bootstrap Environment testing... Fedora Installation Bootstrap Build... Downloading stage 0 LiveOS squashfs file system from mirrors.kernel.org... Have a beer or a cup of coffee. This will take a bit (~300MB). MOTD: MOTD: Welcome to the Linux Kernel Archive. MOTD: MOTD: Due to U.S. Exports Regulations, all cryptographic software on this MOTD: site is subject to the following legal notice: MOTD: MOTD: This site includes publicly available encryption source code MOTD: which, together with object code resulting from the compiling of MOTD: publicly available source code, may be exported from the United MOTD: States under License Exception "TSU" pursuant to 15 C.F.R. Section MOTD: 740.13(e). MOTD: MOTD: This legal notice applies to cryptographic software only. MOTD: Please see the Bureau of Industry and Security, MOTD: http://www.bis.doc.gov/ for more information about current MOTD: U.S. regulations. MOTD: receiving incremental file list rsync: change_dir "/releases/20/Fedora/x86_64/os" (in fedora) failed: No such file or directory (2) sent 8 bytes received 113 bytes 80.67 bytes/sec total size is 0 speedup is 0.00 rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1637) [Receiver=3.1.1] Download of squashfs image failed. Fedora Bootstrap setup failed Failed to download 'fedora base' failed to install fedora lxc_container: container creation template for fedora failed lxc_container: Error creating container fedora # lxc-create --name gentoo -t gentoo ### set_default_arch: default arch/variant autodetect... => Got: arch=amd64 variant=amd64 Attempting to obtain an exclusive lock (timeout: 60 sec) named "cache-amd64-amd64"... => done. => Executing "do_all" ###### cache_setup(): doing cache preparation ### cache_precheck(): doing some pre-start checks ... ### cache_stage3(): stage3 cache deployment... Determining path to latest Gentoo amd64 (amd64) stage3 archive... => downloading and processing http://distfiles.gentoo.org/releases/amd64/autobuilds/latest-stage3-amd64.txt => Got: 20150723/stage3-amd64-20150723.tar.bz2 218874695 Downloading/untarring the actual stage3 tarball... --2015-07-26 09:01:05-- http://distfiles.gentoo.org/releases/amd64/autobuilds/20150723/stage3-amd64-20150723.tar.bz2%20218874695 Resolving distfiles.gentoo.org (distfiles.gentoo.org)... 64.50.236.52, 216.165.129.135, 140.211.166.134, ... Connecting to distfiles.gentoo.org (distfiles.gentoo.org)|64.50.236.52|:80... connected. HTTP request sent, awaiting response... 404 Not Found 2015-07-26 09:01:05 ERROR 404: Not Found. bzip2: Compressed file ends unexpectedly; perhaps it is corrupted? *Possible* reason follows. bzip2: Inappropriate ioctl for device Input file = (stdin), output file = (stdout) It is possible that the compressed file(s) have become corrupted. You can use the -tvv option to test integrity of such files. You can use the `bzip2recover' program to attempt to recover data from undamaged sections of corrupted files. tar: Child returned status 2 tar: Error is not recoverable: exiting now [the last exit code leading to this death was: 2 ] Error: unable to fetch or untar lxc_container: container creation template for gentoo failed lxc_container: Error creating container gentoo # lxc-create --name oma -t openmandriva This is not an OpenMandriva or ROSA release lxc_container: container creation template for oma failed lxc_container: Error creating container oma # lxc-create --name osu -t opensuse /usr/share/lxc/templates/lxc-opensuse: line 386: type: zypper: not found 'zypper' command is missing lxc_container: container creation template for osu failed lxc_container: Error creating container osu # lxc-create --name ubuntu -t ubuntu Checking cache download in /var/cache/lxc/precise/rootfs-amd64 ... Installing packages in template: ssh,vim,language-pack-en Downloading ubuntu precise minimal ... which: no qemu-debootstrap in (/usr/local/sbin:/usr/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/usr/bin:/sbin:/bin) I: Keyring file not available at /usr/share/keyrings/ubuntu-archive-keyring.gpg; switching to https mirror https://mirrors.kernel.org/debian I: Retrieving Release E: Failed getting release file https://mirrors.kernel.org/debian/dists/precise/Release lxc_container: container creation template for ubuntu failed lxc_container: Error creating container ubuntu Reproducible: Steps to Reproduce:
CC: (none) => mageia, thierry.vignaud
I've tested on Cauldron. You can add -x to the shebang on /usr/share/lxc/templates/ in order to debug. FC one failed b/c of network issue (I've seen that too but it works fine else) You need to install dnf-yum though Debian works if you install deboostrap. ... It would be better if upstream lxc would have templates that work on every platforms (eg: FC one downloads a squashfs image if yum isn't availlable)
Assigning to all packagers collectively since there is no registered maintainer for this package.
Assignee: bugsquad => pkg-bugs
The primary problem here is that the package managers are not installed for each distro being installed (the network issue and 404 error are of lesser significance) I've been messing around with LXC and what I have found is that the templates work fine as long as the host and guest are the same distro. For example, the lxc-fedora template installs fine under Fedora. This is because the host has the correct package manager. It isn't so much of a bug in the LXC templates, the issue is more that the OS doesn't install every single package manager as a dependency for LXC. Now I don't think it is really efficient to install every single package manager upon installing LXC. What I think *should* happen is that the templates do a better pre-installation checklist, the same way ./configure checks the system thoroughly before doing a compile in a properly set-up source package. And after doing a better check, the templates should provide a better explanation of what the user needs to do to get it working.
CC: (none) => sharpzq4300
Hi Herbert, Thank you for having taken the needed time to report this issue! Did this bug get fixed? If so, please change its status to RESOLVED - FIXED If it didn't, then we regret that we weren't able to fix it in Mageia 5. Mageia 5 has officially reached its End of Life on December 31st, 2017 https://blog.mageia.org/en/2017/11/07/mageia-5-eol-postponed/ It only continued to get important security updates since then, because we were waiting for the big Plasma5 update in Mageia 6, that fixed many of the Mageia 5 => 6 upgrade issues. If you haven't seen that this bug got fixed, then please check whether this bug still exists in Mageia 6. If it does, then please change the Version (near the top, at the left) to "6". If you know it exists in Cauldron, then change Version to Cauldron. If you see it in both Cauldron and Mageia 6, then please set Version to Cauldron and add MGA6TOO on the Whiteboard.
CC: (none) => marja11
No reply, so closing as OLD since Mageia 5 is no longer maintained.
Resolution: (none) => OLDStatus: NEW => RESOLVED