OpenVZ Forum

Home » General » Discussions » I am thinking of moving to LXD
I am thinking of moving to LXD [message #52531] Wed, 17 August 2016 19:13 Go to next message
votsalo is currently offline  votsalo
Messages: 24
Registered: December 2011
Location: Greece
Junior Member
From: 46.198.252*
I am thinking of moving my dedicated server to LXD (a variant of LXC). One reason is that I can run LXD on several different environments where I can run Ubuntu:
* On a dedicated server.
* On an Amazon EC2 instance.
* On my home machine, running Ubuntu desktop.
* On a cheap Ubuntu 16.04 Openstack KVM VPS.

I find the VPS option very usuful, however tricky because of the tight disk space. I can have a few containers on my VPS. I can move containers between the VPS and another LXD server. I can run a container OS that I need on my VPS that is not offered as a choice by my VPS provider, but is available as an LXD template. And perhaps I can replace the dedicated server with a few cheaper VPSs.

I have tried doing all these with OpenVZ in the past. I couldn't get it to run anywhere, except on the dedicated server or on a dedicated home machine (or dual boot). Now it seems that I cannot run OpenVZ 7.0.0 on any of the above infrastructure.

I have installed OpenVZ 7.0.0 on my home machine, as a dual boot, but I'm not using it, since I use my desktop OS and I cannot use both at the same time. In the past I tried installing OpenVZ on several desktop distributions, but I couldn't find one that worked. It seemed to work on Linux Mint 17, but when I ran a Java IDE, it crashed.

There are other pros and cons to using LXD vs OpenVZ, but the versatility of installation seems to be the deciding factor for me. LXD is Ubiquitous, if you are willing to run Ubuntu (which I am).

If I could easily move containers between OpenVZ and LXD, I could use both. Here's some food for thought for an OpenVZ feature: compatibility with LXD and perhaps with other container technologies. Create an LXD template from an OpenVZ container. Or an OpenVZ container from an LXD template. Why not?
I did [message #52779 is a reply to message #52531] Sat, 18 March 2017 10:09 Go to previous message
votsalo is currently offline  votsalo
Messages: 24
Registered: December 2011
Location: Greece
Junior Member
From: 46.198.251*
I migrated to LXD, several months ago, and I like it. I have about 30 running containers on my dedicated server, for personal or non-profit use, websites etc. I use containers with the ZFS filesystem, which allows me to take instant snapshots and copies. It takes 10 seconds to make a test copy of a full ubuntu container and start it. I often have one container per project (website, etc.) so I can easily experiment with it, make snapshots, temporary test copies, revert to the last snapshot, etc. I use two container templates, the official ubuntu 16.04 and the latest Alpine. Alpine is very small. I use it for pound, static websites, git, certbot, and backup containers. I use a single external IP address for all the containers on my host, just like I did with OpenVZ. I use shorewall to redirect various ports to different containers. I redirect a separate port to SSH for each container. I also redirect the HTTP and HTTPS ports to a pound container that proxies requests to various containers according to the Host header (using SNI for HTTPS).

I also use LXD on a home computer, a VPS and an Amazon nano (!) instance. On the VPS I use containers with the ext4 filesystem, running one Ubuntu and two Alpine containers in a total of 10G disk. I tried using ZFS backed-up by flat files but it was tricky and I unexpectedly ran out of disk space. I also tried using ZFS on an add-on filesystem to the VPS. It was good for temporary migrating my OpenVZ containers, but the add-on filesystem performed much worse (with ZFS) than the root filesystem.

I also use LXD on a home computer, and on an Amazon nano instance (running just a backup Alpine container). I like the LXD client, "lxc", which allows me to do all LXD operations remotely, from my desktop.

My LXD containers are not as isolated as the OpenVZ containers. When I do "df" on an LXD container I also see the host lxd filesystem and when I run "top" I see the host RAM. ZFS allows me to set disk quotas for each container. I think I could also limit the RAM for a container. But I don't bother with limits, since I administer all my containers.

I am grateful to OpenVZ for introducing me to containers, and to LXD for giving me more flexibility and ease of use.
Previous Topic: newbie question from former whm user
Next Topic: Considering moving from Docker to OpenVZ
Goto Forum:

Current Time: Tue Sep 19 15:25:00 GMT 2017