After fiddling with zfs
, I think I discovered perhaps one of the issues that leads to this behavior.
When running zfs list -t snapshot
I noticed that the new image is missing its @readonly
snapshot as other images do, therefore I created one. Unfortunately, the newly created container does not start.
$ sudo zfs list -t snapshot
NAME USED AVAIL REFER MOUNTPOINT
lxd/deleted/images/2a7896bae0f2322559e5b9452b0adf58a5a76f7b772fa6906c825407ea6c3386@readonly 0B - 307M -
lxd/deleted/images/9023b2feede581884cf45be29f60207ccc5553d762ea8088e849858a58762f6b@readonly 0B - 307M -
lxd/deleted/images/f32f9de84a9e70b23f128f909f72ba484bc9ea70c69316ea5e32fb3c11282a34@readonly 0B - 306M -
lxd/images/60f53d7289be4147834523e3c7ffb2d1f5b8a7cbf86afe80e22585a5380534ba@readonly 0B - 305M -
lxd/images/8b430b6d827140412a85a1f76f0fc76ebc42c3e1ca8d628cb90b12e9cef175c9@readonly 0B - 305M -
$ sudo zfs snapshot lxd/images/368bb7174b679ece9bd0dfe2ab953c02c47ff4451736cb255655ba8348f17bc0@readonly
$ sudo zfs list -t snapshot
NAME USED AVAIL REFER MOUNTPOINT
lxd/deleted/images/2a7896bae0f2322559e5b9452b0adf58a5a76f7b772fa6906c825407ea6c3386@readonly 0B - 307M -
lxd/deleted/images/9023b2feede581884cf45be29f60207ccc5553d762ea8088e849858a58762f6b@readonly 0B - 307M -
lxd/deleted/images/f32f9de84a9e70b23f128f909f72ba484bc9ea70c69316ea5e32fb3c11282a34@readonly 0B - 306M -
lxd/images/368bb7174b679ece9bd0dfe2ab953c02c47ff4451736cb255655ba8348f17bc0@readonly 0B - 189M -
lxd/images/60f53d7289be4147834523e3c7ffb2d1f5b8a7cbf86afe80e22585a5380534ba@readonly 0B - 305M -
lxd/images/8b430b6d827140412a85a1f76f0fc76ebc42c3e1ca8d628cb90b12e9cef175c9@readonly 0B - 305M -
$ sudo lxc launch ubuntu:bionic dummy
Creating dummy
Starting dummy
$ sudo lxc list
+--------------+---------+-------------------+------+------------+-----------+
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
+--------------+---------+-------------------+------+------------+-----------+
| artistic-ray | RUNNING | 10.0.3.206 (eth0) | | PERSISTENT | 0 |
+--------------+---------+-------------------+------+------------+-----------+
| couch | RUNNING | 10.0.3.248 (eth0) | | PERSISTENT | 0 |
+--------------+---------+-------------------+------+------------+-----------+
| db | STOPPED | | | PERSISTENT | 0 |
+--------------+---------+-------------------+------+------------+-----------+
| dummy | STOPPED | | | PERSISTENT | 0 |
+--------------+---------+-------------------+------+------------+-----------+
| lamp | RUNNING | 10.0.3.116 (eth0) | | | |
+--------------+---------+-------------------+------+------------+-----------+
| mongo | STOPPED | | | PERSISTENT | 0 |
+--------------+---------+-------------------+------+------------+-----------+
| msf | RUNNING | 10.0.3.165 (eth0) | | PERSISTENT | 0 |
+--------------+---------+-------------------+------+------------+-----------+
$ sudo lxc start dummy
$ sudo lxc list dummy
+-------+---------+------+------+------------+-----------+
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
+-------+---------+------+------+------------+-----------+
| dummy | STOPPED | | | PERSISTENT | 0 |
+-------+---------+------+------+------------+-----------+
$ sudo lxc start dummy --debug
DBUG[08-02|22:03:42] Connecting to a local LXD over a Unix socket
DBUG[08-02|22:03:42] Sending request to LXD method=GET url=http://unix.socket/1.0 etag=
DBUG[08-02|22:03:42] Got response struct from LXD
DBUG[08-02|22:03:42]
{
"config": {
"core.trust_password": true,
"images.auto_update_interval": "0"
},
"api_extensions": [
"storage_zfs_remove_snapshots",
"container_host_shutdown_timeout",
"container_stop_priority",
"container_syscall_filtering",
"auth_pki",
"container_last_used_at",
"etag",
"patch",
"usb_devices",
"https_allowed_credentials",
"image_compression_algorithm",
"directory_manipulation",
"container_cpu_time",
"storage_zfs_use_refquota",
"storage_lvm_mount_options",
"network",
"profile_usedby",
"container_push",
"container_exec_recording",
"certificate_update",
"container_exec_signal_handling",
"gpu_devices",
"container_image_properties",
"migration_progress",
"id_map",
"network_firewall_filtering",
"network_routes",
"storage",
"file_delete",
"file_append",
"network_dhcp_expiry",
"storage_lvm_vg_rename",
"storage_lvm_thinpool_rename",
"network_vlan",
"image_create_aliases",
"container_stateless_copy",
"container_only_migration",
"storage_zfs_clone_copy",
"unix_device_rename",
"storage_lvm_use_thinpool",
"storage_rsync_bwlimit",
"network_vxlan_interface",
"storage_btrfs_mount_options",
"entity_description",
"image_force_refresh",
"storage_lvm_lv_resizing",
"id_map_base",
"file_symlinks",
"container_push_target",
"network_vlan_physical",
"storage_images_delete",
"container_edit_metadata",
"container_snapshot_stateful_migration",
"storage_driver_ceph",
"storage_ceph_user_name",
"resource_limits",
"storage_volatile_initial_source",
"storage_ceph_force_osd_reuse",
"storage_block_filesystem_btrfs",
"resources",
"kernel_limits",
"storage_api_volume_rename",
"macaroon_authentication",
"network_sriov",
"console",
"restrict_devlxd",
"migration_pre_copy",
"infiniband",
"maas_network",
"devlxd_events",
"proxy",
"network_dhcp_gateway",
"file_get_symlink",
"network_leases",
"unix_device_hotplug",
"storage_api_local_volume_handling",
"operation_description",
"clustering",
"event_lifecycle",
"storage_api_remote_volume_handling",
"nvidia_runtime",
"container_mount_propagation",
"container_backup",
"devlxd_images",
"container_local_cross_pool_handling",
"proxy_unix",
"proxy_udp",
"clustering_join",
"proxy_tcp_udp_multi_port_handling",
"network_state",
"proxy_unix_dac_properties",
"container_protection_delete",
"unix_priv_drop",
"pprof_http",
"proxy_haproxy_protocol",
"network_hwaddr",
"proxy_nat",
"network_nat_order",
"container_full",
"candid_authentication",
"backup_compression",
"candid_config",
"nvidia_runtime_config",
"storage_api_volume_snapshots",
"storage_unmapped",
"projects",
"candid_config_key",
"network_vxlan_ttl",
"container_incremental_copy",
"usb_optional_vendorid",
"snapshot_scheduling",
"container_copy_project",
"clustering_server_address",
"clustering_image_replication",
"container_protection_shift",
"snapshot_expiry",
"container_backup_override_pool",
"snapshot_expiry_creation",
"network_leases_location",
"resources_cpu_socket",
"resources_gpu",
"resources_numa",
"kernel_features",
"id_map_current",
"event_location",
"storage_api_remote_volume_snapshots",
"network_nat_address",
"container_nic_routes",
"rbac",
"cluster_internal_copy",
"seccomp_notify",
"lxc_features",
"container_nic_ipvlan",
"network_vlan_sriov",
"storage_cephfs",
"container_nic_ipfilter",
"resources_v2",
"container_exec_user_group_cwd"
],
"api_status": "stable",
"api_version": "1.0",
"auth": "trusted",
"public": false,
"auth_methods": [
"tls"
],
"environment": {
"addresses": [],
"architectures": [
"x86_64",
"i686"
],
"certificate": "-----BEGIN CERTIFICATE-----\nMIIFRDCCAyygAwIBAgIRANH6teCoaXUkKMFfOV7wWeEwDQYJKoZIhvcNAQELBQAw\nNTEcMBoGA1UEChMTbGludXhjb250YWluZXJzLm9yZzEVMBMGA1UEAwwMcm9vdEBj\nYXNjYXJhMB4XDTE4MDgwNzA5NDkzMloXDTI4MDgwNDA5NDkzMlowNTEcMBoGA1UE\nChMTbGludXhjb250YWluZXJzLm9yZzEVMBMGA1UEAwwMcm9vdEBjYXNjYXJhMIIC\nIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAvvR0cELUV567EWW/f9rUHE12\nmricBtKGnKbUB2z1VkmjxzXs4e7ipfaybsn5zEIv7TlLmkB186RJyyNCmmFOpsK5\nRojrFEw/ZOnEr121uDbNBPAyzSxyAG3BeG/Z/Pk2atsbukoxvxkilYFssG0CuQFl\nzqgrA1HMyMgBD++++ps2MVVfrPUU0aIzqufRm3taRv58ZUatdkh6MEbn7EPLipHw\ngsX1Kv5ZgOlizKW16u/3tvEhsggMQkcfIVJ3HHA1Tbcet9KzAls9gMrqwiQVKyoy\nhwVtrZ+mwQ/Y/2595gVYIld5XTNIz07cvAHzuItI3mGPQfh7dkWLZNZROHFR2E0Y\nVhr4PFaLZ+sn9SlwStZDIB4TzXxYmIEoTCpMAPMjafa5P7qrS4bKTtcGIoX49tYL\nhCg75wCJ+kH6XAaEgeceHQB1lC4oizZx/6TjJp9Oda/cTB68JiPfMvpLNSXXRKK+\nxgmMTh78dP/3V+Nfxdy1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74c19d9477ccde1f2100cbf6187a394e999d6f1b8233e95c51e06deaf79caea4",
"driver": "lxc",
"driver_version": "3.2.1",
"kernel": "Linux",
"kernel_architecture": "x86_64",
"kernel_features": {
"netnsid_getifaddrs": "false",
"seccomp_listener": "false",
"shiftfs": "false",
"uevent_injection": "true",
"unpriv_fscaps": "true"
},
"kernel_version": "4.18.0-25-generic",
"lxc_features": {
"mount_injection_file": "true",
"network_gateway_device_route": "true",
"network_ipvlan": "true",
"network_l2proxy": "true",
"network_phys_macvlan_mtu": "true",
"seccomp_notify": "true"
},
"project": "default",
"server": "lxd",
"server_clustered": false,
"server_name": "cascara",
"server_pid": 8795,
"server_version": "3.15",
"storage": "zfs",
"storage_version": "0.7.9-3ubuntu6"
}
}
DBUG[08-02|22:03:42] Sending request to LXD method=GET url=http://unix.socket/1.0/containers/dummy etag=
DBUG[08-02|22:03:42] Got response struct from LXD
DBUG[08-02|22:03:42]
{
"architecture": "x86_64",
"config": {
"image.architecture": "amd64",
"image.description": "ubuntu 18.04 LTS amd64 (release) (20190722.1)",
"image.label": "release",
"image.os": "ubuntu",
"image.release": "bionic",
"image.serial": "20190722.1",
"image.version": "18.04",
"volatile.base_image": "368bb7174b679ece9bd0dfe2ab953c02c47ff4451736cb255655ba8348f17bc0",
"volatile.eth0.hwaddr": "00:16:3e:83:d6:96",
"volatile.idmap.base": "0",
"volatile.idmap.current": "[{\"Isuid\":true,\"Isgid\":false,\"Hostid\":1000000,\"Nsid\":0,\"Maprange\":1000000000},{\"Isuid\":false,\"Isgid\":true,\"Hostid\":1000000,\"Nsid\":0,\"Maprange\":1000000000}]",
"volatile.idmap.next": "[{\"Isuid\":true,\"Isgid\":false,\"Hostid\":1000000,\"Nsid\":0,\"Maprange\":1000000000},{\"Isuid\":false,\"Isgid\":true,\"Hostid\":1000000,\"Nsid\":0,\"Maprange\":1000000000}]",
"volatile.last_state.idmap": "[{\"Isuid\":true,\"Isgid\":false,\"Hostid\":1000000,\"Nsid\":0,\"Maprange\":1000000000},{\"Isuid\":false,\"Isgid\":true,\"Hostid\":1000000,\"Nsid\":0,\"Maprange\":1000000000}]",
"volatile.last_state.power": "STOPPED"
},
"devices": {},
"ephemeral": false,
"profiles": [
"default"
],
"stateful": false,
"description": "",
"created_at": "2019-08-02T21:51:14.002798629+03:00",
"expanded_config": {
"image.architecture": "amd64",
"image.description": "ubuntu 18.04 LTS amd64 (release) (20190722.1)",
"image.label": "release",
"image.os": "ubuntu",
"image.release": "bionic",
"image.serial": "20190722.1",
"image.version": "18.04",
"volatile.base_image": "368bb7174b679ece9bd0dfe2ab953c02c47ff4451736cb255655ba8348f17bc0",
"volatile.eth0.hwaddr": "00:16:3e:83:d6:96",
"volatile.idmap.base": "0",
"volatile.idmap.current": "[{\"Isuid\":true,\"Isgid\":false,\"Hostid\":1000000,\"Nsid\":0,\"Maprange\":1000000000},{\"Isuid\":false,\"Isgid\":true,\"Hostid\":1000000,\"Nsid\":0,\"Maprange\":1000000000}]",
"volatile.idmap.next": "[{\"Isuid\":true,\"Isgid\":false,\"Hostid\":1000000,\"Nsid\":0,\"Maprange\":1000000000},{\"Isuid\":false,\"Isgid\":true,\"Hostid\":1000000,\"Nsid\":0,\"Maprange\":1000000000}]",
"volatile.last_state.idmap": "[{\"Isuid\":true,\"Isgid\":false,\"Hostid\":1000000,\"Nsid\":0,\"Maprange\":1000000000},{\"Isuid\":false,\"Isgid\":true,\"Hostid\":1000000,\"Nsid\":0,\"Maprange\":1000000000}]",
"volatile.last_state.power": "STOPPED"
},
"expanded_devices": {
"eth0": {
"name": "eth0",
"nictype": "bridged",
"parent": "lxdbr0",
"type": "nic"
},
"root": {
"path": "/",
"pool": "lxd",
"type": "disk"
}
},
"name": "dummy",
"status": "Stopped",
"status_code": 102,
"last_used_at": "2019-08-02T21:57:44.810840436+03:00",
"location": "none"
}
DBUG[08-02|22:03:42] Connected to the websocket
DBUG[08-02|22:03:42] Sending request to LXD method=PUT url=http://unix.socket/1.0/containers/dummy/state etag=
DBUG[08-02|22:03:42]
{
"action": "start",
"timeout": 0,
"force": false,
"stateful": false
}
DBUG[08-02|22:03:42] Got operation from LXD
DBUG[08-02|22:03:42]
{
"id": "7f1f0d89-7b15-41a7-ac4a-8389b96864c6",
"class": "task",
"description": "Starting container",
"created_at": "2019-08-02T22:03:42.417782261+03:00",
"updated_at": "2019-08-02T22:03:42.417782261+03:00",
"status": "Running",
"status_code": 103,
"resources": {
"containers": [
"/1.0/containers/dummy"
]
},
"metadata": null,
"may_cancel": false,
"err": "",
"location": "none"
}
DBUG[08-02|22:03:42] Sending request to LXD method=GET url=http://unix.socket/1.0/operations/7f1f0d89-7b15-41a7-ac4a-8389b96864c6 etag=
DBUG[08-02|22:03:42] Got response struct from LXD
DBUG[08-02|22:03:42]
{
"id": "7f1f0d89-7b15-41a7-ac4a-8389b96864c6",
"class": "task",
"description": "Starting container",
"created_at": "2019-08-02T22:03:42.417782261+03:00",
"updated_at": "2019-08-02T22:03:42.417782261+03:00",
"status": "Running",
"status_code": 103,
"resources": {
"containers": [
"/1.0/containers/dummy"
]
},
"metadata": null,
"may_cancel": false,
"err": "",
"location": "none"
}