Find out how to replace LXD container Ubuntu picture from 16.04 to 18.04


Get real time updates directly on you device, subscribe now.

I run my app inside Ubuntu Linux 16.04 LTS lxd Linux container. To improve Ubuntu 16.04 to 18.04 LTS container, I run do-release-upgrade command, however I get the error message that learn as “Should be linked to a terminal.” How do I repair this drawback to improve from Ubuntu Linux 16.04 to 18.04 picture?

Introduction – The LXD container hypervisors supported and created by Ubuntu crew. It offers 25% quicker efficiency than ESX. This web page exhibits find out how to improve LXD container Ubuntu 16.04 LTS picture to 18.04 LTS picture.

Find out how to replace LXD container

The process to improve LXD container Ubuntu picture named utls-www is as follows:

Log in to your Ubuntu container, run: lxc exec utls-www bashReplace Ubuntu Linux Software program, run: apt replace && apt improveMake Ubuntu Linux container snapshot, run: lxc snapshot utls-wwwLastly replace LXD container Ubuntu picture from 16.04 to 18.04, run: lxc exec utls-www — script /dev/null -c do-release-upgrade

Instructions to improve LXD container Ubuntu picture

Allow us to see all instructions in particulars.

Step 1 – Log in to your Ubuntu container

To checklist at present operating Linux containers, run:
$ lxc checklist
Achieve root shell entry for container named utls-www, run:
$ lxc exec utls-www bash

Step 2 – Replace utls-www container picture

You need to set up all accessible updates on your launch earlier than upgrading, run apt command:
# apt replace
# apt improve
Notice down your your Ubuntu Linux container model and exit again to host:
# lsb_release -a
# exit
How to log in into Ubuntu Linux container

Step three – Create container snapshots

For backup goal create container snapshot, run:
$ lxc snapshot utls-www
$ lxc information utls-www
How to make Linux container snapshot

Step four – Improve Ubuntu Linux container picture from 16.04 LTS to 18.04

Now now we have a backup for our utls-www container. It’s time to begin the improve process. 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 need to proceed?
Do you want to continue upgrading Ubuntu Linux container image?Do you need to proceed upgrading Ubuntu Linux container picture?
It’s possible you’ll be prompted to switch or hold present config recordsdata. For instance, I exploit utls-www for Nginx/PHP-fmp service. I’m going to maintain nginx.conf and different config recordsdata when prompted:
Install a new version of config filesThe default motion is to maintain your present model. I’m going to maintain my currently-installed model by urgent N or O
Ubuntu Linux container picture improve is full. Do you need to reboot the Linux container?
Reboot Ubuntu Linux container image
You possibly can manually restart the container too:
$ lxc restart utls-www

Step 5 – Verification

Now our utls-www Linux container picture up to date to the newest model of Ubuntu. It’s time to confirm that every thing is working as anticipated. Log in to your container:
$ lxc exec utls-www bash
To search out OS model in Ubuntu Linux, run:
# lsb_release -a
Ubuntu Linux container image upraded to 18.04 LTS
Confirm that every one providers are operating and ports are open with assist of ss command/netstat command and grep command/egrep command:
# ss -tulpn
# ps aux
# tail -f /var/log/nginx/error.log
# grep ‘one thing’ /var/log/nginx/www.cyberciti.biz_access.log
# egrep -i ‘err|crit|warn’ /var/log/nginx/www.cyberciti.biz_error.log


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

Posted by: Vivek Gite

The creator is the creator of nixCraft and a seasoned sysadmin, DevOps engineer, and a coach for the Linux working system/Unix shell scripting. Get the newest tutorials on SysAdmin, Linux/Unix and open supply subjects by way of RSS/XML feed or weekly e mail e-newsletter.

Source link

Leave A Reply

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More