Services not starting automatically post migration lxdp2c

Hi folks,

I have done a lxdp2c conversion of a VM to LXC. Upon completion I can successfully bring up the container. However, the services are stopped (freeradius for example).
I have to then manually start from the LXD host.

The converted container is on Ubuntu16.04 and is sat on an Ubuntu 18.04 host

user@lxd01:~$ lxc exec rad2 systemctl status freeradius
● freeradius.service - LSB: Radius Daemon
   Loaded: loaded (/etc/init.d/freeradius; bad; vendor preset: enabled)
   Active: inactive (dead)
     Docs: man:systemd-sysv-generator(8)

Aug 27 15:05:19 rad2 systemd[1]: Stopped LSB: Radius Daemon.
user@lxd01:~$ lxc exec rad2 systemctl start freeradius
Job for freeradius.service canceled.
user@lxd01:~$ lxc exec rad2 service freeradius start
user@lxd01:~$ lxc exec rad2 systemctl status freeradius
● freeradius.service - LSB: Radius Daemon
   Loaded: loaded (/etc/init.d/freeradius; bad; vendor preset: enabled)
   Active: active (running) since Tue 2019-08-27 15:12:45 BST; 6s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 391 ExecStart=/etc/init.d/freeradius start (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/freeradius.service
           └─401 /usr/sbin/freeradius

Aug 27 15:12:44 rad2 systemd[1]: Starting LSB: Radius Daemon...
Aug 27 15:12:44 rad2 freeradius[391]:  * Starting FreeRADIUS daemon freeradius
Aug 27 15:12:45 rad2 freeradius[391]:    ...done.
Aug 27 15:12:45 rad2 systemd[1]: Started LSB: Radius Daemon.

I suspect there is something funky going on with systemd. Has anyone seen this before?

Usual suspects are:

  • /etc/fstab (clean just about everything from it, an empty one should be okay)
  • systemctl --failed
  • /etc/network/interfaces (may need to change interface names)

That and some poking at journalctl -b 0 is usually enough to track down the source of a stuck container.

Thanks for your reply. I’ll take a look and get back to you on my findings.

This worked a charm.

Thank you very much for your help.:beer: