LXD agent on CoreOS

,

Hello all,

I’ve followed guide (from this forum) to install CoreOS on LXD.
Everything is OK - created CoreOS image, bootstrap VMs with ignition file, etc.
But VMs are slow, guess because there is no virtualization agent.

So is there a way to install lxd agent manually on CoreOS ?

Thanks in advance

Hello all,
I’ve manage to start lxd agent following this guide with small changes:
https://discuss.linuxcontainers.org/t/install-lxd-agent-manually-on-custom-os/11826/2

Here is what i made:
file /etc/systemd/system/lxd-agent-9p.service (location was changed due to limitations from CoreOS)

[Unit]
Description=LXD - agent - 9p mount
Documentation=https://linuxcontainers.org/lxd
ConditionPathExists=/dev/virtio-ports/org.linuxcontainers.lxd
After=local-fs.target
DefaultDependencies=no

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStartPre=-/sbin/modprobe 9pnet_virtio
ExecStartPre=/bin/mkdir -p /var/run/lxd_config/9p
ExecStartPre=/bin/chmod 0700 /var/run/lxd_config/
ExecStart=/bin/mount -t 9p config /var/run/lxd_config/9p -o access=0,trans=virtio,context=system_u:object_r:bin_t:s0

[Install]
WantedBy=multi-user.target

file /etc/systemd/system/lxd-agent.service (same reason)

[Unit]
Description=LXD - agent
Documentation=https://linuxcontainers.org/lxd
ConditionPathExists=/dev/virtio-ports/org.linuxcontainers.lxd
Requires=lxd-agent-9p.service
After=lxd-agent-9p.service
Before=cloud-init.target cloud-init.service cloud-init-local.service
DefaultDependencies=no

[Service]
Type=simple
WorkingDirectory=/var/run/lxd_config/9p
ExecStart=/var/run/lxd_config/9p/lxd-agent
Restart=on-failure
RestartSec=5s
StartLimitInterval=60
StartLimitBurst=10

[Install]
WantedBy=multi-user.target

Not sure if everything is working as expected, but from first 10 mins looks like VM speed/response is much better.