To reproduce:
lxc launch images:centos/7 centos-7 --vm
lxc exec centos-7 bash
Inside CentOS-7 VM:
yum install -y kernel-3.10.0-1160.6.1.el7.x86_64
echo GRUB_DEFAULT=0 >> /etc/grub2-efi.cfg
grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg
reboot
When rebooting
lxc console centos-7
It will display:
...
[FAILED] Failed to start LXD - agent - virtio-fs mount.
See 'systemctl status lxd-agent-virtiofs.service' for details.
...
[FAILED] Failed to start LXD - agent - 9p mount.
See 'systemctl status lxd-agent-9p.service' for details.
Starting LXD - agent...
[FAILED] Failed to start LXD - agent.
See 'systemctl status lxd-agent.service' for details.
...
After the above, I can’ exec centos-7 again:
lxc exec centos-7 bash
Error: Failed to connect to lxd-agent