VMmanager Knowledge Base

If VMs are not created in an LXD cluster

In some cases, virtual machines in an LXD cluster are not created because there are no root datasets in the ZFS pool.

Diagnostics

  1. Connect to the server with the ZFS storage via SSH.
  2. Enter the command: 

    zfs list

    Examples of responses for the zfs0 pool:

    Root datasets are created
    NAME                                                                           USED  AVAIL     REFER  MOUNTPOINT
    zfs0                                                                          1.97G  36.3G       24K  legacy
    zfs0/containers                                                                 24K  36.3G       24K  legacy
    zfs0/custom                                                                     24K  36.3G       24K  legacy
    zfs0/deleted                                                                   120K  36.3G       24K  legacy
    zfs0/deleted/containers                                                         24K  36.3G       24K  legacy
    zfs0/deleted/custom                                                             24K  36.3G       24K  legacy
    zfs0/deleted/images                                                             24K  36.3G       24K  legacy
    zfs0/deleted/virtual-machines                                                   24K  36.3G       24K  legacy
    zfs0/images                                                                   1.97G  36.3G       24K  legacy
    zfs0/virtual-machines                                                           24K  36.3G       24K  legacy
    No root datasets
    NAME                                                                           USED  AVAIL     REFER  MOUNTPOINT
    zfs0                                                                          1.97G  36.3G       24K  legacy

Solution

If there are no root datasets in the pool, create them manually:

  1. Connect to the server with the ZFS storage via SSH.
  2. Run the commands: 

    zfs create -o mountpoint=legacy zfs0/containers
    zfs create -o mountpoint=legacy zfs0/custom
    zfs create -o mountpoint=legacy zfs0/deleted
    zfs create -o mountpoint=legacy zfs0/deleted/containers
    zfs create -o mountpoint=legacy zfs0/deleted/custom
    zfs create -o mountpoint=legacy zfs0/deleted/images
    zfs create -o mountpoint=legacy zfs0/deleted/virtual-machines
    zfs create -o mountpoint=legacy zfs0/images
    zfs create -o mountpoint=legacy zfs0/virtual-machines
    Comments to the commands