Storage and pool

Hi,

I’m new using LXD / LXC and I want to automate some tasks with ansible.
To do that I’ve create an yaml file to init LXC with the command
lxd init --preseed < /tmp/lxcInitFile.yaml (I’ve retrieved the yaml file after a manual installation)

config: {}
networks:
- config:
    ipv4.address: auto
    #ipv4.nat: "true"
    ipv6.address: none
  description: ""
  name: custom0
  type: ""
storage_pools:
- config:
    size: 5GB
  description: ""
  name: default
  driver: zfs
profiles:
- config: {}
  description: ""
  devices:
    eth0:
      name: eth0
      network: custom0
      type: nic
    root:
      path: /
      pool: default
      type: disk
  name: default
cluster: null

My problem is that with this method, a default pool is not created and when I want to launch a container, it fails.

root@jekes:~# zpool status
no pools available

If someone have an idea, it will be great.
Thanks

Is any of the other stuff configured properly?
Does lxd init --preseed return an error?

Oh and the lxc version output on that system would be useful too.

Thanks for the reply, here my version

Client version: 4.0.7
Server version: 4.0.7

I’ve succeeded re-installating the OS
Maybe my trouble was due to the “snap remove ldx” I’ve made on my first installation.

I’ve have another trouble using lxc with ansible

If you have an idea with this issue, please let me know

Thanks