[Users] Ubuntu 17.04 support for OpenVZ RHEL 6

Scott Dowdle dowdle at montanalinux.org
Thu Apr 13 15:27:11 PDT 2017


Greetings,

----- Original Message -----
> Today Ubuntu 17.04 was released.
> Are there any plans to create an OpenVZ template for it? I’m aware
> that Ubuntu 17.04 uses systemd just like Ubuntu 16.04 and 16.10.

Decided I'd give it a try.  I'm not much of an Ubuntu user so I feel weird explaining all of this, but it did work for me.

1) Create a container from the beta Ubuntu 16.10 OS Template which uses systemd
   a) cd /vz/template/cache/ ; wget https://download.openvz.org/template/precreated/beta/ubuntu-16.10-x86_64.tar.gz
   b) There is a gpg signature file and you are encouraged to verify your download but I'll skip explaining that step
   c) vzctl create {ctid} --name {name} --hostname {hostname} --ipadd {n.n.n.n} --config {config} --ostemplate ubuntu-16.10-x86_64
I tab completed a lot of that in my shell session and manually typed it into this email so hopefully I didn't add a typo but you should already know how to create a container, right?

2) Start the container and enter it as root

3) Upgrade it like so:
   a) apt-get update && apt-get upgrade
   b) apt-get install update-manager-core
   c) do-release-upgrade -d

At that point it should prompt you a few times for various upgrade related questions common to Ubuntu upgrades.  When it starts installing, deleting, and upgrading packages... it will prompt for service config related issues a few times related to config file changes.  I just went with the defaults.  Eventually it complains that the kernel is older than should work... but that is fine.

When all was done, I rebooted the container (systemctl reboot [again the container not the host]), entered it again, and verified that it was the 17.04 release (cat /etc/os-release) and that everything expected was running (pstree -nup).  I verified that networking was still operational by doing another "apt-get update && apt-get upgrade" and it was able to pulled down the metadata and determine it was fully up-to-date.

Now one can shut down the container (vzctl stop {ctid}), mount its disk (vzctl mount {ctid}), do a little clean up on the containers filesystem as desired, and then tar.xz|gz it up... naming it with the same OS Template naming pattern you'd expect and placing it in /vz/template/cache/.

cd /vz/root/{ctid} ; tar -cvJf /vz/template/cache/ubuntu-17.04-x86_64.tar.xz . ;

Then umount and destroy the upgraded container and make a new container with your new OS Template.  I didn't try that last part but generally it just works.

TYL,
-- 
Scott Dowdle
704 Church Street
Belgrade, MT 59714
(406)388-0827 [home]
(406)994-3931 [work]



More information about the Users mailing list