10.7. Migrating PowerPanel Container from CentOS 7 to VzLinux 7

The ppconvert tool allows migrating a PowerPanel container from CentOS 7 to VzLinux 7.

10.7.1. Prerequisites

  1. Install the following package:

    # yum install https://repo.virtuozzo.com/vzlinux/vzdeploy/vzdeploy8.rpm
    
  2. Ensure your PowerPanel container is running.

10.7.2. Converting PowerPanel Container

Run the following command:

Note

MyCT is the name of a PowerPanel container running the operating system to be converted. Enter the UUID or name of the container you need to migrate to VzLinux 7.

# ppconvert MyCT

During migration, the tool creates a backup of the PowerPanel container running the operating system, subject to conversion. The PowerPanel backup container is a container named <original-name>_pp_centos7_bkp. The UUID of the backup container is listed in the output, for example:

All operations completed successfully for CT 267338ae-6b48-4194-bb9b-903dbdffdf1b with BACKUP_CTUUID: a10abba8-f446-423f-b2a3-340b46734a3b.

Important

If a bridged network is used, the system removes the IP address in the backup container.

The conversion may take some time and cause the container to reboot. Upon the conversion, the system saves the backup container on the host in the stopped state.

Note

During the execution of ppconvert, you may see the following error message:

ERROR: ld:so object '/usr/libexec/vztt_checker_open.so' from LD_PRELOAD cannot be preloaded: ignored

This message is expected to appear during the script’s operation, which means the tool works normally. You can safely ignore this message.

After the successful conversion, the system starts the converted container and checks the PowerPanel service inside it.

Below is an example output of the successful conversion:

[root@vhs75]# ppconvert powerpanel
2024-11-26 15:05:10,317 INFO: Converting powerpanel
2024-11-26 15:05:10,323 DEBUG: VEID a491dbad-d4d7-4373-8784-6905c5bd3fc6 exist mounted running

2024-11-26 15:05:10,331 DEBUG:                                 CTID      NPROC STATUS    CFG_IP_ADDR     HOSTNAME
a491dbad-d4d7-4373-8784-6905c5bd3fc6        263 running   172.29.137.10   powerpanel.vhs.example

2024-11-26 15:05:10,331 INFO: /etc/vz/conf/a491dbad-d4d7-4373-8784-6905c5bd3fc6.conf is link to the container config and therefore configs are in sync
2024-11-26 15:05:10,343 DEBUG: NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"


2024-11-26 15:05:10,402 DEBUG: pp-release-2.0.4-3.vl7.noarch

2024-11-26 15:05:10,402 INFO: OS Version and PP check is completed successfully
locking a491dbad-d4d7-4373-8784-6905c5bd3fc6
locking eba7ef94-9176-436f-82f2-0586cac0b70a
Copy /vz/private/a491dbad-d4d7-4373-8784-6905c5bd3fc6/root.hdd/DiskDescriptor.xml /vz/private/eba7ef94-9176-436f-82f2-0586cac0b70a/root.hdd/
Copy /vz/private/a491dbad-d4d7-4373-8784-6905c5bd3fc6/ /vz/private/eba7ef94-9176-436f-82f2-0586cac0b70a
vzctl : Container is not running
vzctl : Failed to exec action script /usr/libexec/libvzctl/dists/scripts/postcreate.sh
/usr/sbin/vzctl exited with code 79
post create action failed for CT eba7ef94-9176-436f-82f2-0586cac0b70a
unlocking a491dbad-d4d7-4373-8784-6905c5bd3fc6
unlocking eba7ef94-9176-436f-82f2-0586cac0b70a
2024-11-26 15:05:30,825 DEBUG: INFO
ID: {a491dbad-d4d7-4373-8784-6905c5bd3fc6}
EnvID: a491dbad-d4d7-4373-8784-6905c5bd3fc6
Name: powerpanel
Description:
Type: CT
State: running
OS: centos7
Template: no
Uptime: 00:00:00 (since 2024-11-26 15:01:19)
Home: /vz/private/a491dbad-d4d7-4373-8784-6905c5bd3fc6
Backup path:
Owner: root
GuestTools: state=possibly_installed
GuestTools autoupdate: on
Autostart: on
Autostop: suspend
Autocompact: on
Boot order:
EFI boot: off
Allow select boot device: off
External boot device:
Remote display: mode=off address=0.0.0.0
Remote display state: stopped
Hardware:
cpu sockets=1 cpus=unlimited cores=unlimited VT-x hotplug accl=high mode=64 cpuunits=1000 ioprio=4
memory 1024Mb hotplug
video 0Mb 3d acceleration=off vertical sync=yes
memory_guarantee auto
hdd0 (+) scsi:0 image='/vz/private/a491dbad-d4d7-4373-8784-6905c5bd3fc6/root.hdd' type='expanded' 10240Mb mnt=/ state=connected subtype=virtio-scsi
venet0 (+) type='routed' ips='172.29.137.10/255.255.0.0 '
Features:
Disabled Windows logo: on
Nested virtualization: off
Offline management: (-)
Hostname: powerpanel.vhs.example
DNS Servers: 172.20.10.18 172.20.10.19


WARNING: You are using a deprecated CLI component that won't be installed by default in the next major release. Please use virsh instead
2024-11-26 15:05:30,982 INFO: Backup created successfully with BACKUP_CTUUID: eba7ef94-9176-436f-82f2-0586cac0b70a
2024-11-26 15:05:30,995 INFO: CT a491dbad-d4d7-4373-8784-6905c5bd3fc6 switched successfully to vzlinux distribution.
ERROR: ld.so: object '/usr/libexec/vztt_checker_open.so' from LD_PRELOAD cannot be preloaded: ignored.
2024-11-26 15:07:22,793 INFO: CT a491dbad-d4d7-4373-8784-6905c5bd3fc6 upgraded successfully.
Warning: RPMDB altered outside of yum.
2024-11-26 15:07:52,191 INFO: yum -y distro-sync completed successfully in CT a491dbad-d4d7-4373-8784-6905c5bd3fc6.
2024-11-26 15:07:54,710 INFO: Yum shell commands executed successfully in CT a491dbad-d4d7-4373-8784-6905c5bd3fc6.
WARNING: You are using a deprecated CLI component that won't be installed by default in the next major release. Please use virsh instead
2024-11-26 15:08:06,175 INFO: CT a491dbad-d4d7-4373-8784-6905c5bd3fc6 have been restarted.
2024-11-26 15:08:17,653 INFO: PowerPanel vzapi in CT a491dbad-d4d7-4373-8784-6905c5bd3fc6 is accessible
2024-11-26 15:08:17,653 INFO: CT a491dbad-d4d7-4373-8784-6905c5bd3fc6 PowerPanel seems to be working
2024-11-26 15:08:17,903 DEBUG: Output of needs-restarting -r for CT a491dbad-d4d7-4373-8784-6905c5bd3fc6:
No core libraries or services have been updated.
Reboot is probably not necessary.
2024-11-26 15:08:17,904 WARNING: No restart is necessary for CT a491dbad-d4d7-4373-8784-6905c5bd3fc6.
2024-11-26 15:08:17,904 INFO: All operations completed successfully for CT a491dbad-d4d7-4373-8784-6905c5bd3fc6 with BACKUP_CTUUID: eba7ef94-9176-436f-82f2-0586cac0b70a.

If the converted container or PowerPanel service inside it is not running, the system takes the following actions:

  1. Stopping the container.

  2. Renaming it to <original-name>-convert-failed.

  3. Removing network configuration from the failed container.

  4. Restoring the backup of the container.

  5. Starting the container.

  6. Informing about the failed conversion.

Important

If a bridged network is used, assign the removed IP address back to the original container on your own:

# prlctl set powerpanel --device-set net0 --ipadd <addr>