Is it possible to install SangomaOS in lxd container?

Hi every one, i looking for options to install sangomaOS in LXD container. Can anyone help me with this initiative.

after a little search in the forum I came across this topic Lxd-p2c Sangoma 7 Distro (FreePBX) migration help - #4 by Duli but apparently the script is already running. and i want to ask if there is another option in which we can make a container from an existing machine or a virtual machine. or to install directly from an iso file.

Apparently, you haven´t read the post you have linked to.

It explicitly says you can create a SangomaOS lxc container from a virtual machine running SangomaOS:

And so on…

oh, my mistake, maybe when composing the post, I apologize for that. I read the post But just to ask did you try to open the link in the post to the script http://github.com/lxc/lxd/lxd-p2c

I read the post but this method is old and script not existing now have lxd-migrate but its work only on ubuntu OS. My question is what is actual method to migrate vm SangomaOS to LXD. its have any documentation ? Which tool can i use ?

Yes, I think lxd-p2c is no longer maintained. You should give lxd-migrate a try.

I´m sorry. I don´t know any other method for doing it.

Does this require any kernel modules?

I think not

Yes lxd-migrate should work here.

finally had time to play around with lxd-migrate and the new ./bin.linux.lxd-migrate script following the steps from here
https://linuxcontainers.org/lxd/docs/master/howto/import_machines_to_instances/#import-machines-to-instances
but after migrating it i have the following problem
lxc exec freepbx bash

Exception: SQLSTATE[HY000] [2002] Connection refused::SQLSTATE[HY000] [2002] Connection refused in file /var/www/html/admin/libraries/utility.functions.php on line 120

Caused by
PDOException: SQLSTATE[HY000] [2002] Connection refused in file /var/www/html/admin/libraries/BMO/Database.class.php on line 144
Stack trace:

  1. Exception->() /var/www/html/admin/libraries/utility.functions.php:120
  2. die_freepbx() /var/www/html/admin/libraries/BMO/Database.class.php:150
  3. PDOException->() /var/www/html/admin/libraries/BMO/Database.class.php:144
  4. PDO->__construct() /var/www/html/admin/libraries/BMO/Database.class.php:144
  5. FreePBX\Database->__construct() /var/www/html/admin/libraries/BMO/FreePBX.class.php:77
  6. FreePBX->__construct() /var/www/html/admin/bootstrap.php:144
  7. require_once() /etc/freepbx.conf:11
  8. include_once() /var/lib/asterisk/bin/fwconsole:12
    Exception: SQLSTATE[HY000] [2002] Connection refused::SQLSTATE[HY000] [2002] Connection refused in file /var/www/html/admin/libraries/utility.functions.php on line 120

Caused by
PDOException: SQLSTATE[HY000] [2002] Connection refused in file /var/www/html/admin/libraries/BMO/Database.class.php on line 144
Stack trace:

  1. Exception->() /var/www/html/admin/libraries/utility.functions.php:120
  2. die_freepbx() /var/www/html/admin/libraries/BMO/Database.class.php:150
  3. PDOException->() /var/www/html/admin/libraries/BMO/Database.class.php:144
  4. PDO->__construct() /var/www/html/admin/libraries/BMO/Database.class.php:144
  5. FreePBX\Database->__construct() /var/www/html/admin/libraries/BMO/FreePBX.class.php:77
  6. FreePBX->__construct() /var/www/html/admin/bootstrap.php:144
  7. require_once() /etc/freepbx.conf:11
  8. include_once() /var/lib/asterisk/bin/fwconsole:12
    [root@freepbx ~]#
    [root@freepbx ~]# systemctl start mysql
    Failed to get D-Bus connection: No such file or directory
    [root@freepbx ~]#

If anyone can help I would be grateful

host LXD ubuntu 22.04 installed with snap lxd version 5.10

this is from log of container

lxc freepbx7 20230523140549.865 ERROR conf - …/src/src/lxc/conf.c:turn_into_dependent_mounts:3948 - No such file or directory - Failed to recursively turn old root mount tree into dependent mount. Continuing…