2

I just installed lxc in Arch Linux, but the qemu-debootstrap binary seems missing,

This command sudo lxc-create -n test -t ubuntu -P /run/shm/1 complains about that.

I couldn't find it with either pacman or yaourt.

Any ideas how to fix that? I have the debootstrap script installed and that works though

6

Debootstrap is in aur/debootstrap package. After installation process you will have to make a symlink in /usr/bin:

cd /usr/bin ; ln -sf debootstrap qemu-debootstrap

After that do what ouzmoutous suggests.

Anyway I always advise to use downloaded templates.

HTH

1

Just my two cents, but combining both answers, wouldn't it be easier to do the following:

cd /usr/bin ; cp debootstrap qemu-debootstrap

and then modify the vars? That way, no need to edit the DEF_HTTPS_MIRROR back and forth for debian/ubuntu containers...

To be really thorough and avoid code duplication, it should be simple enough to create a debootcommon script with a run() function and import it inside both:

debootstrap

#!/bin/bash
. /usr/bin/bootcommon

DEF_HTTPS_MIRROR="https://mirrors.kernel.org/debian"

run()

qemu-debootstrap

#!/bin/bash
. /usr/bin/bootcommon

DEF_HTTPS_MIRROR="https://mirrors.kernel.org/ubuntu"

run()
  • Same trick worked on centos6. – Lester Cheung Oct 2 '15 at 6:18
0

The following worked for me

sudo ln -sf /usr/sbin/debootstrap /usr/local/bin/qemu-debootstrap
0

My problem was quite similar and another error have been printed

Failed getting release file https://mirrors.kernel.org/debian/dists/trusty/Release

I got a dirty workaround :

Modify the var DEF_HTTPS_MIRROR in /usr/bin/debootstrap to look like this :

DEF_HTTPS_MIRROR="https://mirrors.kernel.org/ubuntu"

Of course, you'll have to change it when you want to create debian containers.

  • this seems totally unrelated to the question... – strugee Oct 3 '14 at 8:52
  • It is related. You have to edit debootstrap for ubuntu installation. Ouzmountous show how to do it. – Scyld de Fraud Oct 3 '14 at 9:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.