Hi everyone,
I am trying to build an LXD image that has LXD installed in it.
I am using distrobuilder to create this image and trying to use snap to install LXD.
But snap is failing with below error as it requires a re-login/reboot so that the respective snap paths are updated correctly. Can LXD be installed in distrobuilder context?
+ snap install lxd
error: cannot communicate with server: Post "http://localhost/v2/snaps/lxd": dial unix /run/snapd.socket: connect: no such file or directory
Error: Failed to run post-files: exit status 1
INFO[2022-09-02T10:01:39+05:30] Removing cache directory
Below is the excerpt from my distrobuilder YAML file.
packages:
manager: yum
update: true
cleanup: true
repositories:
- name: EPEL
url: |-
[ol8_developer_EPEL]
name=Oracle Linux $releasever EPEL Packages for Development ($basearch)
baseurl=https://yum.oracle.com/repo/OracleLinux/OL8/developer/EPEL/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1
sets:
- packages:
- squashfs-tools
- squashfuse
- fuse
- snapd
action: install
actions:
- trigger: post-packages
action: |-
#!/bin/sh
set -eux
ln -s /var/lib/snapd/snap /snap
systemctl enable snapd
- trigger: post-files
action: |-
#!/bin/sh
set -eux
snap install lxd