Difference between revisions of "Virtual Private Server"

From ArchWiki
Jump to: navigation, search
(Providers that offer Arch Linux: Continuing clean-up. Removing uk2.net unable to verify that they still offer Arch Linux. Finishing and cleaning up edits.)
(Gandi Baltimore location shutting down in December; heads up to anyone wanting US based location)
 
(165 intermediate revisions by 53 users not shown)
Line 1: Line 1:
 
[[Category:Getting and installing Arch]]
 
[[Category:Getting and installing Arch]]
 
[[Category:Virtualization]]
 
[[Category:Virtualization]]
{{Article summary start}}
+
[[ja:Virtual Private Server]]
{{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-CN:Virtual Private Server]]
{{Article summary heading|Related}}
+
{{Related articles start}}
{{Article summary wiki|Comprehensive Server Guide}}
+
{{Related|Server}}
{{Article summary end}}
+
{{Related articles end}}
 
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|
 +
* Linux 2.6.32 is not supported by systemd since version 205 (and will not work with systemd-212 or higher). 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.  However, OpenVZ, as of [http://openvz.org/Download/kernel/rhel6/042stab094.7 kernel build 042stab094.7], has backported the CLOCK_BOOTTIME feature, making it work with later versions of systemd.
 +
* Systemd since version 220 doesn't work on OpenVZ containers. [https://github.com/systemd/systemd/issues/421]  This issue has been fixed in OpenVZ kernel 042stab111.1 [https://bugzilla.openvz.org/show_bug.cgi?id=3280#c11]}}
  
 
==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://github.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 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.xx || OpenVZ || Dallas, US-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]]. Limited information available before purchase. Cannot verify Arch Linux version without purchase.
+
| [http://www.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]]
 
|-
 
|-
| [http://afterburst.com/ Afterburst] || 2012.12.01 || OpenVZ || Miami, US-FL; Nuremberg, DE || Formerly FanaticalVPS, kernel version depends on what node your VPS is on, the ones in Miami are fine (2.6.32-042stab072.10) but some of the ones in Germany require a [[Virtual_Private_Server#OpenVZ:_kernel_too_old_for_glibc|custom glibc]].
+
| [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.clodo.ru/ Clodo.ru] || 2011.xx.xx || Xen || Moscow, RU || Russian language only site. Can pay per hour. Lists an invalid release version of the installer.
+
| [https://www.atlantic.net/ Atlantic.Net] || 2015.05.01 || KVM || NYC/SF/Toronto/Dallas/Orlando, US & Canada || 100% SSD 1-click Arch Linux, ready in 30 seconds
 
|-
 
|-
| [https://digitalocean.com DigitalOcean] || 2013.05.xx || KVM || New York, US-NY; San Francisco, US-CA; Amsterdam, AN || Uses a custom kernel; do not install the {{pkg|linux}} package. Every server uses SSDs by default.
+
| [http://www.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.  
 
|-
 
|-
| [http://en.edis.at/ 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).
+
| [https://coinshost.com/en/vps Coinshost] || 2015.04 || Xen || Zurich, Switzerland || Bitcoin and other cryptocurrencies accepted.
 
|-
 
|-
| [https://www.directvps.nl/ DirectVPS] || 2013.01.xx || OpenVZ || Amsterdam, AN; Rotterdam, AN || Dutch language site. Unable to verify Arch Linux version.
+
| [https://www.directvps.nl/ DirectVPS] || 2014.01.xx || OpenVZ || Amsterdam, NL; Rotterdam, NL || (Dutch language site only)
 +
|-
 +
| [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).
 +
|-
 +
| [https://www.gandi.net/hosting/ Gandi] || 2013.10.27 || Xen || Paris, FR; Baltimore, MD, US; Bissen, LU || Very granular scaling of system resources (e.g. RAM, disk space); IPv6-only option available; you can supply your own install image, version based on keyring package version; Baltimore facility shutting down 2016-12-01
 
|-
 
|-
 
| [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 ||
 
| [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 ||
 
|-
 
|-
| [http://www.vr.org/ Host Virtual] || [http://www.vr.org/os/linux-vps/archlinux-vps 2011.08.19] || 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.
+
| [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.
 
|-
 
|-
 
| [https://hostigation.com/ Hostigation] || [https://hostigation.com/wiki/index.php?title=KVM:Install 2010.05 i686] || OpenVZ, KVM || Charlotte, US-NC; Los Angeles, US-CA || You can [[Migrating Between Architectures Without Reinstalling|migrate to x86_64]].
 
| [https://hostigation.com/ Hostigation] || [https://hostigation.com/wiki/index.php?title=KVM:Install 2010.05 i686] || OpenVZ, KVM || Charlotte, US-NC; Los Angeles, US-CA || You can [[Migrating Between Architectures Without Reinstalling|migrate to x86_64]].
 
|-
 
|-
| [http://www.intovps.com IntoVPS] || 2012.09.xx || OpenVZ || Amsterdam, NA; Bucharest, RO; Dallas, US-TX; Fremont, US-CA; London, GB || Blog has not been updated since September, 2012 which included the Arch Linux update.
+
| [https://www.kloud51.com Kloud51] || Latest || OpenVZ || US-CA, Canada || SSD, 2 images available:  A bare-bones system or a pre-configured Desktop with OpenBox, XRDP, Firefox, SSH Brute Force, Geany, and Yaourt.
 
|-
 
|-
| [https://www.linode.com Linode.com] || [https://www.linode.com/faq.cfm 2013.06.xx] || OpenVZ|| [https://www.linode.com/speedtest/ Tokyo, JP; Multiple US; London, GB] || Uses a custom kernel; do not install the {{pkg|linux}} package.
+
| [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://lylix.net/home Lylix] || [https://customer.lylix.net/announcements/21/New-64-bit-Linux-Distributions-and-32-bit-Ubuntu-1304.html 2013.xx.xx] || Unlisted || Unlisted || Core2Duo and Woodcrest based processors.  
+
| [https://linevast.de Linevast.de] || Latest || OpenVZ, KVM || Germany || Arch Linux is possible on openvz and on KVM with the one click os installer.  
 
|-
 
|-
| [http://www.nodedeploy.com Node Deploy] || xxxx.xx.xx || OpenVZ, KVM || Germany (DE); Los Angeles, US-CA; Atlanta, US-GA; Phoenix, US-AZ || "At NodeDeploy we support virtually every linux distribution." Arch Linux is listed under their Operating Systems. No version information.
+
| [https://www.linode.com Linode.com] || [https://www.linode.com/faq.cfm 2015.08 and 2015.02] || Xen, KVM || [https://www.linode.com/speedtest/ Tokyo, JP; Multiple US; London, GB] || To run a custom kernel, install {{AUR|linux-linode}} ({{pkg|linux}} will break on a 32-bit Linode). When shipped, the NIC enp4s0 is renamed to eth0 and reverts back to enp4s0 on reboot --- on reboot, this may cause sshd load to fail.
 
|-
 
|-
| [http://netcup.de Netcup] || 2012.11.xx || KVM || Germany (DE)|| German language site.
+
| [http://lylix.net/ LYLIX] || [http://lylix.net/archlinux 2014.01.xx] || OpenVZ || Multiple US; Europe || 32-bit and 64-bit available
 
|-
 
|-
| [http://onepoundwebhosting.co.uk OnePoundWebHosting] || 2013.05.xx || Xen PV, Xen HVM || United Kingdom (UK) || They are a registrar too. Unable to verify server locations.
+
| [https://www.nodedeploy.com/ Node Deploy] || 2014.10.01 || OpenVZ, KVM || Germany (DE); Los Angeles, US-CA; Atlanta, US-GA; Phoenix, US-AZ || "At NodeDeploy we support virtually every linux distribution." Arch Linux is listed under their Operating Systems. No version information.
 
|-
 
|-
| [https://www.proplay.biz/ proPlay.de] || 2012.12.xx || OpenVZ, KVM || Germany (DE) || German language site.
+
| [https://www.netcup.de/ Netcup] || 2012.11.xx || KVM || Germany (DE)|| (German language site only)
 
|-
 
|-
| [http://www.rackspace.com/cloud/cloud_hosting_products/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.
+
| [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://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 IRC. ||
+
| [https://www.ovh.com/us/vps/ OVH] || Latest || KVM || France, Canada ||
 
|-
 
|-
| [http://www.ramnode.com RamNode]  || [https://clientarea.ramnode.com/knowledgebase.php?action=displayarticle&id=48 2013.07.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 OpenVZ, KVM] || [https://clientarea.ramnode.com/knowledgebase.php?action=displayarticle&id=18 Seattle, WA USA, Atlanta, GA USA] || [https://clientarea.ramnode.com/knowledgebase.php?action=displayarticle&id=66 You can request Host/CPU passthrough with KVM service.] [http://www.ramnode.com/about.php Customer service has been prompt and professional.] [https://twitter.com/search?q=ramnode%20code&src=typd Regular discount codes can be found (15-35% off).] [http://www.ramnode.com/index.php Modern hardware.] [https://clientarea.ramnode.com/cart.php?carttpl=svz Competitive pricing (before discounts).] ||
+
| [https://www.pacmanvps.com/ PacmanVPS] || [https://panel.pacmanvps.com/machines/new Latest] || KVM || Canada (CA), Poland (PL) || Support for any kernel. Ready to use template or install manually from ISO in VNC console.
 
|-
 
|-
| [http://www.tilaa.nl/ Tilaa] || 2013.06.01 || [https://www.tilaa.com/pages/vps/technology KVM] || Amsterdam, NL || English or Dutch language site.
+
| [https://www.proplay.de/ Proplay] || Latest || OpenVZ, KVM || Germany (DE) || (German language site only)
 
|-
 
|-
| [https://www.transip.eu/ TransIP] || [https://www.transip.eu/vps/vps-os/ 2013.05.01] || [https://www.transip.eu/vps/vps-technology/ KVM] || Amsterdam, NL || English language site. Registrar.
+
| [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.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.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.
 +
|-
 +
| [https://www.rosehosting.com/ RoseHosting] || Latest || OpenVZ, KVM || St. Louis, Missouri, USA || SSD powered hosting plans with free fully-managed 24/7 support
 +
|-
 +
| [https://www.tilaa.com/ Tilaa] || 2016.03.01 || [https://www.tilaa.com/pages/vps/technology KVM] || Amsterdam, NL ||
 +
|-
 +
| [https://www.transip.eu/ TransIP] || [https://www.transip.eu/vps/vps-os/ 2016.02.01] || [https://www.transip.eu/vps/vps-technology/ KVM] || Amsterdam, NL || Also registrar.
 +
|-
 +
| [https://upcube.io upCUBE] || Latest || Docker || Germany || Different prepared arch linux templates available
 
|-
 
|-
 
| [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]
 
| [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]
 
|-
 
|-
| [http://www.virpus.com/ Virpus] || [http://virpus.com/tour/ 2013.05.xx] || OpenVZ, Xen || Kansas City, US-KS; Los Angeles, US-CA ||
+
| [http://virpus.com/ Virpus] || [http://virpus.com/linux-vps.php 2014.11.07] || Xen || Kansas City, US-KS; Los Angeles, US-CA || A subcompany of Wow Technologies, Inc.  24/7 support via Live Chat, Email, Phone, and Ticket System.
 
|-
 
|-
| [http://www.vmline.pl/ Vmline] || 2012.08.04 || Xen-HVM, OpenVZ || Kraków, PL || [http://www.s-net.pl/en/ S-Net] reseller. It's probably impossible to install i686 due to lack of xen_netfront and xen_blkfront modules. Polish language site. ||
+
| [https://www.virtualmaster.com/ Virtual Master] || 2012-08 || ?? || Prague, CZ ||
 +
|-
 +
| [http://www.vmline.pl/ VMLine] || 2013.09.01 || KVM, OpenVZ || Kraków, PL || (Polish language site only) [http://www.s-net.pl/en/ S-Net] reseller. Full virtualization.
 +
|-
 +
| [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://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://vps6.net/ VPS6.NET] || 2013.01.xx || OpenVZ, Xen, HVM-ISO || [http://vps6.net/network/ Multiple US]; Frankfurt, DE; Bucharest, RO; Istanbul, TR || Registrar.
 +
|-
 +
| [http://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)
 
|-
 
|-
 
|}
 
|}
Line 74: Line 105:
 
===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===
  
====Getting a 2010.05 Image Up To Date====
+
====Installing the latest Arch Linux on any OpenVZ 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).
+
{{Warning|See the [[#top|above warning]] about older kernel builds and systemd.}}
  
{{Warning|If you are on a older kernel than 2.6.32, please refer [[Virtual_Private_Server#OpenVZ:_kernel_too_old_for_glibc|further down the page]] to get the glibc-vps repo working (just add the repo and you can follow these steps).}}
+
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]].
  
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).
+
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 probably even to physical hardware (unconfirmed), extra steps (basically running {{ic|mkinitcpio}} and [[Boot loaders|installing a bootloader]]) are needed.
  
{{bc|wget http://busybox.net/downloads/binaries/latest/busybox-i686
+
=====Prerequisites=====
chmod +x busybox-i686}}
+
  
First off you can get a list of packages that own files in /lib with the following command:
+
* A working Arch Linux installation
{{bc|<nowiki>
+
** To keep things simple, it should match the architecture you want to install on your VPS (x86_64 or i686).
pacman -Qo /lib/* | cut -d' ' -f 5 | egrep -v 'glibc' | uniq | xargs
+
** To build from other distributions, [[Archbootstrap|arch-bootstrap.sh]] can be used in place of {{ic|pacstrap}}.
</nowiki>}}
+
* 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.
 +
{{Note|Since Arch Linux uses symlinks for {{ic|/bin}}, {{ic|/sbin}}, {{ic|/lib}} and {{ic|/lib64}}, it is recommended to use a distribution that does the same to avoid issues while installing Arch Linux with {{ic|rsync}}. An example of such a distribution is Fedora 23.}}
 +
* 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.
  
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:
+
=====Building a clean Arch Linux installation=====
  
{{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}}
+
As root, build the installation (optionally replacing {{ic|build}} with your preferred target directory):
  
You may have to remove /lib/udev/devices/loop0 (a simple rm works).
+
# mkdir build
 +
# pacstrap -cd build
  
After the upgrade finishes, you must remove any extra empty directories in /lib (/lib/modules is the common offender):
+
Other tweaks for the {{ic|pacstrap}} command:
{{bc|rm -rf /lib/modules}}
+
  
Install tzdata to fix some dependencies and remove /etc/profile.d/locale.sh:
+
*{{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|pacman -S tzdata
+
*{{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.
rm /etc/profile.d/locale.sh}}
+
*{{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}}
  
Remove /var/run (you should have nothing running that matters):
+
=====Replacing everything on the VPS with the Arch build=====
{{bc|rm -rf /var/run}}
+
  
Force glibc (this will pull in the latest filesystem, but BREAK everything (other than busybox)):
+
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 --force glibc}}
+
  
Now you will have a broken system, so first thing symlink /usr/lib to /lib with busybox's ln:
+
{{Warning|Be careful with the following command. By design, {{ic|rsync}} is very destructive, especially with any of the {{ic|--delete}} options.}}
{{bc|./busybox-i686 ln -s /usr/lib /lib}}
+
  
And you should have a fully functional system where you can now update pacman.
+
# rsync -axH --delete-delay -e ssh --stats -P build/ YOUR.VPS.IP.ADDRESS:/
  
{{bc|pacman -S pacman; pacman-key --init; pacman-key --populate archlinux; pacman-db-upgrade; pacman -Syy}}
+
Explanation of options:
  
Now, update initscripts to get iproute2:
+
At minimum, only the {{ic|-a}} (preserve timestamps, permissions, etc.), {{ic|-x}} (do not cross filesystem boundaries), and {{ic|--delete}} (delete anything in the target that does not exist in the source) options are required.  The {{ic|--delete-delay}} option is an alternate deletion mode which waits to delete anything until the synchronization is otherwise complete; this is not necessary but may reduce the risk of a slow transfer causing the target VPS to lock-up. The {{ic|-H}} causes hardlinks to be preserved. The {{ic|-e ssh}} (use rsync over SSH) option is recommended and makes things simple.  The {{ic|--stats}} and {{ic|-P}} options are just to show more information.
  
{{bc|pacman -S iniscripts}}
+
=====Configuration=====
  
Install makedev:
+
# Reboot the VPS externally (using your provider's control panel, for example).
{{bc|pacman -S makedev}}
+
# 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
  
Add the following to your /etc/rc.local:
+
IP=static
{{bc|/usr/sbin/MAKEDEV tty
+
Address=('192.0.2.42/32')
/usr/sbin/MAKEDEV pty}}
+
Routes=('default')
  
Comment the following lines in /etc/inittab:
+
IP6=static
{{bc|#c1:2345:respawn:/sbin/agetty -8 -s 38400 tty1 linux
+
Address6=('2001:db8::1234:5678/128')
#c2:2345:respawn:/sbin/agetty -8 -s 38400 tty2 linux
+
Routes6=('default')
#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}}
+
  
Finally, you should be able to upgrade the whole system:
+
DNS=('2001:4860:4860::8888' '2001:4860:4860::8844' '8.8.8.8' '8.8.4.4')
 
+
}}
{{bc|pacman -Su}}
+
 
+
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.
+
 
+
{{bc|pacman -S --force krb5
+
pacman -S openssh openssl
+
pacman -R heimdal
+
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).
+
 
+
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.
+
 
+
 
+
====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=(
+
#default
+
'addr add 127.0.0.1/32 broadcast 0.0.0.0 dev venet0'
+
#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}}
+
  
 
===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#Arch as Xen guest (PVHVM mode)]] and/or [[Xen#Arch as Xen guest (PV mode)]].
 
===Converting Openstack and Xen components to systemd===
 
 
There are three components that need to be enabled in systemd when using a VPS based on Openstack/Xen, such as Rackspace NextGen Cloud.  The current version of {{Pkg|xe-guest-utilities}} contains two of these, xe-linux-distribution and xe-daemon.
 
 
You will need to create a custom service file for the Openstack nova-agent, as the current version 0.0.1.37 only comes with a sysvinit startup script.
 
 
/etc/systemd/system/nova-agent.service
 
 
{{bc|1=[Unit]
 
Description=nova-agent service
 
After=xe-daemon.service
 
 
[Service]
 
Environment=LD_LIBRARY_PATH=/usr/share/nova-agent/0.0.1.37/lib
 
ExecStart=usr/bin/nova-agent -n -l info /usr/share/nova-agent/nova-agent.py
 
 
[Install]
 
WantedBy=multi-user.target}}
 
Once these steps are done you can continue with converting the server from sysvinit to systemd.
 
 
{{bc|systemctl enable xe-linux-distribution.service
 
systemctl enable xe-daemon.service
 
systemctl enable nova-agent.service}}
 
 
==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
 
 
===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 21:26, 21 July 2016

Related articles

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:
  • Linux 2.6.32 is not supported by systemd since version 205 (and will not work with systemd-212 or higher). 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. However, OpenVZ, as of kernel build 042stab094.7, has backported the CLOCK_BOOTTIME feature, making it work with later versions of systemd.
  • Systemd since version 220 doesn't work on OpenVZ containers. [1] This issue has been fixed in OpenVZ kernel 042stab111.1 [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 2015.05.01 KVM NYC/SF/Toronto/Dallas/Orlando, US & Canada 100% SSD 1-click Arch Linux, ready in 30 seconds
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.
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).
Gandi 2013.10.27 Xen Paris, FR; Baltimore, MD, US; Bissen, LU Very granular scaling of system resources (e.g. RAM, disk space); IPv6-only option available; you can supply your own install image, version based on keyring package version; Baltimore facility shutting down 2016-12-01
GigaTux 2013.06.01 Xen Chicago, US-IL; Frankfurt, DE; London, GB; San Jose, US-CA
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.
Hostigation 2010.05 i686 OpenVZ, KVM Charlotte, US-NC; Los Angeles, US-CA You can migrate to x86_64.
Kloud51 Latest OpenVZ US-CA, Canada SSD, 2 images available: A bare-bones system or a pre-configured Desktop with OpenBox, XRDP, Firefox, SSH Brute Force, Geany, and Yaourt.
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.com 2015.08 and 2015.02 Xen, KVM Tokyo, JP; Multiple US; London, GB To run a custom kernel, install linux-linodeAUR (linux will break on a 32-bit Linode). When shipped, the NIC enp4s0 is renamed to eth0 and reverts back to enp4s0 on reboot --- on reboot, this may cause sshd load to fail.
LYLIX 2014.01.xx OpenVZ Multiple US; Europe 32-bit and 64-bit available
Node Deploy 2014.10.01 OpenVZ, KVM Germany (DE); Los Angeles, US-CA; Atlanta, US-GA; Phoenix, US-AZ "At NodeDeploy we support virtually every linux distribution." Arch Linux is listed under their Operating Systems. No version information.
Netcup 2012.11.xx KVM Germany (DE) (German language site only)
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 Latest KVM Canada (CA), Poland (PL) Support for any kernel. Ready to use template or install manually from ISO in VNC console.
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.[3] Frequent use of discount promotions.[4], 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
Tilaa 2016.03.01 KVM Amsterdam, NL
TransIP 2016.02.01 KVM Amsterdam, NL Also registrar.
upCUBE Latest Docker Germany Different prepared arch linux templates available
XenVZ 2009.12.07 OpenVZ, Xen United Kingdom (UK), United States (US) Hardware
Virpus 2014.11.07 Xen Kansas City, US-KS; Los Angeles, US-CA A subcompany of Wow Technologies, Inc. 24/7 support via Live Chat, Email, Phone, and Ticket System.
Virtual Master 2012-08  ?? Prague, CZ
VMLine 2013.09.01 KVM, OpenVZ Kraków, PL (Polish language site only) S-Net reseller. Full virtualization.
VPSBG.eu 2013.10 OpenVZ Sofia, Bulgaria Offshore VPS in Bulgaria - anonymous registrations and Bitcoin are accepted.
VPS6.NET 2013.01.xx  OpenVZ, Xen, HVM-ISO Multiple US; Frankfurt, DE; Bucharest, RO; Istanbul, TR Registrar.
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)

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:Virtual Private Server#)

See QEMU#Preparing an (Arch) Linux guest.

OpenVZ

Installing the latest Arch Linux on any OpenVZ provider

Warning: See the above warning about older kernel builds and systemd.

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 probably even to physical hardware (unconfirmed), extra steps (basically running mkinitcpio and installing a bootloader) 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.
Note: Since Arch Linux uses symlinks for /bin, /sbin, /lib and /lib64, it is recommended to use a distribution that does the same to avoid issues while installing Arch Linux with rsync. An example of such a distribution is Fedora 23.
  • 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
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 --delete-delay -e ssh --stats -P build/ YOUR.VPS.IP.ADDRESS:/

Explanation of options:

At minimum, only the -a (preserve timestamps, permissions, etc.), -x (do not cross filesystem boundaries), and --delete (delete anything in the target that does not exist in the source) options are required. The --delete-delay option is an alternate deletion mode which waits to delete anything until the synchronization is otherwise complete; this is not necessary but may reduce the risk of a slow transfer causing the target VPS to lock-up. The -H causes hardlinks to be preserved. The -e ssh (use rsync over SSH) option is recommended and makes things simple. The --stats and -P options are just to show more information.

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:Virtual Private Server#)

See Xen#Arch as Xen guest (PVHVM mode) and/or Xen#Arch as Xen guest (PV mode).