Although I am continually delighted by arch linux, one thing I find frustrating is the ‘bootstrap’ process when using arch in something like an LXC / PVE container. It’s rather annoying that these somewhat convoluted steps must be taken to do a simple system update or package install. I’m documenting here so that I and maybe others have a convenient place to reference it.
Assumes you are using the basic arch linux image in a proxmox virtualization environment
- create an arch LXC container on proxmox.
- (optional) include your ssh public key during creation.
- open the shell or console in PVE and enable sshd:
systemctl enable --now sshd
- if you did not add your public key for ssh, then you’ll also need to enable password authentication for root in
/etc/ssh/sshd_config
Once you can ssh in, (or continue in the PVE console, yuck), you will need to enable the pacman mirrorlist from here (uncomment the US section at the bottom) and copy it to /etc/pacman.d/mirrorlist
You can then run the following commands:
pacman-key --init
pacman-key --populate archlinux
pacman -Syy --noconfirm archlinux-keyring
You are now ready to update with pacman -Syyu --noconfirm
- install python (required for ansible)
pacman -S python
Now you can run ansible via ssh, but be sure to include the new container in your ansible inventory.
more info
- see the arch wiki for more about pacman-key