Select Page

Setting up LXC live migration to minimize business downtime

Setting up LXC live migration to minimize business downtime

In 2010, Virgin Blue Airlines reported a $20 million dip in profit due to an outage in its online reservation system. Hardware failure was identified as the reason for the outage, but it caused severe damage to Virgin Blue’s reputation, customer loyalty and profit.

Every online business is affected by a downtime at one time or another for reasons as varied as software bugs, hardware issues or human errors.

Mitigation of downtime due to hardware errors is perhaps the most researched topic in data centers. IaaS providers, VPS providers and Cloud providers use strategies such as redundant hardware, fail-over systems and scheduled downtimes to minimize impact to businesses.

Make the best out of your servers!


For instance, in VPS hosting, it is common for servers to be equipped with RAID hard disks, dual network cards, etc. as a hedge against failure. But, even in such a system, hardware replacements are sometimes required, which can lead to business downtime.

In these situations, the solution is to transfer all virtual servers in a host to another system, and then power down the host for maintenance. The technology that enables such a transfer, without shutting down the virtual servers is called “live migration”.

All leading server virtualization systems support live migration, but each system have its own set of “quirks” or dependencies, that need to be satisfied before a successful live migration can be done.

Recently, we assisted a VPS provider setup live migration in their LXD/LXC server virtualization system. The VPS provider guaranteed 99.95% uptime, and used redundant hardware such as dual-power-supply, dual network card and RAID disks to mitigate the risk of hardware failure.

However, during scheduled maintenance, the VPSs had to be manually moved (shut-down, move, restart) to another server, which was affecting the SLA guarantee.

This is the story of how we setup live migration for an LXD/LXC VPS system.

LXC live migration setup overview

In LXC, there is no “single click” provision to migrate a container live from one server to another. For live migration to work, we fixed a few dependencies in LXC:

  1. Clustering servers with identical processors – Live migration works in LXC only between servers with identical CPU architecture. So, we clustered servers into 2 clusters – one with AMD processors and the other with Intel processors.
  2. Enabling CRIU support in containers – LXC used a Linux feature called CRIU (Checkpoint/Restore In Userspace) for live migration. So, we enabled each container with CRIU support, and resource settings were optimized to make sure the container worked fine in another server.
  3. Configuring hosts to listen on TCP ports – By default, LXD servers listen on a unix socket, which cannot be accessed by external programs. For LXC live migration to work, LXD was linked to a public TCP port.

Once the dependencies were fixed, live migration worked flawlessly in the LXD servers. Here I’ll go through an example of how live migration was implemented to migrate a container named “VPS-silver-2752” from server “VPS-host-04” to “VPS-host-05”.

LXC live migration example

LXC live migration example – LXC container “VPS Silver 2752” is live migrated to VPS host 05


[Don’t lose your sleep over server stability! Our 24/7 server experts will maintain your servers secure and lean, at affordable pricing. ]


We will setup and maintain a stable server infrastructure for your hosting business at affordable pricing.


Bobcares provides Outsourced Hosting Support and Outsourced Server Management for online businesses. Our services include Hosting Support Services, server support, help desk support, live chat support and phone support.

Submit a Comment

Your email address will not be published. Required fields are marked *

Bobcares is a server management company that helps businesses deliver uninterrupted and secure online services. Our engineers manage close to 51,500 servers that include virtualized servers, cloud infrastructure, physical server clusters, and more.

Privacy Preference Center


    Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

    PHPSESSID - Preserves user session state across page requests.

    gdpr[consent_types] - Used to store user consents.

    gdpr[allowed_cookies] - Used to store user allowed cookies.

    PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]


    Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

    _ga - Preserves user session state across page requests.

    _gat - Used by Google Analytics to throttle request rate

    _gid - Registers a unique ID that is used to generate statistical data on how you use the website.

    smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

    _ga, _gat, _gid
    _ga, _gat, _gid


    Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

    IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

    test_cookie - Used to check if the user's browser supports cookies.

    1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

    NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

    DV - Google ad personalisation

    IDE, test_cookie, 1P_JAR, NID, DV, NID
    IDE, test_cookie
    1P_JAR, NID, DV