I'm trying to create arch linux lxc on Ubuntu 15.04 server.
First: lxc-create -t archlinux -n test
fails with errors that pacman and pacstrap could not be found. I solved this by installing pacman using apt, and by unpacking the arch-install-scripts.
Now the create command fails with:
==> Creating install root at /var/lib/lxc/test/rootfs
==> Installing packages to /var/lib/lxc/test/rootfs
no display possible
==> ERROR: Failed to install packages to new root
Failed to install container packages
failed to install Arch Linux
lxc_container: lxccontainer.c: create_run_template: 1108 container creation template for test failed
lxc_container: lxccontainer.c: remove_partial: 196 No such file or directory - Error unlink partial file /var/lib/lxc/test/partial
lxc_container: lxc_create.c: main: 274 Error creating container test
Does anyone have any suggestions?
EDIT
Thanks to muru who pointed out my mistake. I needed pacman - the package manager. I got as far as:
add-apt-repository ppa:thopiekar/pacman
apt-get update
apt-get install -y pacman-pm arch-install-scripts
pacman-key --init
I had problem initializing pacman-key due to not enough entropy so I had to install stress app and run it in the background: stress --cpu 8 --io 4 --vm 2 --vm-bytes 128M --timeout 1000s
while pacman-key was generating keys in the foreground.
I configured some repositories in /etc/pacman.conf
[core]
SigLevel = PackageRequired
Include = /etc/pacman.d/mirrorlist
[extra]
SigLevel = PackageRequired
Include = /etc/pacman.d/mirrorlist
/etc/pacman.d/mirrorlist can be generated from list
However the lxc installation fails with importing keys:
:: Import PGP key 2048R/, "Tom Gundersen <[email protected]>", created: 2011-05-28? [Y/n]
error: key "Tom Gundersen <[email protected]>" could not be imported
I tried:
pacman-key --populate archlinux
==> ERROR: The keyring file /usr/share/pacman/keyrings/archlinux.gpg does not exist.
So I think I'm pretty close to getting it to work, but it doesn't so far. I need to do some reading how package signing works.
sudo apt-get install pacman
, then what got installed isn'tpacman
the package manager, but a game namedpacman
. You'll probably have to manually extract pacman as well. Or maybe this PPA? launchpad.net/~thopiekar/+archive/ubuntu/pacman