ArchLinux on PVE

Posted on | Updated on | 3 minutes
Table of contents

I built myself a dedicated server. I choose to use Proxmox VE to manage all the stuff. I created an Arch container to have a test drive, but some manual changes were required.

PVE notesπŸ”—

Remove PVE subscription noticeπŸ”—

One-liner:

sed -Ezi.bak "s/(Ext.Msg.show\(\{\s+title: gettext\('No valid sub)/void\(\{ \/\/\1/g" /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js && systemctl restart pveproxy.service

InstallationπŸ”—

Follow the instructions, I downloaded the CT template(archlinux-base_20230608-1_amd64.tar.zst). Then I created a container with a SSH key, leaving the password empty. Then all the tragedy started.

No network connection and no console accessπŸ”—

The network was somehow down, and since I didn't set a password, I cannot log into the container using ordinary methods. I had to enter the container from a host terminal:

# 100 is the container ID
lxc-attach -n 100
# then you can run `passwd` etc.

Still no networkπŸ”—

Using ip, I found the network adapter was DOWN. I think I have to bring it up, but my lack of knowledge of ip makes me thinking of other tools like nmcli and ifconfig. Actually, the interface can be brought up by ip:

ip link set up "[interface name]"

The virtual network adapter was brought up then.

Cannot connect to port 22 (no SSH access)πŸ”—

I immediately disabled the per-container firewall. I also checked the iptables inside the container. They were all disabled, but I still couldn't connect to port 22 of the container. Actually, the sshd service wasn't enabled. To enable it:

systemctl enable --now sshd

Pacman cannot update the packagesπŸ”—

The keyrings for pacman are not setup! Users need to manually populate them:

pacman-key --init
pacman-key --populate archlinux

Login takes a loooong timeπŸ”—

After entering correct login credentials, the terminal will hang a long time(approximately 40 seconds). Maybe there's something wrong with MOTD. After inspecting container boot logs, I found systemd complains about not having sufficient privilege on mounting namespaces. Then I enabled nested virtualization, and problem fixed.

Maybe, you need to add your hostname and ip entry to /etc/hosts as well.

Problems not resolvedπŸ”—

Nothing! :D

Closing wordsπŸ”—

All those problems, are far from satisfying on a virtualized environment. But some of them are actually "introduced" by security concerns. Just need to pay extra attentions when using those images for the first time.

After having one configured container as a template, everything work smoothly now.