Virtual Private Server

From ArchWiki
Jump to: navigation, search

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
A MilesWeb VPS 2013.10.14 OpenVZ Europe, India, US Latest Arch Linux available on OpenVZ platform. Quick setup, 24/7 support via Live Chat, Email and Phone. VPS starts from $20 / mo
123 Systems 2010.05.xx OpenVZ Dallas, US-TX Arch available as a selection upon reinstall. Very old (2.6.18-308) kernel - See OpenVZ troubleshooting. Limited information available before purchase. Cannot verify Arch Linux version without purchase.
4smart.cz 2013.08 (x86_64) OpenVZ Europe, Prague when updating system make sure you use [tredaelli-systemd] in pacman.conf (see Unofficial user repositories
AUSWEB Latest Only (clarify?) VMware ESXi Sydney, AU Latest ISO (clarify?) of Arch Available. Enterprise Service.
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 ArchLinux from $5/mo for 512M/20GB SSD, 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 $3/mo for 512M/20GB. Bitcoin and other cryptocurrencies accepted.
DirectVPS 2014.01.xx OpenVZ Amsterdam, NL; Rotterdam, NL Dutch language site. Version verifyable by clicking through https://www.directvps.nl/try-1.plp?p=31
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
GigaTux 2013.06.01 Xen Chicago, US-IL; Frankfurt, DE; London, GB; San Jose, US-CA
Host Virtual 2011.08.19 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.
IntoVPS 2012.09.xx OpenVZ Amsterdam, NL; Bucharest, RO; Dallas, US-TX; Fremont, US-CA; London, GB Blog has not been updated since September, 2012 which included the Arch Linux update.
Kloud51 2014.7.7 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 ArchLinux currently available in Control Panel for reinstall, not on order form.
Linode.com 2015.02.xx Xen, KVM Tokyo, JP; Multiple US; London, GB To run a custom kernel, install linux-linodeAUR. (linux will break on a 32-bit Linode.)
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.
OnePoundWebHosting 2013.05.xx Xen PV, Xen HVM United Kingdom (UK) They are a registrar too. Unable to verify server locations.
OVH Latest KVM France, Canada $3.5 for 2GB RAM and 10GB SSD, $7 for 4GB RAM and 20GB SSD.
proPlay.de 2012.12.xx OpenVZ, KVM Germany (DE) German language site.
QuickVZ 2013.10 OpenVZ, Xen Amsterdam, Netherlands (NL); Stockholm, Sweden (SE) Provide hardened Arch Linux images along with Enterprise services (e,g. VPN, Virtual Private LAN Service (VPLS) and Virtual Routers.
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 2014.10.01 KVM Amsterdam, NL English or Dutch language site.
TransIP 2016.02.01 KVM Amsterdam, NL English language site. Registrar.
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. Service starts at $5/month.
Virtual Master 2012-08  ?? Europe, Prague
Vmline 2013.09.01 KVM, OpenVZ Kraków, PL S-Net reseller. Full virtualization. Polish language site.
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.
VPS.NET 2014.01.xx  OpenVZ, Xen, HVM-ISO US, Canada, UK, Brazil, Netherlands, France, Germany, Japan, Singapore, India, Austrlia; Multiple Managed & Un managed VPS service provider, multiple OS and configurations..
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.
  • 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.
  • -B - 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.
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.

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).