Running Arch Linux in OpenVZ (and updating it!)

Pazaz

New Member
Though I would personally recommend you use KVM over OpenVZ for Arch Linux, this is how you can do it (since, until now, there was no tutorials on how to do it). The reason for this tutorial is because the latest software versions that Arch Linux runs are not compatible with OpenVZ.

Now to move on to what you're here for...

  • Reinstall your operating system through the control panel and select 20131014 under Arch.
  • Wait for the install to finish (it shouldn't take more than a minute or two).
  • Once installed, connect over SSH and set up /etc/pacman.d/mirrorlist (Interserver supports IPv6 so if you want to generate a mirrorlist you can enable that option). Go here if you want to generate one from the official mirror list.
  • When that's done, run pacman -Syy archlinux-keyring and let the latest keys get added to your keyring. This allows your pacman install to verify package signatures and install them if they're valid.
  • Edit /etc/pacman.conf and add systemd to IgnorePkg.
  • Copy /usr/lib/libgcrypt.so.11.8.2 to somewhere safe (/tmp/ is a good place, but it's volatile, so don't reboot until you copy it back)
  • Run pacman -Su to update your system and say yes to all of the prompts.
  • DON'T REBOOT ONCE THIS IS DONE! Systemd is broken right now as it's looking for a dynamically linked library that doesn't exist anymore -- but you copied it earlier, so you should be okay!
  • Copy libgcrypt.so.11.8.2 back to /usr/lib/ and then symlink it to libgcrypt.so.11
  • Run systemctl status sshd to test if everything is okay! If you get no errors and proper output then you're set to go.
You've got the latest version of Arch Linux now! I can't guarantee this will work forever but for now it works nicely. If anything changes I'll try to update this post but I have no idea how long I'll be here.

Important things to note:

  • Newer versions of systemd are broken with OpenVZ.
  • Many things have changed from October 2013 to now, so you'll have some .pacnew files to take care of.
  • /etc/localtime doesn't exist. Symlink it from /usr/share/zoneinfo/*/* for a time zone in your "area."
  • Update your locales in /etc/locale.gen.
  • Since libsystemd isn't upgraded, you're going to need to download and copy libsystemd.so.0.* into /usr/lib and then symlink it to /usr/lib/libsystemd.so.0 for maximum compatibility. "ps" won't run until you do this.
  • Arch Linux is a bleeding-edge distribution! You're better off with KVM for compatibility since OpenVZ relies on the host for the kernel, modules, and memory mapping.

I know that some people would rather just see the commands that I ran, so here you go.
rm /etc/pacman.d/mirrorlist # Remove the default mirrorlist.
nano /etc/pacman.d/mirrorlist # Copy the new mirrorlist into this file.
pacman -Syy archlinux-keyring # Update the repository cache (file list) and signatures (to verify anything).
nano /etc/pacman.conf # Uncomment IgnorePkg and add systemd to it.
cp /usr/lib/libgcrypt.so.11.8.2 /tmp/ # Safe place for this very important library.
pacman -Su sudo # Update everything and install sudo.
mv /tmp/libgcrypt.so.11.8.2 /usr/lib/ # Copy this very important library back.
ln -s /usr/lib/libgcrypt.so.11.8.2 /usr/lib/libgcrypt.so.11 # Symlink this library again.
systemctl status sshd # Check if systemd is working.

- Last revision on 8-15-14.
 
Last edited:

Quags

Administrator
Staff member
Thanks for this. On KVM we do allow an ISO install (with an email to support).

For the 2.6.32 kernel, all servers now run this. When openvz supports centos7 then the 3.10 kernel will be in use. I don't expect it for some time due to big changes, like systemd and grub2 that were not on centos6.
 
Top