Difference between revisions of "Arch Linux VPS"

From ArchWiki
Jump to: navigation, search
(Undo revision 244314 by Danielwallace (talk) systemd works on OpenVZ, I added a warning about kernel version)
(replaced external links, flagged broken section links (interactive))
(Tag: wiki-scripts)
 
(246 intermediate revisions by 79 users not shown)
Line 1: Line 1:
[[Category:Getting and installing Arch]]
+
[[Category:Installation process]]
 
[[Category:Virtualization]]
 
[[Category:Virtualization]]
{{Article summary start}}
+
[[ja:Arch Linux VPS]]
{{Article summary text|This article discusses the use of Arch Linux on Virtual Private Servers, and includes some fixes and installation instructions specific to VPSes.}}
+
[[zh-hans:Arch Linux VPS]]
{{Article summary heading|Related}}
+
{{Related articles start}}
{{Article summary wiki|Comprehensive Server Guide}}
+
{{Related|Server}}
{{Article summary end}}
+
{{Related articles end}}
 +
{{Move|Arch Linux on a VPS|''Arch Linux VPS'' isn't a proper term.}}
 
From [[Wikipedia:Virtual private server]]:
 
From [[Wikipedia:Virtual private server]]:
  
:''Virtual private server (VPS) is a term used by Internet hosting services to refer to a virtual machine. The term is used for emphasizing that the virtual machine, although running in software on the same physical computer as other customers' virtual machines, is in many respects functionally equivalent to a separate physical computer, is dedicated to the individual customer's needs, has the privacy of a separate physical computer, and can be configured to run server software.''
+
:Virtual private server (VPS) is a term used by Internet hosting services to refer to a virtual machine. The term is used for emphasizing that the virtual machine, although running in software on the same physical computer as other customers' virtual machines, is in many respects functionally equivalent to a separate physical computer, is dedicated to the individual customer's needs, has the privacy of a separate physical computer, and can be configured to run server software.
 +
 
 +
This article discusses the use of Arch Linux on Virtual Private Servers, and includes some fixes and installation instructions specific to VPSes.
 +
 
 +
{{Warning|
 +
* Since many container-based virtualization environments rely on older kernels, it may be impossible to keep an Arch Linux install up-to-date in such an environment.  Linux 2.6.32, used by OpenVZ 6, is not supported by systemd since version 205 (and will not work with systemd-212 or higher). OpenVZ does sometimes backport newer kernel features into its kernel, but as of 2018-06-27, a fresh installation of Arch does not work on OpenVZ 6 kernel version 2.6.32-042stab131.1 .  Arch can be installed on OpenVZ 7, with [[#Preparing the Arch build for use on an OpenVZ 7 container|a minor workaround]], as of OpenVZ 7 kernel version 3.10.0-693-21.1.vz7.48.2 .}}
  
 
==Providers that offer Arch Linux==
 
==Providers that offer Arch Linux==
  
 
{{Warning|We cannot vouch for the honesty or quality of any provider. Please conduct due diligence before ordering.}}
 
{{Warning|We cannot vouch for the honesty or quality of any provider. Please conduct due diligence before ordering.}}
{{Note|This list is for providers with a convenient Arch Linux image. Using Arch on other providers is probably possible, but would require loading custom ISOs or disk images or [[Installation Chroot|installing under chroot]].}}
+
{{Note|This list is for providers with a convenient Arch Linux template. Using Arch on other providers is possible but requires more work.  Example methods include:
 +
* Loading custom disc images (requires hardware virtualization such as in Xen or KVM),
 +
* [[Installation guide|Installing under chroot]], for example with the help of the [https://gitlab.com/drizzt/vps2arch/ vps2arch] script (it will download the latest iso; be particularly aware of the  systemd 220/221 [https://github.com/systemd/systemd/issues/421 bug]), or
 +
* Following [[#Installing the latest Arch Linux on any OpenVZ container provider]] instructions, using rsync to synchronize Arch over the top of another distribution.}}
  
{| border="1"
+
{| class="wikitable"
 
! Provider !! Arch Release !! Virtualization !! Locations !! Notes
 
! Provider !! Arch Release !! Virtualization !! Locations !! Notes
 
|-
 
|-
| [http://123systems.net 123 Systems] || 2010.05 i686/x86_64 || OpenVZ || Dallas, TX || Arch available as a selection upon reinstall. Very old (2.6.18-308) kernel - See [[Virtual_Private_Server#OpenVZ:_kernel_too_old_for_glibc|OpenVZ troubleshooting]].
+
| [http://4smart.cz/ 4smart.cz] || 2013.08 || OpenVZ || Prague, CZ || (Czech language site only) when updating system make sure you use [tredaelli-systemd] in pacman.conf (see [[Unofficial user repositories]]
 +
|-
 +
| [https://www.affinity.net.nz/ affinity.net.nz] || 2013.08.01 || KVM || Auckland, New Zealand (NZ) || IRC channel is #affinity on ircs.kiwicon.org
 +
|-
 +
| [https://www.atlantic.net/ Atlantic.Net] || 2016.03.01 || KVM || NYC/SF/Toronto/Dallas/Orlando, US & Canada || 100% SSD 1-click Arch Linux, ready in 30 seconds. It is also easy to update Arch to the current version because the pre-provisioned Arch image is relatively current.
 +
|-
 +
| [https://buyvm.net/ BuyVM] || 2013.07.01 || KVM || LA, Buffalo NY || Must chose a different OS at sign up.  Once accessible, choose to mount the latest Arch ISO and reboot to install manually.
 +
|-
 +
| [https://coinshost.com/en/vps Coinshost] || 2015.04 || Xen || Zurich, Switzerland || Bitcoin and other cryptocurrencies accepted.
 +
|-
 +
| [https://cherry.host Cherry Host] || Latest || KVM || Santee, US-CA || Must submit a support ticket to get Arch installed.
 
|-
 
|-
| [http://afterburst.com/ Afterburst] || 2010.05 i686/x86_64 || OpenVZ || Miami (USA), Falkenstein (Germany) || Formerly FanaticalVPS, kernel version depends on what node your VPS is on, the ones in Miami are fine (2.6.32-042stab062.2) but some of the ones in Germany require a [[Virtual_Private_Server#OpenVZ:_kernel_too_old_for_glibc|custom glibc]].
+
| [https://contabo.com Contabo] || Latest || KVM || German || Only place to get 500 GB for 7€ - Decent speed. Other cheaps plans add snapshots, which is useful if you VPS runs a rolling release distro.
 
|-
 
|-
| [http://alienvps.com/ AlienVPS] || 2010.05 || Xen, KVM || Los Angeles, New York ||
+
| [https://www.directvps.nl/ DirectVPS] || 2014.01.xx || OpenVZ || Amsterdam, NL; Rotterdam, NL || (Dutch language site only)
 
|-
 
|-
| [https://www.clodo.ru/ Clodo.ru] || 2011.?? || Xen || Moscow || Can pay per hour. Lists an invalid release version of the installer.
+
| [http://www.edis.at/en/ Edis] || [http://www.edis.at/en/support-and-service/faq/server-faq/which-distributions-are-available-with-edis-kvm-vps-plans/ 2013.03.01] || vServer, KVM, OpenVZ || [http://www.edis.at/en/server/kvm-vps/austria/ Multiple international locations]. || Also offer dedicated server options as well as an "off-shore" location at the Isle of Man (IM). Requires mounting an Arch ISO for a full manual install.
 
|-
 
|-
| [http://en.edis.at/ Edis] || 2011.08 i686/x86_64 || vServer, KVM || Austria, Chile, Germany, France, Hong Kong, Italy, Iceland, Poland, Sweden, Switzerland, Spain, UK, USA ||
+
| [https://www.gigatux.com/virtual.php GigaTux] || [https://www.gigatux.com/distro/ 2013.06.01] || Xen || Chicago, US-IL; Frankfurt, DE; London, GB; San Jose, US-CA || Currently, when changing to the US$ currency, the page breaks and it is not possible to provision a server.
 
|-
 
|-
| [http://eoreality.net/ EOReality] || (?) i686/x86_64 || OpenVZ || Chicago || Need to use special glibc-vps repo for this provider . See [[Virtual_Private_Server#OpenVZ:_kernel_too_old_for_glibc|OpenVZ troubleshooting]] for instructions. You will also need to remove heimdal.
+
| [https://www.hostvirtual.com/ Host Virtual] || [https://www.hostvirtual.com/os/linux-vps/archlinux-vps 2014.06.01] || KVM || [http://www.vr.org/cloud-locations/ Multiple International Locations] || Appears to use KVM virtualization. Site lists "Xen based virtualization" and [http://www.vr.org/features/ features] lists ability to install from ISO. VPS plans are very expensive with an setup fee as well.
 
|-
 
|-
| [https://www.directvps.nl/ DirectVPS] || 2012.09 x86_64 || Xen || Amsterdam, Rotterdam ||  
+
| [https://hostigation.com/ Hostigation] || [https://hostigation.com/?page=KVM Latest] || OpenVZ, KVM || Charlotte, US-NC; Los Angeles, US-CA || Arch is '''not''' currently listed as a choice.
 
|-
 
|-
| [http://generation-host.com Generation-Host] || 2012.07 || Xen || Chicago IL, Clifton NJ and Toronto ON Canada ||
+
| [https://www.kloud51.com Kloud51] || Unlisted || OpenVZ || US-CA, Canada || Presently, the website does not list any VPS plans.
 
|-
 
|-
| [https://www.gigatux.com/virtual.php GigaTux] || 2011.08 x86_64 || Xen || Chicago, Frankfurt, Israel, London, San Jose ||
+
| [https://leapswitch.com Leapswitch Networks] || 2013.10.xx || OpenVZ/KVM || USA, India, Portugal, Spain, Ukraine, Germany || Arch Linux currently available in Control Panel for reinstall, not on order form.
 
|-
 
|-
| [http://www.vr.org/ Host Virtual] || 2011.08 || Xen || Amsterdam, Chennai (Madras), Chicago, Dallas, Hong Kong, London, Los Angeles, New York, Paris, Reston, San Jose ||
+
| [https://linevast.de Linevast.de] || Latest || OpenVZ, KVM || Germany || Arch Linux is possible on openvz and on KVM with the one click os installer.
 
|-
 
|-
| [https://hostigation.com/ Hostigation] || 2010.05 i686 || OpenVZ, KVM || Charlotte, Los Angeles || You can [[Migrating Between Architectures Without Reinstalling|migrate to x86_64]].
+
| [https://www.linode.com Linode] || [https://www.linode.com/distributions Latest] || KVM || [https://www.linode.com/speedtest/ Multiple US, London, Frankfurt, Tokyo, Singapore] || Linode instances are configured to run Arch's kernel by default. Linode provides custom kernels which can be selected in the manager settings. There are also community-supported kernels in the AUR, such as {{AUR|linux-linode}}.
 
|-
 
|-
| [http://www.intovps.com IntoVPS] || 2012.05 i686/x86_64 || OpenVZ || Amsterdam, Bucharest, Dallas, Fremont, London ||
+
| [http://lylix.net/ LYLIX] || [http://lylix.net/archlinux 2014.01.xx] || OpenVZ || Multiple US; Europe || 32-bit and 64-bit available
 
|-
 
|-
| [https://www.linode.com Linode.com] || 2012.07 || Xen || Atlanta, Dallas, Fremont, London, Newark, Tokyo || Uses a custom kernel; do not install the {{pkg|linux}} package.
+
| [https://www.netcup.de/ Netcup] || 2012.11.xx || KVM || Germany (DE)|| (German language site only)
 
|-
 
|-
| [http://lylix.net/home Lylix] || 2007.08 || ? || ? ||
+
| [https://www.medhahosting.com MedHaHosting ] || Latest || KVM || Buffalo, NY, USA; Atlanta, GA, USA; Chicago, IL, USA; Los Angeles, CA, USA || ArchLinux available on request.  Many Linux and Windows hosting options. 
 
|-
 
|-
| [http://www.nodedeploy.com Node Deploy] || ? || OpenVZ, KVM || LA, Germany || unmanaged, solusvm server manager
+
| [https://www.onepoundwebhosting.co.uk/ OnePoundWebHosting] || 2014.01 || Xen PV, Xen HVM || United Kingdom (UK) || They are a registrar too. Unable to verify server locations.
 
|-
 
|-
| [http://netcup.de Netcup] || 2011.10 x86_64 || vServer || Germany || _Very_ poor customerr service. Inability to cancel subscriptions without posting a signed mail.
+
| [https://www.ovh.com/us/vps/ OVH] || Latest || KVM || France, Canada ||
 
|-
 
|-
| [http://onepoundwebhosting.co.uk OnePoundWebHosting] || 2012.09 x86_64 || Xen || UK ||
+
| [https://pacmanvps.com/ PacmanVPS] || 2014.01 || KVM || Canada (CA), Poland (PL) || Arch image is very old and PacmanVPS repos are broken. Not possible to update Arch. Site appears unmaintained.
 
|-
 
|-
| [http://openvz.ca/ OpenVZ.ca] || 2010.05 i686/x86_64 || OpenVZ || Canada ||
+
| [https://www.proplay.de/ Proplay] || Latest || OpenVZ, KVM || Germany (DE) || (German language site only)
 
|-
 
|-
| [https://www.proplay.biz/ proPlay.de] || 2011.10 i686/x86_64 || OpenVZ, KVM || Germany ||
+
| [https://www.rackspace.com/cloud/servers Rackspace Cloud] || 2013.6 || Xen || [https://www.rackspace.com/whyrackspace/network/datacenters/ Multiple international locations] || Billed per hour. Use their "next gen" VPSes (using the mycloud.rackspace.com panel); the Arch image on the first gen Rackspace VPSes is out of date.
 
|-
 
|-
| [http://www.rackspace.com/cloud/cloud_hosting_products/servers/ Rackspace Cloud] || 2012.08 || Xen || Chicago, Dallas, London || Billed per hour.
+
| [http://www.ramhost.us/ RamHost.us] || [http://www.ramhost.us/?page=news 2013.05.01] || OpenVZ, KVM || Los Angeles, US-CA; Great Britain (GB); Atlanta, US-GA; Germany (DE) || You can request a newer ISO on RamHost's IRC network.
 
|-
 
|-
| [http://www.ramhost.us RamHost.us] || 2012.12 || OpenVZ, KVM || Atlanta, England, Germany, Los Angeles || You can request a newer iso on IRC. ||
+
| [http://www.ramnode.com/ RamNode] || [https://clientarea.ramnode.com/knowledgebase.php?action=displayarticle&id=48 2016.01.01] || [https://clientarea.ramnode.com/knowledgebase.php?action=displayarticle&id=39 SSD and SSD Cached:] [https://clientarea.ramnode.com/knowledgebase.php?action=displayarticle&id=52 KVM] || [https://clientarea.ramnode.com/knowledgebase.php?action=displayarticle&id=50 Alblasserdam, NL; Atlanta, GA-US; Los Angeles, CA-US; New York, NY-US; Seattle, WA-US] || You can request Host/CPU passthrough with KVM service.[https://clientarea.ramnode.com/knowledgebase.php?action=displayarticle&id=66] Frequent use of discount promotions.[https://twitter.com/search?q=ramnode%20code&src=typd], Must install Arch manually from an ISO using VNC viewer.
 
|-
 
|-
| [http://www.tilaa.nl/ Tilaa] || 2012.12 i686/x86_64 || KVM || Amsterdam ||
+
| [https://www.rosehosting.com/ RoseHosting] || Latest || OpenVZ, KVM || St. Louis, Missouri, USA || SSD powered hosting plans with free fully-managed 24/7 support. No unmanaged VPS offerings.
 
|-
 
|-
| [https://www.transip.nl/ TransIP] || 2013.01.04 || KVM || Amsterdam ||
+
| [https://www.seedvps.com/ SeedVPS] || Latest || OpenVZ, KVM || Amsterdam, Netherlands || Linux VPS and Windows VPS Hosting in The Netherlands (NL). Newer ISO can be requested by opening a support ticket.
 
|-
 
|-
| [http://www.xenvz.co.uk/ XenVZ] || 2009.12 x86_64 || OpenVZ, Xen || UK? ||
+
| [https://www.servercheap.net Server Cheap] || Latest || OpenVZ, KVM || Chicago, Illinois, USA || ArchLinux available on request.  Windows, BSD, and many Linux distribution hosting options. 
 
|-
 
|-
| [http://www.virpus.com/ Virpus] || 2010.05 x86_64 || OpenVZ, Xen || Kansas City ||
+
| [https://www.tilaa.com/ Tilaa] || 2016.03.01 || [https://www.tilaa.com/pages/vps/technology KVM] || Amsterdam, NL ||
 
|-
 
|-
| [http://www.vmline.pl/ Vmline] || 2012.08.04-dual.iso || Xen-HVM || Poland - Kraków || [http://www.s-net.pl/en/ S-Net] reseller. It's probably imposible to install i686 due to lack of xen_netfront and xen_blkfront modules ||
+
| [https://www.transip.eu/ TransIP] || [https://www.transip.eu/vps/vps-os/ 2017.01.01] || [https://www.transip.eu/vps/vps-technology/ KVM] || Amsterdam, NL || For latest image, submit ticket. Also registrar.
 
|-
 
|-
| [https://vps6.net/ VPS6.NET] || 2010.05 i686/x86_64 OpenVZ, 2012.01 x86_64 Xen || OpenVZ, Xen || Germany, Romania, Turkey, USA ||
+
| [https://upcube.io upCUBE] || Latest || Docker || Germany || Different prepared arch linux templates available
 +
|-
 +
| [http://virpus.com/ Virpus] || [http://virpus.com/linux-vps.php 2014.11.07] || Xen || Kansas City, US-KS; Los Angeles, US-CA || Arch is '''not''' offered as a choice when creating a server (even though the Arch logo is prominently featured on the site). As of 2018, the most recent version of Ubuntu offered is 14.04, and the limited-time promo code for new sign ups is over two years old. None of this generates much trust.
 +
|-
 +
| [https://www.virtualmaster.com/ Virtual Master] || 2012-08 || ?? || Prague, CZ ||
 +
|-
 +
| [https://vps6.net/ VPS6.NET] || 2013.01.xx || OpenVZ, Xen, HVM-ISO || [http://vps6.net/network/ Multiple US]; Frankfurt, DE; Bucharest, RO; Istanbul, TR || Registrar.
 +
|-
 +
| [https://www.vpsbg.eu/ VPSBG.eu] || 2013.10 || OpenVZ || [https://vpsbg.eu/en/index.php?page=vps-datacenter Sofia, Bulgaria] || Offshore VPS in Bulgaria - anonymous registrations and Bitcoin are accepted.
 +
|-
 +
| [https://www.vpscheap.net VPSCHEAP] || Latest || NVM KVM || Dallas, TX, USA || Has one plan that allows you to select ArchLinux, but doesn't appear in any other plan, but available on request
 +
|-
 +
| [https://www.vpsserver.com/ VPSSERVER] || 2015.07 || KVM || Chicago, US-IL; Dallas, US-TX; Miami, US-FL; New York, US-NY;  Silicon Valley, US-CA; Amsterdam, NL; Frankfurt, DE; London, UK  || Currently the latest Archlinux OS version we are providing is 2015.07 x64 and you can't update the OS version to the new version.
 +
|-
 +
| [https://www.vultr.com/ Vultr] || Latest || KVM || [https://www.vultr.com/locations/ Multiple International locations] || When deploying a new server just select the Arch install ISO from Vultr ISO Library. Then just manually run through the standard [[Installation guide|Arch installation guide]].
 +
|-
 +
| [https://www.world4you.com/ World4You] || 2015.10.28 || OpenVZ || Austria (AT) || Internet hosting provider; quick setup; 24/7 support; shared web hosting; also CentOS, Debian, Ubuntu, Fedora and Arch OpenVZ servers; supports newest systemd (227 atm)
 +
|-
 +
| [http://www.xenvz.co.uk/ XenVZ] || 2009.12.07 || OpenVZ, Xen || United Kingdom (UK), United States (US) || [http://www.xenvz.co.uk/faq.php#use2 Hardware]
 +
|-
 +
| [https://www.1984hosting.com/ 1984hosting.com] || 2016.x || Xen || Iceland (IS) || [https://www.1984hosting.com/product/vps/ Hardware] will provide any image you request, has Arch in default image list.
 +
|-
 +
| [https://www.zeptovm.com/ ZeptoVM] || Latest || KVM || St. Petersburg, RU; Khabarovsk, RU; Seoul, KR; Ashburn, US || Also provides local Archlinux mirror in some locations.
 
|-
 
|-
| [http://www.uk2.net/ UK2.net] || 2010.05 i686/x86_64 || Xen || United Kingdom || Appears to use a custom kernel; do not install the {{pkg|linux}} package.
 
 
|}
 
|}
  
Line 79: Line 119:
 
===KVM===
 
===KVM===
 
{{Expansion|Are there instructions specific to VPSes?}}
 
{{Expansion|Are there instructions specific to VPSes?}}
See [[KVM#Preparing an (Arch) Linux guest]].
+
See [[QEMU#Preparing an (Arch) Linux guest]].
  
 
===OpenVZ===
 
===OpenVZ===
{{Expansion|Move some of the [[#Troubleshooting]] instructions here.}}
 
  
====Getting a 2010.05 Image Up To Date====
+
====Installing the latest Arch Linux on any OpenVZ container provider====
  
These instructions you have a 2010.05 image from your VPS provider and you'd like to get it up to scratch. The biggest work involves preparing /lib for the symlink upgrade (glibc 2.16, and later filesystem 2013.01). If you are on a older kernel than 2.6.32, please refer further down the page to get the glibc-vps repo working (just add the repo and you can follow these steps).
+
{{Warning|See the [[#top|above warning]]{{Broken section link}} about older kernel versions and systemd, and note the [[#Preparing the Arch build for use on an OpenVZ 7 container|workaround for OpenVZ 7 below]].}}
  
To start, grab the latest busybox from http://busybox.net/downloads/binaries/latest/. This allows you to force glibc (losing /lib temporarily) without losing your OS (busybox comes with its own GNU tools which are statically linked).
+
It is possible to directly copy an installation of Arch Linux over the top of a working OpenVZ VPS. This tutorial explains how to create a basic installation of Arch Linux with {{ic|pacstrap}} (as used in a standard install) and then replace the contents of a target VPS with it using [[rsync]].
  
{{bc|wget http://busybox.net/downloads/binaries/latest/busybox-i686
+
This process (with minor modification) also works to migrate existing Arch installations between various environments and has been confirmed to work in migrating from OpenVZ to Xen and from Xen to OpenVZ.  For an install to Xen, other hardware-virtualized platforms, or even to physical hardware, extra steps (basically running {{ic|mkinitcpio}} and installing a [[boot loader]]) are needed.
chmod +x busybox-i686}}
 
  
First off you can get a list of packages that own files in /lib with the following command:
+
=====Prerequisites=====
{{bc|<nowiki>
 
pacman -Qo /lib/* | cut -d' ' -f 5 | egrep -v 'glibc' | uniq | xargs
 
</nowiki>}}
 
  
For the current 2010.05 that comes straight off of ibiru's page, these are the packages that were required to be removed for me:
+
* A working Arch Linux installation
 +
** To keep things simple, it should match the architecture you want to install on your VPS (x86_64 or i686).
 +
** To build from other distributions, [[Archbootstrap|arch-bootstrap.sh]] can be used in place of {{ic|pacstrap}}.
 +
* The {{Pkg|arch-install-scripts}}, {{Pkg|rsync}}, and {{Pkg|openssh}} packages from the [[official repositories]]
 +
** SSH is not strictly required, but rsync over SSH is the method used here.
 +
* A VPS running any distribution, with {{ic|rsync}} and a working SSH server
 +
** Its architecture (x86_64 or i686) does not matter as long as the OpenVZ installation can support your target architecture.
 +
* OpenVZ's serial console feature (usually accessible via your provider's control panel)
 +
** Without this, any network configuration for the target VPS will have to be done immediately after the "Build" step below.
  
{{bc|pacman -S acl attr util-linux-ng bzip2 libcap e2fsprogs libgcrypt libgpg-error udev readline ncurses pam pcre popt procps readline shadow e2fsprogs sysfsutils udev util-linux-ng sysvinit coreutils}}
+
=====Building a clean Arch Linux installation=====
  
You may have to remove /lib/udev/devices/loop0 (a simple rm works).
+
As root, build the installation (optionally replacing {{ic|build}} with your preferred target directory):
  
After the upgrade finishes, you must remove any extra empty directories in /lib (/lib/modules is the common offender):
+
# mkdir build
{{bc|rm -rf /lib/modules}}
+
# pacstrap -cd build
  
Install tzdata to fix some dependencies and remove /etc/profile.d/locale.sh:
+
Other tweaks for the {{ic|pacstrap}} command:
{{bc|pacman -S tzdata
 
rm /etc/profile.d/locale.sh}}
 
  
Remove /var/run (you should have nothing running that matters):
+
*{{ic|-C custom-pacman-config.conf}} - Use a custom pacman configuration file. By default, {{ic|pacstrap}} builds according to your local pacman.conf.  This determines the architecture (i686 or x86_64) of the build, the mirror list, etc.
{{bc|rm -rf /var/run}}
+
*{{ic|-G}} - Prevent {{ic|pacstrap}} from copying your system's pacman keyring to the new build. If you use this option, you will need to run {{ic|pacman-key --init}} and {{ic|pacman-key --populate archlinux}} in the [[#Configuration|Configuration]] step to set up the keyring.
 +
*{{ic|-M}} - Prevent {{ic|pacstrap}} from copying your system's pacman mirror list to the new build.
 +
*You can pass a list of packages to {{ic|pacstrap}} to add them to your install, instead of the default {{ic|base}} group. For example: {{ic|pacstrap -cd build base openssh dnsutils gnu-netcat traceroute vim}}
  
Force glibc (this will pull in the latest filesystem, but BREAK everything (other than busybox)):
+
======Preparing the Arch build for use on an OpenVZ 7 container======
{{bc|pacman -S --force glibc}}
 
  
Now you will have a broken system, so first thing symlink /usr/lib to /lib with busybox's ln:
+
OpenVZ 7 will fail to start a container if some expected network configuration files don't exist. The easiest way to get around this is as follows:
{{bc|./busybox-i686 ln -s /usr/lib /lib}}
 
  
And you should have a fully functional system where you can now update pacman.
+
# Create the OpenVZ 7 container as Debian 8 (Debian 9 would probably work as well).
 +
# Create the required blank network configuration files inside the Arch build, as follows:
 +
# mkdir build/etc/network
 +
# touch build/etc/network/interfaces
 +
# mkdir -p build/etc/resolvconf/resolv.conf.d
 +
# touch build/etc/resolvconf/resolv.conf.d/base
  
{{bc|pacman -S pacman; pacman-key --init; pacman-key --populate archlinux; pacman-db-upgrade; pacman -Syy}}
+
=====Replacing everything on the VPS with the Arch build=====
  
Now, update initscripts to get iproute2:
+
Replace all files, directories, etc. on your target VPS with the contents of your {{ic|build}} directory (replacing "YOUR.VPS.IP.ADDRESS" below):
  
{{bc|pacman -S iniscripts}}
+
{{Warning|Be careful with the following command. By design, {{ic|rsync}} is very destructive, especially with any of the {{ic|--delete}} options.}}
  
Install makedev:
+
# rsync -axH --numeric-ids --delete-delay -e ssh --stats -P build/ YOUR.VPS.IP.ADDRESS:/
{{bc|pacman -S makedev}}
 
  
Add the following to your /etc/rc.local:
+
Explanation of options:
{{bc|/usr/sbin/MAKEDEV tty
 
/usr/sbin/MAKEDEV pty}}
 
  
Comment the following lines in /etc/inittab:
+
* {{ic|-a}} - Required. Preserves timestamps, permissions, etc.
{{bc|#c1:2345:respawn:/sbin/agetty -8 -s 38400 tty1 linux
+
* {{ic|--delete}} - Required. Deletes anything in the target that does not exist in the source
#c2:2345:respawn:/sbin/agetty -8 -s 38400 tty2 linux
+
* {{ic|-x}} - Important. Prevents the crossing of filesystem boundaries (other partitions, /dev, etc.) during the copy
#c3:2345:respawn:/sbin/agetty -8 -s 38400 tty3 linux
+
* {{ic|-H}} - Important. Preserves hardlinks
#c4:2345:respawn:/sbin/agetty -8 -s 38400 tty4 linux
+
* {{ic|--numeric-ids}} - Important. Doesn't assign user/group ownership of files based on matching user and group names and instead uses the numeric IDs directly, ensuring proper file ownership on the target system
#c5:2345:respawn:/sbin/agetty -8 -s 38400 tty5 linux
+
* {{ic|--delete-delay}} - Recommended. Enables alternate deletion mode which waits to delete anything until the synchronization is otherwise complete, which may reduce the risk of a slow transfer causing the target VPS to lock-up
#c6:2345:respawn:/sbin/agetty -8 -s 38400 tty6 linux}}
+
* {{ic|-e ssh}} - Recommended. Uses {{ic|rsync}} over SSH (recommended for simplicity compared to setting up an {{ic|rsync}} server)
 +
* {{ic|-P}} - Recommended. Shows partial progress information during transfer
 +
* {{ic|--stats}} - Recommended. Shows transfer statistics at the end
  
Finally, you should be able to upgrade the whole system:
+
=====Configuration=====
  
{{bc|pacman -Su}}
+
# Reboot the VPS externally (using your provider's control panel, for example).
 +
# Using OpenVZ's serial console feature, configure the [[network]] and [[Installation_guide#Configure_the_system|basic system settings]] (ignoring fstab generation and arch-chroot steps).
 +
#* If you do not have access to the serial console feature, you will need to preconfigure your network settings before synchronizing Arch to the VPS.
 +
#* On some VPS configuration you won't have a gateway to connect to, here is an example [[netctl]] configuration for this setup. It configures static IP addresses and default routes on venet0 and uses Google Public DNS.
 +
{{hc|/etc/netctl/venet|2=
 +
Description='VPS venet connection'
 +
Interface=venet0
 +
Connection=ethernet
  
You may run into some issues with krb5 and heimdal, as krb5 no longer provides+conflicts+replaces heimdal (https://projects.archlinux.org/svntogit/packages.git/commit/trunk/PKGBUILD?h=packages/krb5&id=f5e6d77fd14ced15ebf5b6a78a7c76e0db0625f7). The old openssh depends on heimdal (and the new openssh depends on krb5), so force install krb5, then upgrade openssh, then remove heimdal and reinstall krb5.
+
IP=static
 +
Address=('192.0.2.42/32')
 +
Routes=('default')
  
{{bc|pacman -S --force krb5
+
IP6=static
pacman -S openssh openssl
+
Address6=('2001:db8::1234:5678/128')
pacman -R heimdal
+
Routes6=('default')
pacman -S krb5}}
 
  
Fix syslog-ng (set the src to unix-dgram("/dev/log") and add --no-caps to both check and run args in /etc/conf.d/syslog-ng).
+
DNS=('2001:4860:4860::8888' '2001:4860:4860::8844' '8.8.8.8' '8.8.4.4')
 
+
}}
Make sure your rc.conf isn't messed up with broken network definitions, or else be sure serial access works on your VPS before you reboot.
 
  
 
===Xen===
 
===Xen===
 
{{Expansion|Are there instructions specific to VPSes?}}
 
{{Expansion|Are there instructions specific to VPSes?}}
See [[Xen#Arch as Xen guest (PVHVM mode)]] and/or [[Xen#Arch as Xen guest (PV mode)]].
+
See [[Xen]].
 
 
==Troubleshooting==
 
===OpenVZ: kernel too old for glibc===
 
Are you on a virtual private server (VPS) with an old kernel & broke your system? Are you using OpenVZ?
 
 
 
Check your kernel version with:
 
 
 
{{bc|uname -r}}
 
 
 
If your kernel is older than 2.6.32, you will need a custom version of glibc ([https://www.archlinux.org/news/minimum-kernel-requirement-2632/ because of dependencies in glibc]).
 
 
 
Arch Template Used: https://dev.archlinux.org/~ibiru/openvz/2010.05/arch-2010.05-i686-minimal.tar.gz
 
 
 
{{Note|for installs that have not been updated to glibc-2.16, it will save you lots of time and prevent major breakage to do:
 
pacman -U https://dev.archlinux.org/~ibiru/openvz/glibc-vps/i686/glibc-2.16.0-101-i686.pkg.tar.xz
 
or
 
pacman -U https://dev.archlinux.org/~ibiru/openvz/glibc-vps/x86_64/glibc-2.16.0-101-x86_64.pkg.tar.xz
 
Add a single "-d" if needed. ''The instructions below assume that this has been done.''
 
}}
 
 
 
 
 
Following similar instructions from [[DeveloperWiki:usrlib]].
 
 
 
Try doing the following to fix it:
 
 
 
1) Edit {{ic|/etc/pacman.conf}} and add the following repository '''ABOVE [core]''':
 
 
 
for 32-bit:
 
 
 
{{bc|<nowiki>[glibc-vps]
 
Server = https://dev.archlinux.org/~ibiru/openvz/glibc-vps/i686</nowiki>}}
 
 
 
for 64-bit:
 
 
 
{{bc|<nowiki>[glibc-vps]
 
Server = https://dev.archlinux.org/~ibiru/openvz/glibc-vps/x86_64</nowiki>}}
 
 
 
2) Then run {{ic|pacman -Syy}} followed by {{ic|pacman -Syu}}. You will be notified to upgrade pacman first.
 
 
 
3) Upgrade the [[pacman]] database by running {{ic|pacman-db-upgrade}} as root.
 
 
 
4) Edit {{ic|/etc/pacman.conf.pacnew}} (new pacman config file) and add the following repository '''ABOVE [core]''':
 
 
 
{{bc|<nowiki>[glibc-vps]
 
Server = https://dev.archlinux.org/~ibiru/openvz/glibc-vps/$arch</nowiki>}}
 
 
 
5) Replace {{ic|/etc/pacman.conf}} with {{ic|/etc/pacman.conf.pacnew}} (run as root):
 
 
 
{{bc|mv /etc/pacman.conf.pacnew /etc/pacman.conf}}
 
 
 
6) Upgrade your whole system with new packages again {{ic|pacman -Syu}}
 
 
 
If you get the following or similar error:
 
{{bc|initscripts: /etc/profile.d/locale.sh exists in filesystem}}
 
 
 
Simply delete that file (e.g., {{ic|rm -f /etc/profile.d/locale.sh}}), then run {{ic|pacman -Syu}} again.
 
 
 
 
 
If you get the following or similar error:
 
{{bc|filesystem: /etc/mtab exists in filesystem}}
 
 
 
Run  {{ic|pacman -S filesystem --force}}
 
 
 
 
 
If you get the following or similar error:
 
{{bc|libusb-compat: /usr/bin/libusb-config exists in filesystem}}
 
 
 
Run {{ic|pacman -S libusb}} and then {{ic|pacman -S libusb-compat}}
 
 
 
7) Before rebooting, you need to [[pacman|install]] the {{Pkg|makedev}} package by running {{ic|pacman -S makedev}}.
 
 
 
8) Add MAKEDEV to {{ic|/etc/rc.local}}:
 
 
 
{{bc|/usr/sbin/MAKEDEV tty
 
/usr/sbin/MAKEDEV pty}}
 
 
 
9) Edit {{ic|/etc/inittab}}, comment out the following lines (otherwise you will see errors in {{ic|/var/log/errors.log}}):
 
 
 
{{bc|#c1:2345:respawn:/sbin/agetty -8 -s 38400 tty1 linux
 
#c2:2345:respawn:/sbin/agetty -8 -s 38400 tty2 linux
 
#c3:2345:respawn:/sbin/agetty -8 -s 38400 tty3 linux
 
#c4:2345:respawn:/sbin/agetty -8 -s 38400 tty4 linux
 
#c5:2345:respawn:/sbin/agetty -8 -s 38400 tty5 linux
 
#c6:2345:respawn:/sbin/agetty -8 -s 38400 tty6 linux}}
 
 
 
10) To enable the use of the {{ic|hostname}} command, [[pacman|install]] the package {{Pkg|inetutils}} from the [[Official Repositories|official repositories]].
 
 
 
11) Remove disabling of SysRq key and setup of core dump pattern since this is blocked by OpenVZ and causes errors
 
 
 
Edit {{ic|/etc/sysctl.conf}}, comment out the following line:
 
{{bc|1=#kernel.sysrq = 0}}
 
 
 
Edit {{ic|/usr/lib/sysctl.d/coredump.conf}}, comment out the following line:
 
{{bc|1=#kernel.core_pattern=&#124;/usr/lib/systemd/systemd-coredump %p %u %g %s %t %e}}
 
 
 
12) Save and reboot.
 
 
 
Enjoy & thank ioni if you happen to be in #archlinux
 
 
 
===Moving your VPS from network configuration in rc.conf to netcfg (tested with OpenVZ)===
 
 
 
1) Install netcfg
 
 
 
{{bc|pacman -S netcfg}}
 
 
 
2) Create a netcfg configuration file {{ic|/etc/network.d/venet}}
 
 
 
{{bc|1=CONNECTION='ethernet'
 
DESCRIPTION='VPS venet connection'
 
INTERFACE='venet0'
 
IP='static'
 
IPCFG=(
 
#IPv4 address
 
'addr add xxx.xxx.xxx.xxx/32 broadcast 0.0.0.0 dev venet0'
 
#IPv4 route
 
'route add default dev venet0'
 
#IPv6 address
 
'addr add xxxx:xx:xx::x/128 dev venet0'
 
#IPv6 route
 
'-6 route add default dev venet0'
 
)
 
DNS=('xxx.xxx.xxx.xxx' 'xxx.xxx.xxx.xxx')}}
 
 
 
3) Edit your netcfg main conf file {{ic|/etc/conf.d/netcfg}}
 
 
 
{{bc|1=NETWORKS=(venet)
 
WIRED_INTERFACE="venet0"}}
 
 
 
4) Try your new setup
 
 
 
{{bc|rc.d stop network && ip addr flush venet0 && netcfg venet}}
 
 
 
Your VPS should still be connected and have its IP addresses set correctly. (Check with {{ic|ip a}})
 
 
 
DO NOT proceed to next step if this isn't the case.
 
 
 
5) Make your new setup survive reboots
 
 
 
In the {{ic|DAEMONS}} array in {{ic|/etc/rc.conf}}, replace {{ic|network}} with {{ic|net-profiles}}.
 
 
 
Remove all networking information that is in {{ic|/etc/rc.conf}}.
 
{{bc|reboot}}
 
 
 
===Moving your VPS from initscripts to systemd===
 
 
 
{{Warning|This has been known to work with OpenVZ on the 2.6.32 kernel, but systemd may not work on older kernels.}}
 
 
 
This is very similar to a regular arch system, except you probably don't have access to your kernel line.
 
 
 
1) Move from network in rc.conf to netcfg (see above).
 
 
 
2) Install systemd
 
 
 
{{bc|pacman -S systemd}}
 
 
 
2 bonus for OpenVZ) Remove kernel core dump pattern since this is blocked by OpenVZ and causes errors
 
 
 
Edit {{ic|/usr/lib/sysctl.d/coredump.conf}}, comment out the following line:
 
{{bc|#kernel.core_pattern&#61;&#124;/usr/lib/systemd/systemd-coredump %p %u %g %s %t %e}}
 
 
 
3) Move all configuration from {{ic|/etc/rc.conf}} (except the {{ic|DAEMONS}} array) to its appropriate location.
 
 
 
See [https://wiki.archlinux.org/index.php/Systemd#Native_configuration Native configuration] and [https://wiki.archlinux.org/index.php/Rc.conf rc.conf] for details.
 
 
 
Now your {{ic|/etc/rc.conf}} should only contain the {{ic|DAEMONS}} array.
 
 
 
4) Install systemd-sysvcompat
 
 
 
{{bc|pacman -S systemd-sysvcompat}}
 
 
 
It will ask to replace sysvinit, say yes.
 
 
 
{{bc|reboot}}
 
 
 
5) Move daemons from the {{ic|DAEMONS}} array in {{ic|/etc/rc.conf}} to {{ic|systemd}}
 
 
 
See the [https://wiki.archlinux.org/index.php/Systemd#Moving_away_from_the_DAEMONS_array guide] and the [https://wiki.archlinux.org/index.php/Daemons_List daemons list].
 
 
 
If your {{ic|DAEMONS}} array is now empty, skip next step.
 
 
 
6) Moving rc.d daemons with no systemd support, example: {{ic|vzquota}}
 
 
 
Create a custom systemd service file for vzquota: {{ic|/etc/systemd/system/newvzquota.service}}:
 
{{bc|1=[Unit]
 
Description=Setup vzquota on VPS
 
ConditionFileIsExecutable=/etc/rc.d/vzquota
 
 
 
[Service]
 
Type=oneshot
 
ExecStart=/etc/rc.d/vzquota start
 
ExecStop=/etc/rc.d/vzquota stop
 
TimeoutSec=0
 
StandardInput=tty
 
RemainAfterExit=yes
 
 
 
[Install]
 
WantedBy=multi-user.target}}
 
 
 
{{Note|It is recommended to choose a  .service file name that is different from the name of the daemon, because systemd might try to call the LEGACY scripts with the old name.}}
 
 
 
Enable this service:
 
{{bc|systemctl enable newvzquota.service}}
 
 
 
Remove {{ic|vzquota}} from the {{ic|DAEMONS}} array in {{ic|/etc/rc.conf}}
 
 
 
Repeat this step to remove all daemons from {{ic|/etc/rc.conf}}.
 
 
 
7) Removing {{ic|/etc/rc.local}} and {{ic|/etc/rc.local.shutdown}}
 
 
 
Write [https://wiki.archlinux.org/index.php/Systemd#Writing_custom_.service_files custom .service files] to replace functionality in {{ic|/etc/rc.local}} and {{ic|/etc/rc.local.shutdown}}. You can take a look at {{ic|/usr/lib/systemd/system/rc-local.service}} and {{ic|/usr/lib/systemd/system/rc-local-shutdown.service}} for inspiration.
 
 
 
8) Removing {{ic|initscripts}}
 
 
 
Your {{ic|/etc/rc.conf}} file must look like this:
 
{{bc|1=DAEMONS=()}}
 
and {{ic|/etc/rc.local}} and {{ic|/etc/rc.local.shutdown}} must now be empty.
 
 
 
Uninstall {{ic|initscripts}}
 
{{bc|pacman -R initscripts}}
 
 
 
{{bc|reboot}}
 
 
 
===SSH fails: PTY allocation request failed on channel 0===
 
 
 
Some VPSes have an outdated {{ic|rc.sysinit}}. You may be able to login via serial console or with
 
 
 
{{bc|> ssh root@broken.server '/bin/bash -i'}}
 
 
 
Then run the following:
 
 
 
{{bc|# mv /etc/rc.sysinit.pacnew /etc/rc.sysinit
 
# reboot}}
 
 
 
Once it’s working, you should be able to comment out the {{ic|udevd_modprobe}} line in {{ic|rc.sysinit}} to save a bit of RAM the next time you reboot.
 
 
 
If the above doesn’t work, take a look at
 
http://fsk141.com/fix-pty-allocation-request-failed-on-channel-0.
 

Latest revision as of 13:30, 10 November 2018

Tango-go-next.pngThis article or section is a candidate for moving to Arch Linux on a VPS.Tango-go-next.png

Notes: Arch Linux VPS isn't a proper term. (Discuss in Talk:Arch Linux VPS#)

From Wikipedia:Virtual private server:

Virtual private server (VPS) is a term used by Internet hosting services to refer to a virtual machine. The term is used for emphasizing that the virtual machine, although running in software on the same physical computer as other customers' virtual machines, is in many respects functionally equivalent to a separate physical computer, is dedicated to the individual customer's needs, has the privacy of a separate physical computer, and can be configured to run server software.

This article discusses the use of Arch Linux on Virtual Private Servers, and includes some fixes and installation instructions specific to VPSes.

Warning:
  • Since many container-based virtualization environments rely on older kernels, it may be impossible to keep an Arch Linux install up-to-date in such an environment. Linux 2.6.32, used by OpenVZ 6, is not supported by systemd since version 205 (and will not work with systemd-212 or higher). OpenVZ does sometimes backport newer kernel features into its kernel, but as of 2018-06-27, a fresh installation of Arch does not work on OpenVZ 6 kernel version 2.6.32-042stab131.1 . Arch can be installed on OpenVZ 7, with a minor workaround, as of OpenVZ 7 kernel version 3.10.0-693-21.1.vz7.48.2 .

Providers that offer Arch Linux

Warning: We cannot vouch for the honesty or quality of any provider. Please conduct due diligence before ordering.
Note: This list is for providers with a convenient Arch Linux template. Using Arch on other providers is possible but requires more work. Example methods include:
Provider Arch Release Virtualization Locations Notes
4smart.cz 2013.08 OpenVZ Prague, CZ (Czech language site only) when updating system make sure you use [tredaelli-systemd] in pacman.conf (see Unofficial user repositories
affinity.net.nz 2013.08.01 KVM Auckland, New Zealand (NZ) IRC channel is #affinity on ircs.kiwicon.org
Atlantic.Net 2016.03.01 KVM NYC/SF/Toronto/Dallas/Orlando, US & Canada 100% SSD 1-click Arch Linux, ready in 30 seconds. It is also easy to update Arch to the current version because the pre-provisioned Arch image is relatively current.
BuyVM 2013.07.01 KVM LA, Buffalo NY Must chose a different OS at sign up. Once accessible, choose to mount the latest Arch ISO and reboot to install manually.
Coinshost 2015.04 Xen Zurich, Switzerland Bitcoin and other cryptocurrencies accepted.
Cherry Host Latest KVM Santee, US-CA Must submit a support ticket to get Arch installed.
Contabo Latest KVM German Only place to get 500 GB for 7€ - Decent speed. Other cheaps plans add snapshots, which is useful if you VPS runs a rolling release distro.
DirectVPS 2014.01.xx OpenVZ Amsterdam, NL; Rotterdam, NL (Dutch language site only)
Edis 2013.03.01 vServer, KVM, OpenVZ Multiple international locations. Also offer dedicated server options as well as an "off-shore" location at the Isle of Man (IM). Requires mounting an Arch ISO for a full manual install.
GigaTux 2013.06.01 Xen Chicago, US-IL; Frankfurt, DE; London, GB; San Jose, US-CA Currently, when changing to the US$ currency, the page breaks and it is not possible to provision a server.
Host Virtual 2014.06.01 KVM Multiple International Locations Appears to use KVM virtualization. Site lists "Xen based virtualization" and features lists ability to install from ISO. VPS plans are very expensive with an setup fee as well.
Hostigation Latest OpenVZ, KVM Charlotte, US-NC; Los Angeles, US-CA Arch is not currently listed as a choice.
Kloud51 Unlisted OpenVZ US-CA, Canada Presently, the website does not list any VPS plans.
Leapswitch Networks 2013.10.xx OpenVZ/KVM USA, India, Portugal, Spain, Ukraine, Germany Arch Linux currently available in Control Panel for reinstall, not on order form.
Linevast.de Latest OpenVZ, KVM Germany Arch Linux is possible on openvz and on KVM with the one click os installer.
Linode Latest KVM Multiple US, London, Frankfurt, Tokyo, Singapore Linode instances are configured to run Arch's kernel by default. Linode provides custom kernels which can be selected in the manager settings. There are also community-supported kernels in the AUR, such as linux-linodeAUR.
LYLIX 2014.01.xx OpenVZ Multiple US; Europe 32-bit and 64-bit available
Netcup 2012.11.xx KVM Germany (DE) (German language site only)
MedHaHosting Latest KVM Buffalo, NY, USA; Atlanta, GA, USA; Chicago, IL, USA; Los Angeles, CA, USA ArchLinux available on request. Many Linux and Windows hosting options.
OnePoundWebHosting 2014.01 Xen PV, Xen HVM United Kingdom (UK) They are a registrar too. Unable to verify server locations.
OVH Latest KVM France, Canada
PacmanVPS 2014.01 KVM Canada (CA), Poland (PL) Arch image is very old and PacmanVPS repos are broken. Not possible to update Arch. Site appears unmaintained.
Proplay Latest OpenVZ, KVM Germany (DE) (German language site only)
Rackspace Cloud 2013.6 Xen Multiple international locations Billed per hour. Use their "next gen" VPSes (using the mycloud.rackspace.com panel); the Arch image on the first gen Rackspace VPSes is out of date.
RamHost.us 2013.05.01 OpenVZ, KVM Los Angeles, US-CA; Great Britain (GB); Atlanta, US-GA; Germany (DE) You can request a newer ISO on RamHost's IRC network.
RamNode 2016.01.01 SSD and SSD Cached: KVM Alblasserdam, NL; Atlanta, GA-US; Los Angeles, CA-US; New York, NY-US; Seattle, WA-US You can request Host/CPU passthrough with KVM service.[1] Frequent use of discount promotions.[2], Must install Arch manually from an ISO using VNC viewer.
RoseHosting Latest OpenVZ, KVM St. Louis, Missouri, USA SSD powered hosting plans with free fully-managed 24/7 support. No unmanaged VPS offerings.
SeedVPS Latest OpenVZ, KVM Amsterdam, Netherlands Linux VPS and Windows VPS Hosting in The Netherlands (NL). Newer ISO can be requested by opening a support ticket.
Server Cheap Latest OpenVZ, KVM Chicago, Illinois, USA ArchLinux available on request. Windows, BSD, and many Linux distribution hosting options.
Tilaa 2016.03.01 KVM Amsterdam, NL
TransIP 2017.01.01 KVM Amsterdam, NL For latest image, submit ticket. Also registrar.
upCUBE Latest Docker Germany Different prepared arch linux templates available
Virpus 2014.11.07 Xen Kansas City, US-KS; Los Angeles, US-CA Arch is not offered as a choice when creating a server (even though the Arch logo is prominently featured on the site). As of 2018, the most recent version of Ubuntu offered is 14.04, and the limited-time promo code for new sign ups is over two years old. None of this generates much trust.
Virtual Master 2012-08 ?? Prague, CZ
VPS6.NET 2013.01.xx OpenVZ, Xen, HVM-ISO Multiple US; Frankfurt, DE; Bucharest, RO; Istanbul, TR Registrar.
VPSBG.eu 2013.10 OpenVZ Sofia, Bulgaria Offshore VPS in Bulgaria - anonymous registrations and Bitcoin are accepted.
VPSCHEAP Latest NVM KVM Dallas, TX, USA Has one plan that allows you to select ArchLinux, but doesn't appear in any other plan, but available on request
VPSSERVER 2015.07 KVM Chicago, US-IL; Dallas, US-TX; Miami, US-FL; New York, US-NY; Silicon Valley, US-CA; Amsterdam, NL; Frankfurt, DE; London, UK Currently the latest Archlinux OS version we are providing is 2015.07 x64 and you can't update the OS version to the new version.
Vultr Latest KVM Multiple International locations When deploying a new server just select the Arch install ISO from Vultr ISO Library. Then just manually run through the standard Arch installation guide.
World4You 2015.10.28 OpenVZ Austria (AT) Internet hosting provider; quick setup; 24/7 support; shared web hosting; also CentOS, Debian, Ubuntu, Fedora and Arch OpenVZ servers; supports newest systemd (227 atm)
XenVZ 2009.12.07 OpenVZ, Xen United Kingdom (UK), United States (US) Hardware
1984hosting.com 2016.x Xen Iceland (IS) Hardware will provide any image you request, has Arch in default image list.
ZeptoVM Latest KVM St. Petersburg, RU; Khabarovsk, RU; Seoul, KR; Ashburn, US Also provides local Archlinux mirror in some locations.

Installation

KVM

Tango-view-fullscreen.pngThis article or section needs expansion.Tango-view-fullscreen.png

Reason: Are there instructions specific to VPSes? (Discuss in Talk:Arch Linux VPS#)

See QEMU#Preparing an (Arch) Linux guest.

OpenVZ

Installing the latest Arch Linux on any OpenVZ container provider

Warning: See the above warning[broken link: invalid section] about older kernel versions and systemd, and note the workaround for OpenVZ 7 below.

It is possible to directly copy an installation of Arch Linux over the top of a working OpenVZ VPS. This tutorial explains how to create a basic installation of Arch Linux with pacstrap (as used in a standard install) and then replace the contents of a target VPS with it using rsync.

This process (with minor modification) also works to migrate existing Arch installations between various environments and has been confirmed to work in migrating from OpenVZ to Xen and from Xen to OpenVZ. For an install to Xen, other hardware-virtualized platforms, or even to physical hardware, extra steps (basically running mkinitcpio and installing a boot loader) are needed.

Prerequisites
  • A working Arch Linux installation
    • To keep things simple, it should match the architecture you want to install on your VPS (x86_64 or i686).
    • To build from other distributions, arch-bootstrap.sh can be used in place of pacstrap.
  • The arch-install-scripts, rsync, and openssh packages from the official repositories
    • SSH is not strictly required, but rsync over SSH is the method used here.
  • A VPS running any distribution, with rsync and a working SSH server
    • Its architecture (x86_64 or i686) does not matter as long as the OpenVZ installation can support your target architecture.
  • OpenVZ's serial console feature (usually accessible via your provider's control panel)
    • Without this, any network configuration for the target VPS will have to be done immediately after the "Build" step below.
Building a clean Arch Linux installation

As root, build the installation (optionally replacing build with your preferred target directory):

# mkdir build
# pacstrap -cd build

Other tweaks for the pacstrap command:

  • -C custom-pacman-config.conf - Use a custom pacman configuration file. By default, pacstrap builds according to your local pacman.conf. This determines the architecture (i686 or x86_64) of the build, the mirror list, etc.
  • -G - Prevent pacstrap from copying your system's pacman keyring to the new build. If you use this option, you will need to run pacman-key --init and pacman-key --populate archlinux in the Configuration step to set up the keyring.
  • -M - Prevent pacstrap from copying your system's pacman mirror list to the new build.
  • You can pass a list of packages to pacstrap to add them to your install, instead of the default base group. For example: pacstrap -cd build base openssh dnsutils gnu-netcat traceroute vim
Preparing the Arch build for use on an OpenVZ 7 container

OpenVZ 7 will fail to start a container if some expected network configuration files don't exist. The easiest way to get around this is as follows:

  1. Create the OpenVZ 7 container as Debian 8 (Debian 9 would probably work as well).
  2. Create the required blank network configuration files inside the Arch build, as follows:
# mkdir build/etc/network
# touch build/etc/network/interfaces
# mkdir -p build/etc/resolvconf/resolv.conf.d
# touch build/etc/resolvconf/resolv.conf.d/base
Replacing everything on the VPS with the Arch build

Replace all files, directories, etc. on your target VPS with the contents of your build directory (replacing "YOUR.VPS.IP.ADDRESS" below):

Warning: Be careful with the following command. By design, rsync is very destructive, especially with any of the --delete options.
# rsync -axH --numeric-ids --delete-delay -e ssh --stats -P build/ YOUR.VPS.IP.ADDRESS:/

Explanation of options:

  • -a - Required. Preserves timestamps, permissions, etc.
  • --delete - Required. Deletes anything in the target that does not exist in the source
  • -x - Important. Prevents the crossing of filesystem boundaries (other partitions, /dev, etc.) during the copy
  • -H - Important. Preserves hardlinks
  • --numeric-ids - Important. Doesn't assign user/group ownership of files based on matching user and group names and instead uses the numeric IDs directly, ensuring proper file ownership on the target system
  • --delete-delay - Recommended. Enables alternate deletion mode which waits to delete anything until the synchronization is otherwise complete, which may reduce the risk of a slow transfer causing the target VPS to lock-up
  • -e ssh - Recommended. Uses rsync over SSH (recommended for simplicity compared to setting up an rsync server)
  • -P - Recommended. Shows partial progress information during transfer
  • --stats - Recommended. Shows transfer statistics at the end
Configuration
  1. Reboot the VPS externally (using your provider's control panel, for example).
  2. Using OpenVZ's serial console feature, configure the network and basic system settings (ignoring fstab generation and arch-chroot steps).
    • If you do not have access to the serial console feature, you will need to preconfigure your network settings before synchronizing Arch to the VPS.
    • On some VPS configuration you won't have a gateway to connect to, here is an example netctl configuration for this setup. It configures static IP addresses and default routes on venet0 and uses Google Public DNS.
/etc/netctl/venet
Description='VPS venet connection'
Interface=venet0
Connection=ethernet

IP=static
Address=('192.0.2.42/32')
Routes=('default')

IP6=static
Address6=('2001:db8::1234:5678/128')
Routes6=('default')

DNS=('2001:4860:4860::8888' '2001:4860:4860::8844' '8.8.8.8' '8.8.4.4')

Xen

Tango-view-fullscreen.pngThis article or section needs expansion.Tango-view-fullscreen.png

Reason: Are there instructions specific to VPSes? (Discuss in Talk:Arch Linux VPS#)

See Xen.