Talk:Virtual Private Server

From ArchWiki
Jump to: navigation, search

Rsync Method for Using Any Provider

In the note about using providers that don't directly support Arch, I mentioned a method to do so involving rsync'ing Arch over the top of an working container. In case anybody finds this claim spurious, I just want to say that I've successfully done this with about 5 different VPS providers. I've done it on OpenVZ and Xen, and I've even successfully migrated existing servers from OpenVZ to Xen and from Xen to OpenVZ using this method. I intend to write a tutorial about this and put it in the wiki at some point, but here are the basic steps. 1. Make a working Arch container (here's the script I used last time I did it, modified from the one at the OpenVZ wiki). 2. Create a working VPS with OpenVZ or Xen, running the same architecture (i686 or x86_64) as your Arch container and make sure it has rsync (and probably working SSH for ease). 3. Using rsync, synchronize the Arch container's root (/) directory over the top of the VPS' root directory, using both the "--one-file-system" and "--delete" rsync options. 4. If using Xen (or other hardware virtualization), install a bootloader and reboot (externally). If using shared kernel virtualization (OpenVZ), just reboot (externally). 5. Reconfigure the network (although this could have optionally been done before the synchronization). --Magotchi (talk) 19:25, 15 December 2014 (UTC)

Awesome tip, thanks! Can you confirm that the latest systemd works on the current version of OpenVZ? I've been using Arch in a VPS container for years and have prevented my systemd from going past version 204 because of issues that seem to have been resolved now but that require a clean install. And the 2010.05 root never seems to have been updated after the CLOCK_BOOTTIME issue was fixed. Starting from scratch on a recent Debian and rsync-ing a new root on top of this to try to update everything at once sounds like my best option at this point. Thanil (talk) 02:31, 16 December 2014 (UTC)
I've been in the same boat as you. Until just now, I've been running systemd-211-1, because my provider didn't have the latest OpenVZ kernel. Today, I just set up a fresh Debian 7 64-bit VPS on a new provider, did "rsync -axhP -e ssh --delete --stats / NEW.SERVER.IP.ADDRESS:/" from my old VPS, rebooted the new VPS (via SolusVM), updated its network settings (via OpenVZ's serial console feature), updated systemd to 217-8, and rebooted again (via SolusVM, as the systemd upgrade temporarily broke rebooting). Everything seems to be working fine now. I don't think you have to use a clean install; I imagine you only need the OpenVZ kernel build 094.7 or higher. Either way, it couldn't hurt, as a 4.5 year old Arch image is terribly old in terms of changes to Arch. I highly recommend you run my script I linked above to generate your own fresh template. You just need to install the "devtools" package (provides mkarchroot) and stick a couple up-to-date mirrors in the MIRROR lines at the top (and optionally comment the "tar" line at the bottom, since you won't need it). The other caveat is that the script does make a sort of silly version of /etc/pacman.conf that you might want to replace after you're all done. --Magotchi (talk) 19:38, 18 December 2014 (UTC)
I've added the tutorial. --Magotchi (talk) 22:34, 19 December 2014 (UTC)