Last year I rented a OpenVZ based Virtual Private Server (VPS) for a discount price. I needed a new host to experiment with. My other Internet machine, the taper server (a QEMU virtual machine donated to me by a Slackware fan) is not meant for tinkering. It is running the Slackware Documentation Project, and I like to keep that online 24/7.
OpenVZ is a container-based virtualization service for Linux which has widespread use among hosting providers, because it is easy to setup and manage. I did not have prior experience with it, but the pricetag was compelling and I thought, I would find a way to install Slackware on it eventually.
OpenVZ works with an OS “template” which is basically a tarball of a directory tree that holds a complete working OS installation. When renting such a VPS, the usual default choices for your OpenVZ template are Ubuntu, CentOS or Debian. There is a repository of community-supplied templates, but the most recent Slackware template is a very bare-bones Slackware 13.37. So I settled for CentOS 6 in order to see how an OpenVZ based VPS was different from a fully virtualized solution like a QEMU VM and use that experience to create a working Slackware template.
I meant to create a new template based on Slackware 14.1 and the hosting provider was willing to co-operate once I had a tarball ready. However, I had a few doubts which I expressed in a Google+ post. The reactions to that post did not help feeling more confident, and I was convinced that I needed access to the local console of the VPS to be able to debug any boot-up issues that would prevent the SSH daemon from starting (thus preventing remote access). In an unfortunate chain of events, the hosting provider switched from SolusVM to an inhouse developed control panel exactly at that time, and providing (serial) console access was not a first priority for them. So I decided to wait patiently until a serial console was added. Actually, their Control Panel is a nice piece of work, and some months ago they finally made a local console available as well. But at that time I was consumed with getting Plasma 5 packages production ready. And time slipped away silently.
Last week, I decided to pick up my old initiative, dusted off the template creation script that I half-finished last year and using that script I created a first version of a 64bit Slackware 14.1 template. HostUS, my provider, set me up with a VPS for free based on that tarball I gave them so that I could test and debug the template without harming my paid-for VPS. I was very grateful for that, because it turned out the VPS was not booting. An OpenVZ container is limited in certain ways that the Slackware boot scripts do not expect. For instance, the VPS is running on the host kernel (“uname -a” returns: Linux brin 2.6.32-042stab094.7 #1 SMP Wed Oct 22 12:43:21 MSK 2014 x86_64 Intel(R) Xeon(R) CPU L5639 @ 2.13GHz GenuineIntel GNU/Linux). The filesystem is writable on boot; there is no hardware clock; there is no eth0; etcetera.
It took me a little while to get rid of the boot-up bugs and I definitely needed the access to the VPS console to stop it from dropping to the emergency shell, but then I ended with a Slackware VPS that booted out of the box.
I created a template for 32bit Slackware 14.1 as well, provided HostUS with both template tarballs and a Slackware logo bitmap, and then they added Slackware 14.1 (32bit and 64bit) as choices for VPS installation:
Hooray! Support was amazing, no silly questions asked, these guys are friendly and cooperative. Minutes after adding Slackware as an option in their VPS control panel, they tweeted:
I guess they were as excited as I am about the new offering 🙂 I told them last year that I wanted to run Slackware on their VPS and that I intended to host a new Slackware mirror there but was a bit afraid of exceeding my monthly bandwidth quota; taper serves more than 5 TB per month to you guys, which equals to my monthly quota limit at HostUS. They immediately responded and (without me having asked) increased my monthly bandwidth TEN-fold. For free. That shows the level of their support I guess.
Some technicalities: the script that created these templates is available on slackware.com. It builds a minimal installation of Slackware 14.1 (89 packages in total). That includes gcc because I do not take a Linux installation seriously which does not ship with a C compiler. This will occupy some 365 MB on your VPS disk once it is running. You could trim this down quite a bit more I guess, but there is a difference between minimal and barebones. My definition of minimal is that you should get a lot of useful tools on a console-based Slackware out of the box, not something that will boot and not much more.
This OpenVZ template comes with slackpkg pre-configured, using the generic URL “mirrors.slackware.com” so that your packages will always be downloaded from a mirror near you. OpenVZ is a bit peculiar in the sense that it knows a little bit about how Linux distros are being configured. So the OpenVZ control panel is the place where you configure the hostname, IP address and root password of your VPS. In order to make the Slackware installation internet-aware out of the box, I added two Google DNS IP addresses to its “/etc/resolv.conf” file. The result? Once provisioned, the VPS starts fast and mere seconds after booting I was able to login as root to my new machine.
I will use the long Pentecost weekend to setup some initial services and seed a Slackware mirror.
And you can consider the option of using this referral link to rent a Slackware 14.1 VPS for yourself 😉
Have fun! Eric
Nice job Eric, as always!
Thank you so much Eric! I had been using vultr.com (because they allow custom ISO’s, and have servers in Seattle), but this looks VERY attractive.
I appreciate all you do!
Wow man, great job!
Nice work, Eric. The minimal package selection is very helpful, and I guess I’ll use it in the future. One thing that seems annoying is the bandwidth limit. The french provider online offers comparable bare-metal servers with unlimited (!) bandwidth starting at 6,00 euro per month. They don’t (yet) have Slackware on offer, but I managed to install it anyway. I contacted their admins, and now they have to think about putting Slackware on offer besides the usual suspects Debian, CentOS, Ubuntu LTS and FreeBSD.
Hi Niki
Yeah, having a serious contender in the US may have them reconsider adding Slackware as an offering. What platform are they using? KVM or OpenVZ?
The bandwidth limit is what made me hesitate initially, but I used a temporary discount offer, and I basically get their “OVZ6” but with 6GB of RAM and swap instead of 4, for 60% of the list price. Plus 50 TB/month instead of 5. And having 3 IPv4 addresses with reverse DNS as part of the deal is nice!
The dealmaker was their promise that they would work with me to have Slackware added as a guest OS selection.
Hi:
see “slackware” mentions in their knowledge base:
http://my.hostus.us/knowledgebase.php?action=displayarticle&id=82
I’ve run Slackware 14.1 ISOs in KVM (Ramnode services: https://clientarea.ramnode.com/knowledgebase.php?action=displayarticle&id=48 , but they don’t offer OpenVZ template for Slackware).
Which local console method is offered by hostus.us? I am been searching ins their knowledge base, but no answer. Ramnode gave me web-based control panel and VNC server (listening at a public IP:port, with password different from web-control panel).
I am looking a local console access for text-only mode, better than VNC. A very good local console method is Linode shell (Lish), used by Linode: https://www.linode.com/docs/networking/using-the-linode-shell-lish/ https://www.linode.com/docs/networking/remote-access But Linode is expensive (and uses Xen, not OpenVZ).
Hi thisnameisfalse
HostUS offer a local console to the container which is disabled by default. If you enable it, you’ll get an IP address, a portnumber, a login name and password (the password will be shown only once so you will have to write it down). You use that to setup a ssh connection and you’ll end up in the container’s console. Not the actual console as you would see on a real computer; they call it a “serial console” which does not require any configuration in the container… it just works.
I needed this “serial console” at first because my Slackware would not boot completely and got stuck in an emergency shell. So there was no remote access through ssh.
Nice additions, Eric!
I’m in the process to move all my day job operation from Ubuntu to Slackware at AWS. The internal operation instances all ran Slackware at the present time based on the guide I wrote to Slackware Documentation Project. Customer instances are on the way as the application used to have some strong Ubuntu attachments that are now broken.
As I refuse to use most of AWS provided tools that lock me in there, it would be a nice thing to try those other VPS. If they do work fine, I could not just easily move from one region to another at AWS but also move to another VPS provider at will.
I can think about something really nasty: to have an automated job measuring prices and other critical operation metrics (performance, latency, bandwidth, IOPS and so on) from many VPS out there to move services back and forth based on the best cost/benefit ratios.
There’s no need to move any instance itself, as the creation and provisioning could be automated too. It’s just a matter of moving core application data. This might take quite some time for big silos, but there’s no need to rush if you have a production instance already online (the source of data). When all the sync completes, just fire up the destination instance in the other VPS, run some sanity checking and purge the old one as you know that a more efficient operation condition is waiting for you at the end. I can even think that this move can be done with no downtime at all.
That’s may be quite disruptive for the cloud market. Does anybody know if someone out there already came out with something similar?
Hi Eric, Online’s Dedibox servers are neither KVM nor OpenVZ, but *bare metal*. You get a whole machine for yourself, with unlimited bandwidth.
Hi Eric!
I’ve used your template creation script and successfully deployed the Slackware 14.1 template to our host nodes at the office.
The Slackware 14.1 CT has been running smoothly without issues, and I’m hoping to roll it into production in the near future.
Our host nodes are running Proxmox VE (open source) if anyone is interested.
Anyhow, thank you very much, your efforts are highly appreciated.
Hi Roger
Glad to hear that the template was useful beyond my own scope.
Now I have again a slackware VPS!
And I also learned how to upgrade glibc in older kernels!
Thank you!
Great work!
Well done Eric,
I have been looking for such service which includes Slackware OS, one of the most valuable service was what you had mentioned. The provider is fine for starts and have nice custom configuration hardware besides has the Slackware 14.1 version whereas others have older versions.
Thanks !
Just to remember for those interested. The HostUS have a website with several issues and a worse support attention.
Guille if you make such accusations you need to add details. I never had any issues with their web site, in fact I think it is working rather well. Also, every support ticket I ever logged was answered within the hour and solved soon after. I never had issues with them.
Yes I have details.
1. the webpage have no options for login at mobile devices, or you need to do some tricks to get into login page. Now I would say that this is not a huge problem, since I saw that is a template problem, other services providers with similar web gui interfaces have the same issue.
2. They asked me to do the same thing more than once by email this indicates a leak of coordination at the team. Imagine at a restaurant that you have to repeat what you want meanwhile you are hours waiting.
3. the support is really bad at my point of view, I have been a customer of hosting services now for more than six years. At this hosting service my tickets have 1 hour reply including a good customers care, a property communication letter with more than 180 characters, good excuses and apologies. My tickets stay waiting more than hours and with some answer came they are shortly and almost without explanations.
Well alien, I would say that now a saw a small company without support capabilities. Or maybe a common problem, the $$$. Paying 1/4 of price for a VPS is worth than a shared hosting service.
Hi, Eric!
Please, do you plan to write a guide about how to upgrade this hostus template to 14.2 inside VM?
Or maybe do you plan to create another template for them?
Thanks!
Hi Weber
I am planning on providing a new OpenVZ template for Slackware 14.2. If you want to upgrade an existing installation you do not need a template of course – your running VPS just needs a lot of upgradepkg to bring it to a Slackware 14.2 level. Read the documentation at http://docs.slackware.com/howtos:slackware_admin:systemupgrade for instance.
Hi, Eric!
I’ve updated the list of packages from your script: http://www.slackware.com/~alien/tools/create_slackware_openvz_template.sh
To this list: http://pastebin.com/9D3ZsF6Q
I dont know if it is really necessary to add these:
a/hwdata
a/procps-ng
I’ve double checked CHANGES_AND_HINTS.TXT but maybe some more are missing.
: – /
Thanks!
Hi Weber K.
I have this modification on my TODO… in fact I promised HostUS (the company for which I created the Slackware 14.1 template) that I would generate a 14.2 template. But my job hunt interfered and it has been delayed.
I will have a look at the diff between my original list and your update, and hopefully I can use your input. Thanks!
Hey Eric, HostUS are great I admit, I am using them for a years, as you know Centos 6 is now DOA, so with 14.2 image, how easy will it be to upgrade to current or 15?
like can we do the same commands we need to on a real pc at home, or will the boot fail, since OVZ uses host kernels I know it wont break their but will it break on sysv scripts?
I stopped using OpenVZ servers because of that weird old incompatible kernel they use. I had issues compiling LibreOffice as a result of that incompatibility and I could not resolve those. So I switched to a bare-metal server I am now renting and I am quite happy with that.
Hey Eric. Thanks for all the work you did with HostUs, I subscribed for 2 of the VPSs just because of your work – looking forward to 14.2. I am having one issue that I’m not sure of how to work around. I’d like to loop mount an ISO image with in the VPS and it is not working. Thoughts welcome.
Hi!
In my Slackware64 desktop I’ve installed KVM with CENTOS 6.8 guest and then inside guest installed openvz kernel and openvz web panel.
Then, I’ve tested your script with my package list, like this:
Created these subdirs:
/home/someuser/openvz_template
/home/someuser/openvz_template/openvz_temp
/home/someuser/openvz_template/output
/home/someuser/openvz_template/slackware64-14.2/patches/packages/
/home/someuser/openvz_template/slackware64-14.2/slackware64/
In the last subdir I’ve put these packages: http://pastebin.com/9D3ZsF6Q
As root execute this script: http://pastebin.com/8b00U8vm
It’s just your script with only four changes, labeled from #1 to #4.
In my openvz guest I’ve installed the template generated above and… It worked!
Since glibc now ships with –enable-kernel=2.6.32, I guess it won’t need any change.
I also needed to login from console first and change sshd_config to allow root and password, and restart sshd, before network login.
I couldn’t find where to look for booting error messages.
I hope this work can help you in providing our next openvz template.
Thank you!
Hello Eric,
sorry for the reply on an old post, but did you find the time to build the new template for HostUS?
I’ve been using their services since you spoke about them the first time. They’ve been great so far.
thanks in advance
Hi danix.
I have canceled my server at HostUS, and so I do not have a platform for testing new OpenVZ templates anymore.