Techolac - Computer Technology News
  • Home
  • Internet
  • Business
  • Computers
  • Gadgets
  • Lifestyle
  • Phones
  • Travel
  • Tech
  • More
    • Automotive
    • Education
    • Entertainment
    • Health
    • SEO
    • Linux
    • WordPress
    • Home Improvement
    • How to
    • Games
No Result
View All Result
  • Home
  • Internet
  • Business
  • Computers
  • Gadgets
  • Lifestyle
  • Phones
  • Travel
  • Tech
  • More
    • Automotive
    • Education
    • Entertainment
    • Health
    • SEO
    • Linux
    • WordPress
    • Home Improvement
    • How to
    • Games
No Result
View All Result
Techolac - Computer Technology News
No Result
View All Result
Home Linux

How to update LXD container Ubuntu image from 16.04 to 18.04

by Editorial Staff
December 16, 2018
in Linux
Reading Time: 4 mins read

[ad_1]

I run my app inside Ubuntu Linux 16.04 LTS lxd Linux container. To upgrade Ubuntu 16.04 to 18.04 LTS container, I run do-release-upgrade command, but I am getting the error message that read as “Must be connected to a terminal.” How do I fix this problem to upgrade from Ubuntu Linux 16.04 to 18.04 image?

Introduction – The LXD container hypervisors supported and created by Ubuntu team. It provides 25% faster performance than ESX. This page shows how to upgrade LXD container Ubuntu 16.04 LTS image to 18.04 LTS image.

 

How to update LXD container

The procedure to upgrade LXD container Ubuntu image named utls-www is as follows:

  1. Log in to your Ubuntu container, run: lxc exec utls-www bash
  2. Update Ubuntu Linux Software, run: apt update && apt upgrade
  3. Make Ubuntu Linux container snapshot, run: lxc snapshot utls-www
  4. Finally update LXD container Ubuntu image from 16.04 to 18.04, run: lxc exec utls-www -- script /dev/null -c do-release-upgrade

Commands to upgrade LXD container Ubuntu image

Let us see all commands in details.

Step 1 – Log in to your Ubuntu container

To list currently running Linux containers, run:
$ lxc list
Gain root shell access for container named utls-www, run:
$ lxc exec utls-www bash

Step 2 – Update utls-www container image

You must install all available updates for your release before upgrading, run apt command:
# apt update
# apt upgrade

Note down your your Ubuntu Linux container version and exit back to host:
# lsb_release -a
# exit

How to log in into Ubuntu Linux container

Step 3 – Create container snapshots

For backup purpose create container snapshot, run:
$ lxc snapshot utls-www
$ lxc info utls-www

How to make Linux container snapshot

Step 4 – Upgrade Ubuntu Linux container image from 16.04 LTS to 18.04

Now we have a backup for our utls-www container. It is time to start the upgrade procedure. Run:
$ lxc exec utls-www -- script /dev/null -c do-release-upgrade
How to update LXD container Ubuntu Linux image
Press the [Enter] key. Do you want to continue?

See also  How to delete a UFW firewall rule on Ubuntu, Debian Linux
Do you want to continue upgrading Ubuntu Linux container image?
Do you want to continue upgrading Ubuntu Linux container image?

You may be prompted to replace or keep existing config files. For example, I use utls-www for Nginx/PHP-fmp service. I am going to keep nginx.conf and other config files when prompted:

Install a new version of config files
The default action is to keep your current version. I am going to keep my currently-installed version by pressing N or O

Ubuntu Linux container image upgrade is complete. Do you want to reboot the Linux container?
Reboot Ubuntu Linux container image
You can manually restart the container too:
$ lxc restart utls-www

Step 5 – Verification

Now our utls-www Linux container image updated to the latest version of Ubuntu. It is time to verify that everything is working as expected. Log in to your container:
$ lxc exec utls-www bash
To find OS version in Ubuntu Linux, run:
# lsb_release -a
Ubuntu Linux container image upraded to 18.04 LTS
Verify that all services are running and ports are open with help of ss command/netstat command and grep command/egrep command:
# ss -tulpn
# ps aux
# tail -f /var/log/nginx/error.log
# grep 'something' /var/log/nginx/www.cyberciti.biz_access.log
# egrep -i 'err|crit|warn' /var/log/nginx/www.cyberciti.biz_error.log

Conclusion

And there you have it. Ubuntu Linux container image has been upgraded from 16.04 LTS to 18.04 LTS.

[ad_2]

Related Posts

Top Commands to Check the Running Processes in Linux
Linux

Top Commands to Check the Running Processes in Linux

May 27, 2022
4 Tips to Prevent and Troubleshoot the ImagePullBackOff Kubernetes Error
Linux

4 Tips to Prevent and Troubleshoot the ImagePullBackOff Kubernetes Error

March 30, 2022
How Common Signals are Used in Kubernetes Pod Management
Linux

How Common Signals are Used in Kubernetes Pod Management

November 20, 2021

Leave a Reply Cancel reply

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

Bitcoin Cloud Mining Sites

12 Best Bitcoin Cloud Mining Sites In 2022

August 9, 2022
Why did the Parag Parikh Long Term Equity Fund change its name to Parag Parikh Flexi Cap Fund?

Why did the Parag Parikh Long Term Equity Fund change its name to Parag Parikh Flexi Cap Fund?

August 9, 2022
Why Measuring Customer Experience Score Generate More Business Value?

Why Measuring Customer Experience Score Generate More Business Value?

August 9, 2022
The Key Phases for Successful Onboarding

The Key Phases for Successful Onboarding

August 9, 2022
30 ZiniTevi Alternatives To Watch Movies And TV Shows Online

30 ZiniTevi Alternatives To Watch Movies And TV Shows Online

August 8, 2022
  • DashTech
  • TechDaddy
  • Terms and Conditions
  • Disclaimer
  • Write for us

© Techolac © Copyright 2019 - 2022, All Rights Reserved.

No Result
View All Result
  • Home
  • Internet
  • Business
  • Computers
  • Gadgets
  • Lifestyle
  • Phones
  • Travel
  • Tech
  • More
    • Automotive
    • Education
    • Entertainment
    • Health
    • SEO
    • Linux
    • WordPress
    • Home Improvement
    • How to
    • Games

© Techolac © Copyright 2019 - 2022, All Rights Reserved.

Go to mobile version