News

LXC/LXD/LXCFS 2.0 - End of Life announcement

14th of June 2021

Introduction

The 2.0 LTS branch has reached its end of life.

This affects the following projects:

  • LXC 2.0 (released 6th of April 2016)
  • LXCFS 2.0 (released 31st of March 2016)
  • LXD 2.0 (released 11th of April 2016)

After over 5 years of bugfixes and security maintenance, those releases have now reached the end of their supported lifetime.

Concretely, this means that we will not be issuing any new releases, that our stable branches will be closed and associated CI disabled.

All remaining users should upgrade to a supported release as soon as possible.

Long term support releases

Upstream commits to 5 years support for its LTS branches. Such branches exist for LXC, LXCFS and LXD and see bugfixes and security fixes backported to them.

No new features get added to those branches and only the latest LTS branch sees most bugfixes backported, once a new LTS branch is released, the previous one will only get security and critical bugfixes.

Currently supported releases

There are currently two remaining LTS releases, 3.0 with support lasting until June 2023 and 4.0 with support until June 2025.

Additionally, some projects (currently LXD) may have more frequent feature releases. Those do not get long term support and are usually only supported until the next one comes out.

LXD 4.15 has been released

4th of June 2021

Introduction

The LXD team is very excited to announce the release of LXD 4.15!

This is an exciting release with new features for just about everyone. The headline feature is no doubt the ability to hot add/remove network interfaces in LXD virtual machines, making it that much closer to our container experience. But there are also various command line improvements, improved auditing capabilities and cluster features.

Enjoy!

New features and highlights

Network interface hotplug in VMs

It's now possible to add up to 4 additional network interfaces to a running virtual machine. Existing network interfaces can also be removed from a running virtual machine.

This relies on PCI hotplug and so requires the guest operating system to properly handle it.

Configurable shutdown timeout

A new configuration key core.shutdown_timeout that controls the number of minutes to wait for existing operations to complete when LXD is instructed to shutdown.

This allows to override the default of 5 minutes. It can be shortened in environments where interrupting long lasting lxc exec sessions isn't a problem. Or can be lengthened for environments where you do want all existing operations to complete prior to LXD exitting.

New persistent warnings (time skew, apparmor and virtiofsd)

Additional warnings have been added to the warnings API introduce in LXD 4.14.

Those are:

  • Cluster time skew detection (done through heartbeats)
  • Lack or broken AppArmor support
  • Lack or broken virtiofs support

The new warnings will show up in lxc warning list when appropriate and can be acknowledged with lxc warning ack. They will also clear once the source of the warning is gone (for example after running NTP on a system with a time skew).

Location field in /dev/lxd API

Guests with access to the /dev/lxd API can now find what server they're running on when running on top of a LXD cluster. This can be useful for the configuration of high availability services within the instance by allowing it to tell whether a peer is running on the same host or not (and so whether they would likely go down at the same time).

root@shell01:~# curl -s --unix-socket /dev/lxd/sock lxd/1.0 | jq .location
"abydos"

New type and name columns in lxc config trust list

Following the addition of the server certificate type in LXD 4.14. We've now reworked the output of lxc config trust list to show both the customizable name and type of each certificates.

stgraber@castiana:~$ lxc config trust list
+--------+--------------------+----------------+--------------+------------------------------+------------------------------+
|  TYPE  |        NAME        |  COMMON NAME   | FINGERPRINT  |          ISSUE DATE          |         EXPIRY DATE          |
+--------+--------------------+----------------+--------------+------------------------------+------------------------------+
| client | nsec-ansible01     | root@ansible01 | f256b2ab81a0 | Mar 21, 2021 at 6:50pm (UTC) | Mar 19, 2031 at 6:50pm (UTC) |
+--------+--------------------+----------------+--------------+------------------------------+------------------------------+
| client | stgraber-ansible01 | root@ansible01 | 58ea2754fe55 | Dec 16, 2020 at 3:07am (UTC) | Dec 14, 2030 at 3:07am (UTC) |
+--------+--------------------+----------------+--------------+------------------------------+------------------------------+
| server | abydos             | root@abydos    | 1a9ab6d52b76 | Dec 14, 2020 at 5:58pm (UTC) | Dec 12, 2030 at 5:58pm (UTC) |
+--------+--------------------+----------------+--------------+------------------------------+------------------------------+
| server | langara            | root@langara   | e3e4701ef455 | Dec 14, 2020 at 5:58pm (UTC) | Dec 12, 2030 at 5:58pm (UTC) |
+--------+--------------------+----------------+--------------+------------------------------+------------------------------+
| server | orilla             | root@orilla    | d015dc8484da | Dec 14, 2020 at 5:58pm (UTC) | Dec 12, 2030 at 5:58pm (UTC) |
+--------+--------------------+----------------+--------------+------------------------------+------------------------------+

Cluster members acting as database stand-by now visible

LXD clusters have the first 3 servers act as database servers, then the next 2 act as stand-by database servers with the remaining servers acting just as clients with the roles being dynamically switched in the cluster as machine go up and down.

None of that has changed but it's now possible to tell what servers are acting as stand-by database. All servers that participate in the database now have the database flag set to YES in lxc cluster list, then running lxc cluster show will indicate either database or database-standby in the roles list.

lxc monitor --pretty now supported with lifecycle events

A compact version of lxc monitor --type=lifecycle is now avaialable by using the --pretty flag, similar to what was already supported for --type=logging.

stgraber@castiana:~$ lxc monitor --type=lifecycle --pretty
INFO[06-04|13:34:46] Action: instance-restarted, Source: /1.0/instances/redoc

New --expire flag for lxc publish

A new --expire flag taking a timestamp is now avaialble in lxc publish. This is then used to override any expiry already present in the instance's image metadata.

Requestor now recorded in lifecyle events

Lifecycle events now have a new requestor section which provides the protocol and user information of whoever triggered the action.

location: none
metadata:
  action: instance-restarted
  requestor:
    protocol: unix
    username: stgraber
  source: /1.0/instances/redoc
timestamp: "2021-06-04T13:33:05.33764627-04:00"
type: lifecycle

Proxy header support on main API endpoint

A new core.https_trusted_proxy configuration option was added which can be set to a comma separated list of IP addresses of reverse proxy servers fronting the LXD API.

With this, you can now have something like HAProxy in front of a LXD cluster, dispatching requests throughout the cluster while retaining the ability to see the client's IP address in LXD's logs.

Full swagger coverage of REST API

We're finally done adding metadata to our entire REST API and have deprecated the old markdown API documentation in favor of our Swagger specification.

The result can be seen here: https://linuxcontainers.org/lxd/api/master/

Complete changelog

Here is a complete list of all changes in this release:

  • lxd/main/init/interactive: Clear config.Cluster.ClusterPassword after setting up trust
  • lxc/config_trust: Add type and name columns
  • [Doc] fix description of PATCH warning in rest-api.md
  • tests: Update for trust list change
  • i18n: Update translation templates
  • [Doc] Fix remove duplicated sentences in doc/network-acls.md
  • lxd/images: Improve logging
  • lxd/api/1/0: Whitespace
  • lxd/api/1/0: Update d.gateway.HeartbeatOfflineThreshold when cluster.offline_threshold is changed
  • lxd/cluster/config: Add minThreshold to offlineThresholdValidator
  • lxd/cluster/gateway: Add HeartbeatOfflineThreshold var
  • lxd/cluster/heartbeat: Improve logging and errors in HeartbeatNode
  • lxd/cluster/heartbeat: Actually use taskCtx in HeartbeatNode for HTTP request base
  • lxd/cluster/heartbeat: Don't re-run Update as this throws away discovered node liveness times
  • lxd/cluster/heartbeat: tx.SetNodeHeartbeat to actual last heartbeat time
  • lxd/cluster/heartbeat: Update Send to support dynamic spread duration
  • lxd/cluster/heartbeat: Adds heartbeatInterval function
  • lxd/cluster/heartbeat: Updates HeartbeatTask to use gateway.heartbeatInterval
  • lxd/cluster/heartbeat: Removes heartbeatInterval constant
  • lxd/cluster/heartbeat: Updates heartbeat to use interval derived from offline threshold
  • lxd/daemon: Populate d.gateway.HeartbeatOfflineThreshold on init
  • lxd/daemon: Adds taskClusterHeartbeat var and populates it
  • lxd/cluster/heartbeat: Logging improvements
  • lxc: Update interactive editor fail message to indicate ctrl+c can be used to abort change
  • i18n: Update translation templates
  • shared/api: Add swagger metadata for instance backups
  • lxd/instances: Swagger for backups
  • lxd: Support for reading cluster certificate from file
  • doc: cluster_certificate_path documentation
  • shared/api: Add swagger metadata for image metadata
  • lxd/instances: Swagger for instance metadata
  • doc/rest-api: Refresh swagger YAML
  • lxd/images: Fix typo in swagger
  • lxd/network/openvswitch: Adds shared unquote function
  • lxd/network/openvswitch: Replace strconv.Unquote with unquote
  • lxd/network/driver/bridge: Reuse consistent bridgeLink var rather than keep creating new vars
  • lxd/network/driver/bridge: Bring up vxlan tunnel link
  • lxd/network/driver/bridge: Use clearer naming for different link types
  • lxd/network/driver/bridge: Don't use Link suffix for var names that don't represent links
  • lxd/instances: Unmount shiftfs on startup failures
  • lxd/cluster: Add core.shutdown_timeout
  • lxd/api/cluster: Check if LXD closing down in rebalanceMemberRoles
  • lxd/api/cluster: Call rebalanceMemberRoles from internalClusterRaftNodeDelete
  • lxd/cluster/gateway: Logging improvements
  • lxd/daemon: Logging improvements
  • lxd/images: Logging improvements
  • shared/api: Add swagger metadata for instances
  • lxd/instances: Swagger for instances
  • doc/rest-api: Refresh swagger YAML
  • lxd/cluster/gateway: Add heartbeatCancelLock and heartbeatCancel vars
  • lxd/cluster/heartbeat: Introduces heartbeatMode type and constants for heartbeat modes
  • lxd/cluster/heartbeat: Updates heartbeat to accept mode argument
  • lxd/cluster/heartbeat: Make end of heartbeat log message include local address for clarity
  • lxd/cluster/heartbeat: Adds heartbeatRestart function
  • lxd/cluster: g.heartbeat() usage
  • lxd/cluster/gateway: Call g.heartbeatRestart from HandlerFuncs when handling a heartbeat
  • lxd/cluster/heartbeat/test: Fixes TestHeartbeat so that it waits for join notification heartbeats to occur
  • lxd/daemon/images: imageDownloadLock typo
  • lxd: Support for core.shotdown_timeout
  • doc: Add core.shutdown_timeout
  • lxd/storage/ceph: Always return VolumeUsage
  • doc/production-setup: Cover name leakage
  • lxd/apparmor/instance: Deref OVMF path
  • lxd/device/pci: Adds DeviceIOMMUGroup function
  • lxd/device/nic/physical: Pass pciIOMMUGroup number to VM driver
  • lxd/device/nic/sriov: Pass pciIOMMUGroup number to VM driver
  • lxd/instance/drivers/qmp/commands: Adds AddNIC function
  • lxd/instance/drivers/driver/qemu: Adds one missing op.Done call and removes 2 unnecessary ones
  • lxd/instance/drivers/driver/qemu/templates: Correct comment on qemuPCIPhysical
  • lxd/instance/drivers/driver/qemu/templates: Remove NIC specific templates
  • lxd/instance/drivers/driver/qemu: Remove -chroot flag usage
  • lxd/instance/drivers/driver/qemu: Converts NICs to be added via QMP rather than static config
  • lxd/instance/drivers/driver/qemu: Remove old pid file on start if exists
  • lxd/cluster/heartbeat: Fix heartbeatInterval()
  • lxd/instance/qemu: queues is uint64
  • lxd: Support for location in devlxd api
  • lxd/instance/qemu: Support for location in writeInstanceData
  • lxd-agent: Support for location in devlxd api
  • lxd/instance/qemu: Support for security.devlxd default (true) value
  • doc/environment: Documents LXD_CONF and LXD_GLOBAL_CONF env vars
  • lxd/ip/link: MTU is an acronym and so should be uppercased in SetMtu function name
  • lxd/ip/link: Renames Mtu field to MTU as it is an acronym
  • lxd/device/device/utils/network: SetMTU usage
  • lxd/network/network/utils: Removes InterfaceSetMTU
  • lxd/network/network/utils: Adds InterfaceStatus function
  • lxd/device/infiniband/physical: SetMTU usage
  • lxd/device/infiniband/sriov: SetMTU usage
  • lxd/device/nic/macvlan: SetMTU usage
  • lxd/device/nic/physical: SetMTU usage
  • lxd/device/nic/sriov: SetMTU usage
  • lxd/network/driver/ovn: SetMTU usage
  • lxd/network/driver/bridge: SetMTU usage
  • lxd/network/network/utils/sriov: Updates sriovGetFreeVFInterface to use InterfaceStatus
  • lxd/network/driver/physical: SetMTU usage
  • lxd/network/driver/physical: Check that physical parent interface has no global unicast IPs configured on it before starting
  • lxd/network/driver/ovn: Updates startUplinkPortPhysical to check uplink has no global unicast IPs configured
  • lxd/instance/drivers/driver/qemu: Don't set multifunction=off as this upsets ccw driver
  • lxd/instances/get: Renames doContainersGet to doInstancesGet
  • lxd/instances/get: Remove some of the container specific terminology in doInstancesGet
  • lxd/instances/get: Remove potential source of nil pointer dereference panic in doInstancesGet
  • lxd/instance: Don't use RawOperation
  • lxd/operations: Remove code duplication
  • lxd/operations: Close forwarded websocket
  • shared/network: Fix channel handling in WebsocketProxy
  • client: Update for WebsocketProxy change
  • lxd/instance/drivers/qmp/commands: Adds Reset function
  • lxd/instance/drivers/driver/qemu: Updates getMonitorEventHandler to handle guest RESET events
  • lxd/instance/drivers/driver/qemu: Workaround QEMU bug that prevents QMP added devices from using their bootindex setting
  • lxc: Use consistent messaging when offering to respawn interactive editor
  • i18n: Update translation templates
  • lxd/operations: Spacing
  • lxd/operations: Fix bug in operationsGet and operationsGetByType that was overwriting list entries with loop iterator pointer
  • lxc/cluster: Always use default project in list-tokens command
  • lxd/db: Expose database stand-by role on cluster members
  • lxd/main/init/interactive: Don't attempt to connect to all join token candidates
  • lxd/operations/operations: Use structured logging in Cancel
  • lxd/images: Include operation ID in error in imageValidSecret
  • lxd/certificates: Include operation ID in error in clusterMemberJoinTokenValid
  • lxd/api/cluster: Delete any existing join token operation for potential member in clusterNodesPost
  • shared/subprocess/proc: Add exit code to error message
  • lxd/images: Maintain image public indicator when copying to member in imageSyncBetweenNodes
  • lxd/images: Improve logging in imageSyncBetweenNodes
  • lxd/images: Improve error message in imageSyncBetweenNodes
  • lxd/daemon/images: Adds ImageDownloadArgs type
  • lxd/daemon/images: Updates ImageDownload to accept ImageDownloadArgs argument
  • lxd/images: Updates imgPostRemoteInfo to use d.ImageDownload
  • lxd/images: Updates imgPostURLInfo to use d.ImageDownload
  • lxd/images: Improves error message in imagesPost
  • lxd/images: Updates autoUpdateImage to use d.ImageDownload
  • lxd/instances/post: Updates createFromImage to use ImageDownload
  • lxd/images: Don't generate args for every member in imageSyncBetweenNodes
  • shared/subprocess/proc: Adds context support to Wait
  • lxd/instance/drivers/qemu: p.Wait() usage
  • lxd/network/driver/bridge: Check dnsmasq process remains running after being started
  • shared/subprocess: Fix tests to use p.Wait() with context
  • tests: Support for database stand-by role on cluster members
  • lxd/instance/drivers/qmp/commands: Improve comment on SendFile to aid searchability
  • lxd/instance/drivers/driver/qemu: Only add bootindex if bootIndexes is non-empty
  • lxd/instance/drivers/driver/qemu: bus name is populated later so these lines do nothing
  • lxd/instance/drivers/driver/qemu: Switch to using monitor.SendFile to pass macvlan file descriptor to QEMU
  • lxd/instance/drivers/driver/qemu: Updates addNetDevConfig to remove unused args and allow preconfiguring of port to be used
  • lxd: Move ResolveWarningsByNodeAndType to separate package
  • lxd/db: Add time skew warning type
  • README: Update IRC
  • lxd/cluster: Add cluster time skew warning
  • lxd-agent/main/agent: Log when rebooting
  • lxd-agent/main/agent: Mount shares after vsock listener
  • lxd/device/disk: VM directory share improvements
  • lxd/instance/drivers/driver/qemu/templates: Always use virtfs-proxy-helper for 9p disk directory shares
  • lxd/instance/drivers/driver/qemu: Return consistent error in setupNvram for missing EFI firmware file
  • lxd/instance/drivers/driver/qemu: Log where lxd-agent is being installed from in generateConfigShare
  • lxd/instance/drivers/driver/qemy: Always use virtfs-proxy-helper for 9p directory shares
  • lxd/device/disk: Populate readonly mount option even for block device type disks
  • lxd/instance/drivers/driver/qemu: Convert readonly mount option to readonly template boolean in addDriveConfig
  • lxd/instance/drivers/driver/qemu/templates: Add support for readonly block device disks
  • lxd/instance/drivers/driver/lxc: Add revert to deviceStart
  • lxd/instance/drivers/driver/lxc: Add revert to updateDevices
  • lxd/instance/drivers/driver/qemu: Add revert to updateDevices
  • lxd/instance/drivers/qmp/commands: Adds revert to AddNIC
  • lxd/device/disk: Add DiskVirtiofsdSockMountOpt constant
  • lxd/device/disk: Add vmVirtfsProxyHelperPaths and vmVirtiofsdPaths functions
  • lxd/device/disk: Update startVM to use d.vmVirtiofsdPaths and d.vmVirtfsProxyHelperPaths
  • lxd/device/disk: Comment improvement in startVM
  • lxd/device/disk: Check virtfs-proxy-helper has bound successfully in startVM
  • lxd/device/disk: d.vmVirtiofsdPaths and d.vmVirtfsProxyHelperPaths usage in stopVM
  • lxd/instance/drivers/driver/qemu: Update addDriveDirConfig to handle getting virtiofsd socket path from disk device mount options
  • lxd/instance/drivers/driver/qemu: Improve comments in addDriveDirConfig
  • lxd/instance/drivers/driver/qemu: Ensure bootindex is generated in a stable manner in deviceBootPriorities
  • shared/api: Support for lxc monitor --pretty lifecycle events
  • lxc: Support for lxc monitor --pretty lifecycle events
  • lxd: Move warning creation to the end of init()
  • lxd/db: Add WarningAppArmorNotAvailable
  • lxd/sys: Have OS.Init() return warnings
  • lxd/sys: Add AppArmor warning
  • lxd/device/errors: Add UnsupportedError type and update ErrUnsupportedDevType to use it
  • lxd/device/device/utils/disk: Add DiskVMVirtiofsdStart and DiskVMVirtiofsdStop functions
  • lxd/device/disk: Remove unnecessary log context field in startVM
  • lxd/device/disk: Switch to using DiskVMVirtiofsdStart and DiskVMVirtiofsdStop functions for virtiofsd management
  • lxd/instance/drivers/driver/qemu: Switch to using device.DiskVMVirtiofsdStart and device.DiskVMVirtiofsdStop for config drive virtiofsd management
  • lxd/instance/drivers/driver/qemu: Add comment about 9p vs virtio-fs config drive shares in generateQemuConfigFile
  • lxd/instance/drivers/driver/qemu: Clean up comments in removeDiskDevices and removeUnixDevices
  • lxd/apparmor/instance/qemu: Allow rw access to instance devicesPath
  • lxd/apparmor/instance/qemu: Make the difference between external device paths and devices in the instance devices path clearer
  • lxd/instance/qemu: Remove duplicate key
  • lxd/apparmor/instance: Switch to externalDevPaths template var
  • lxd/apparmor/instance: Populate VM devicesPath var
  • lxd/instance/drivers/driver/qemu: Don't add config disk path in the instance's devices directory to the external devPaths var
  • lxc/publish: Fix ETag race condition
  • lxd/storage/drivers/driver/zfs/utils: Retry ZFS recursive delete command
  • tests: Test publishing ephemeral instance
  • Revert "lxd/network/driver/physical: Check that physical parent interface has no global unicast IPs configured on it before starting"
  • lxd/network/driver/ovn: Don't prevent the use of a physical uplink with IP addresses if the parent is a bridge
  • lxd/device/device/utils/disk: Adds DiskMountClear function
  • lxd/instance/drivers/driver/qemu: Add configDriveMountPath and configDriveMountPathClear helper functions
  • lxd/instance/drivers/driver/qemu: Comment
  • lxd/instance/drivers/driver/qemu: Improve error in onStop
  • lxd/instance/drivers/driver/qemu: Call device.DiskVMVirtiofsdStop and d.configDriveMountPathClear in cleanupDevices
  • lxd/instance/drivers/driver/qemu: Bind mount config directory into instance devices directory as readonly
  • lxd/instance/drivers/driver/qemu: Clearer var naming in generateQemuConfigFile
  • lxd/instance/drivers/driver/qemu: Update 9p config drive share to use readonly bind mount in generateQemuConfigFile
  • lxd/instance/drivers/driver/qemu: addDriveDirConfig comment tweak
  • lxd/storage/drivers/driver/zfs/volumes: Retry zvol deactivation if ZFS ignores us in UnmountVolume
  • lxd/device/disk: Update startContainer to mount pool volume before calling createDevice
  • lxd/device/disk: Update startVM to mount directories as bind mounts
  • lxd/device/disk: Rename reverter argument to revert in mountPoolVolume for consistency
  • lxd/device/disk: Detect unsupported non-filesystem volumes for containers in mountPoolVolume
  • lxd/device/disk: Update createDevice to accept revert and pool volume source path override
  • lxd/device/disk: Ensure that host-side device mounts are cleaned up in postStop
  • lxd/device/disk: Rework wait for virtfs-proxy-helper socket in startVM for clarity
  • lxd/device/disk: Remove check that prevents use of virtiofsd for readonly disks in startVM
  • lxd/instance/drivers/driver/qemu: Remove check in addDriveDirConfig that prevents virtiofsd for readonly shares
  • doc: mention /var/snap/lxd/common/lxd for snap users
  • lxc cluster add shouldn't have any alias
  • doc: mention /var/snap/lxd/common/lxd for snap users
  • lxd: print the join token on a separate line
  • tests: fix token extraction of lxc cluster add
  • i18n: Update translation templates
  • lxd/lxd: Record requestor as part of lifecycle events
  • lxd: Pass request to OperationCreate
  • lxd-agent: Pass request to OperationCreate
  • lxd/resources: Add swagger documentation for storage
  • shared/api: Add swagger metadata to storage pools
  • lxd/cluster: Add core.https_trusted_proxy
  • lxd/storage: Add swagger documentation for pools
  • shared/api: Split storage volume backup
  • shared/api: Add swagger metadata to storage volumes
  • doc/rest-api: Refresh swagger YAML
  • lxd/storage/drivers/driver/zfs/volumes: Include unmount action in the revert hook returned from CreateVolumeFromBackup
  • lxd/storage/backend/lxd: Improve error context returned when applying imported root disk quota
  • lxd/instances/post: Improve post hook failed context in error
  • lxd/instance/drivers/driver/qemu: Adds start and stop debug logging
  • lxd/instance/drivers/driver/qemu: Clarifies return values of pid function
  • lxd/instance/drivers/driver/qemu: Updated d.pid usage
  • lxd/instance/drivers/driver/qemu: Comment clean up in Stop
  • lxd/instance/drivers/driver/qemu: Dont start device cleanup in onStop until QEMU process has ended
  • lxc/publish: add --expire flag
  • lxd/instance/drivers/driver/qemu: Increase max wait time for qemu process to exit
  • lxd/images: pass publish expiration date to Export(); fallback to metadata.yaml expiration date
  • lxd/instance/instance_interface.go: add expiration date parameter to Export()
  • lxd/instance/drivers/driver_lxc: Export(): handle expiration date
  • lxd/instance/drivers/driver_qemu: Export(): handle expiration date
  • i18n: update translation templates
  • lxd/instance/drivers/driver/qemu: Fix logger in onStop
  • lxd/cluster/heartbeat: Don't send heartbeat from member that doesn't know its own address
  • lxd/endpoints: Update endpoints Config doc
  • lxd/cluster/heartbeat: Get local cluster address from node.ClusterAddress in heartbeat
  • lxd/storage: Add swagger documentation for volumes
  • shared/api: Add swagger metadata for storage volume state
  • lxd/storage: Add swagger documentation for volume state
  • shared/api: Add swagger metadata for storage volume snapshots
  • lxd/storage: Add swagger documentation for volume snapshots
  • lxd/storage: Fix operation type for snapshot rename
  • shared/api: Add swagger metadata for storage volume backups
  • lxd/storage: Add swagger documentation for volume backups
  • lxd/swagger: Remove partial coverage warning
  • lxd/swagger: Fix bad typing
  • doc/rest-api: Strip and point to swagger
  • doc/rest-api: Refresh swagger YAML
  • lxd/db/warnings: Adds UpsertWarningLocalNode helper function
  • lxd/warnings/warnings: Adds ResolveWarningsByLocalNodeAndType helper function
  • lxd/daemon: d.cluster.UpsertWarningLocalNode and warnings.ResolveWarningsByLocalNodeAndType usage
  • lxd/cluster/gateway: Only create persistent warning for cluster time skew when cluster is operational
  • lxd/db/warnings: Convert Warning struct's TypeCode and Status to their custom types
  • lxd/cgroup/init: db.Warning usage
  • lxd/sys/apparmor: db.Warning usage
  • lxd/db/warnings: db.Warning field usage in UpsertWarning
  • lxd/db/warnings: Improve error in UpdateWarningStatus
  • lxd/db/warnings: Renames UpdateWarningMessage to UpdateWarningState
  • lxd/db/warnings: Improve error in UpdateWarningState
  • lxd/db/warnings: Switch to tx.UpdateWarningState and fix bug preventing reoccurring warning to reactivate resolved warning
  • lxd/daemon: w.TypeCode usage
  • README: Add liblz4-dev dependency when building from source
  • doc: btrfs-tools was replaced by btrfs-progs after Bionic
  • doc: bzr isn't used anymore
  • lxc/remote: accept fingerprint as input on confirming new remote
  • doc/rest-api: Linkify API doc
  • lxd/db: Add warning type WarningMissingVirtiofsd
  • lxd/warnings: Add more resolver functions
  • lxd/device: Add and use ErrMissingVirtiofsd
  • lxd/instance/drivers: Add missing virtiofsd warning
  • lxd/device: Add virtiofsd warning
  • lxd/main_init_interactive: accept fingerprint as input on confirming cluster join
  • i18n: update translation templates
  • lxd/main_init_interactive: replace empty validator for choosing cluster config with nil
  • lxd/endpoints: Support HAProxy protocol header
  • lxd: Support HAProxy protocol header
  • doc: Add core.https_trusted_proxy
  • lxd/main_init_interactive: accept token as input on cluster join
  • api: server_trusted_proxy
  • lxd/instance/drivers/qmp/commands: Updates revert in AddNIC for consistency/clarity
  • lxd/instance/drivers/qmp/commands: Adds RemoveNIC function
  • lxd/instance/drivers/qmp/commands: Adds QueryPCI function and associated types
  • lxd/device/nic: Enable VM hotplug for macvlan, bridged, p2p, physical and sriov NIC types
  • lxd/instance/drivers/driver/common: Removes unnecessary check in runHooks
  • lxd/instance/drivers/driver/qemu/bus: Adds busDevicePortPrefix constant and uses it
  • lxd/instance/drivers/driver/qemu/templates: Uses busDevicePortPrefix constant indirectly
  • lxd/instance/drivers/driver/qemu: Allocate 4 additional PCI slots for hotplugging in generateQemuConfigFile
  • lxd/instance/drivers/driver/qemu: Adds qemuPCIDeviceIDStart constant
  • lxd/instance/drivers/driver/qemu: Update addCPUMemoryConfig to just return cpu count if nil stringbuilder supplied
  • lxd/instance/drivers/driver/qemu: Adds qemuNetDevIDPrefix and qemuDeviceIDPrefix constants
  • lxd/instance/drivers/driver/qemu: qemuDeviceIDPrefix and qemuNetDevIDPrefix usage
  • lxd/instance/drivers/driver/qemu: Adds deviceAttachNIC function
  • lxd/instance/drivers/driver/qemu: Handle hotplugging NICs by using d.deviceAttachNIC from deviceStart
  • lxd/instance/drivers/driver/qemu: Add revert to deviceStart
  • lxd/instance/drivers/driver/qemu: Adds deviceDetachNIC function
  • lxd/instance/drivers/driver/qemu: Updates deviceStop to hot unplug NICs
  • lxc/config_trust: Support stdin and allow name override
  • i18n: Update translation templates
  • i18n: Update translations from weblate

Try it for yourself

This new LXD release is already available for you to try on our demo service.

Downloads

The release tarballs can be found on our download page.

Binary builds are also available for:

  • Linux: snap install lxd
  • MacOS: brew install lxc
  • Windows: choco install lxc

LXD 4.14 has been released

7th of May 2021

Introduction

The LXD team is very excited to announce the release of LXD 4.14!

This was a slightly shorted development cycle for us but a pretty busy one with nice improvements to both standalone and cluster users.

Enjoy!

New features and highlights

ACL support on managed bridges

Network ACLs can now be used with traditional managed bridges now.

The feature works a bit differently than when used with OVN networks though as there was no practical way to do the port-based ACLs with traffic labeling with normal bridges.

Instead what's available is tying the managed bridge with one or more ACLs with those ACLs applying to egress/ingress on the bridge. Internal bridge traffic will not be affected by those ACLs.

Cluster member certificates

LXD now makes sure that each cluster member has its own distinct server certificate and that this server certificate is used for member to member communication.

This doesn't change anything to the client facing API as that one will always be served the cluster-wide certificate. Instead this change allows for easy validation of what cluster member issued a paritcular request and also allows preventing any further communication from a previous cluster when removed.

NOTE: If you were directly consuming server.crt and expecting that to match the public TLS API, this won't be the case anymore on clusters, instead use cluster.crt.

Cluster member description

Cluster members can now have a description which is editable with lxc cluster edit and displayed in lxc cluster list.

stgraber@castiana:~$ lxc cluster list
+---------+-------------------------------------+----------+--------------+----------------+----------------------+--------+-------------------+
|  NAME   |                 URL                 | DATABASE | ARCHITECTURE | FAILURE DOMAIN |     DESCRIPTION      | STATE  |      MESSAGE      |
+---------+-------------------------------------+----------+--------------+----------------+----------------------+--------+-------------------+
| abydos  | https://[2602:fd23:8:200::100]:8443 | YES      | x86_64       | default        | HIVE - top server    | ONLINE | Fully operational |
+---------+-------------------------------------+----------+--------------+----------------+----------------------+--------+-------------------+
| langara | https://[2602:fd23:8:200::101]:8443 | YES      | x86_64       | default        | HIVE - middle server | ONLINE | Fully operational |
+---------+-------------------------------------+----------+--------------+----------------+----------------------+--------+-------------------+
| orilla  | https://[2602:fd23:8:200::102]:8443 | YES      | x86_64       | default        | HIVE - bottom server | ONLINE | Fully operational |
+---------+-------------------------------------+----------+--------------+----------------+----------------------+--------+-------------------+

Cluster token based join

Instead of having to pre-add the joining server's certificate to the cluster ahead of time or have to rely on a shared trust password, it's now possible to generate a single-use token for a new cluster member.

This is done using lxc cluster add:

root@vm01:~# lxc cluster add vm02
Member vm02 join token: eyJzZXJ2ZXJfbmFtZSI6InZtMDIiLCJmaW5nZXJwcmludCI6IjkxYjE5MmEwZDBiZGRmZjdhYzI1NDE2NWMxNTI4N2Q2OWEyYmFmZDVhMTlhMjExYTc5ZjJiMDYzMTQ2NDZmNDYiLCJhZGRyZXNzZXMiOlsiMTcyLjE3LjE2LjgwOjg0NDMiXSwic2VjcmV0IjoiNThlMjlhZDc4MWI5NjRmN2UxMzMxNDgyMjVhNTc1ODNhMWEyNDY3YmRkMmE0MGVlZmU5ZDc3YWVmYzc0MzNhMiJ9

Then at joining time, this can be provided like so:

root@vm02:~# lxd init
Would you like to use LXD clustering? (yes/no) [default=no]: yes
What name should be used to identify this node in the cluster? [default=vm02]: 
What IP address or DNS name should be used to reach this node? [default=172.17.16.81]: 
Are you joining an existing cluster? (yes/no) [default=no]: yes
Do you have a join token? (yes/no) [default=no]: yes
Please provide join token: eyJzZXJ2ZXJfbmFtZSI6InZtMDIiLCJmaW5nZXJwcmludCI6IjkxYjE5MmEwZDBiZGRmZjdhYzI1NDE2NWMxNTI4N2Q2OWEyYmFmZDVhMTlhMjExYTc5ZjJiMDYzMTQ2NDZmNDYiLCJhZGRyZXNzZXMiOlsiMTcyLjE3LjE2LjgwOjg0NDMiXSwic2VjcmV0IjoiNTg1YzVhZDFhMzI4Mjg5YTkwYjc2NGMzMWM4MDdkNGViYTNiMDM3MDQ5OWNlMjA2MjgxNzQwYWQ4YWM2OWQ1MiJ9
All existing data is lost when joining a cluster, continue? (yes/no) [default=no] yes

Server warnings

Instead of just burying warnings in our log file, we're also now starting to expose them through our API. Currently only cgroup warnings are exposed but we expect this to slowly grow in use over the next few releases.

Warnings are tracked cluster-wide, can self-resolve when corrected (if LXD can detect it to be solved) and they can also be silenced by acknowleding them.

stgraber@castiana:~$ lxc warning list
+--------------------------------------+---------------------------------------+--------+----------+-------+---------+----------+-----------------------------+
|                 UUID                 |                 TYPE                  | STATUS | SEVERITY | COUNT | PROJECT | LOCATION |          LAST SEEN          |
+--------------------------------------+---------------------------------------+--------+----------+-------+---------+----------+-----------------------------+
| 51526df0-b71b-41ca-8936-5c8c9298111c | Couldn't find the CGroup blkio.weight | NEW    | LOW      | 1     |         |          | May 7, 2021 at 5:40pm (UTC) |
+--------------------------------------+---------------------------------------+--------+----------+-------+---------+----------+-----------------------------+

stgraber@castiana:~$ lxc warning ack 51526df0-b71b-41ca-8936-5c8c9298111c
stgraber@castiana:~$ lxc warning list
+------+------+--------+----------+-------+---------+----------+-----------+
| UUID | TYPE | STATUS | SEVERITY | COUNT | PROJECT | LOCATION | LAST SEEN |
+------+------+--------+----------+-------+---------+----------+-----------+

stgraber@castiana:~$ lxc warning list -a
+--------------------------------------+---------------------------------------+--------------+----------+-------+---------+----------+-----------------------------+
|                 UUID                 |                 TYPE                  |    STATUS    | SEVERITY | COUNT | PROJECT | LOCATION |          LAST SEEN          |
+--------------------------------------+---------------------------------------+--------------+----------+-------+---------+----------+-----------------------------+
| 51526df0-b71b-41ca-8936-5c8c9298111c | Couldn't find the CGroup blkio.weight | ACKNOWLEDGED | LOW      | 1     |         |          | May 7, 2021 at 5:40pm (UTC) |
+--------------------------------------+---------------------------------------+--------------+----------+-------+---------+----------+-----------------------------+

Backup and snapshot project restrictions

A new set of project restrictions was added to control backups and snapshots.

Backups and snapshots can be resource expensive, both in CPU time and disk usage, so you may not want every project user to be allowed to use them.

The restricted.snapshots and restricted.backups config keys can be used to control this. Those apply to both instance and custom volume snapshots/backups and also affect scheduled snapshots.

User keys in device configuration

It's now possible to user user.XYZ type keys directly in device configs.

stgraber@castiana:~$ lxc config device set cgroup2 root user.foo bar
stgraber@castiana:~$ lxc config device get cgroup2 root user.foo
bar

We believe this was the last place in LXD's API where the user namespace of config keys wasn't allowed yet. This being added now should make it easy for 3rd party tools to store their metadata directly on LXD objects.

More auto-generated REST-API documentation

We made some more progress on adding swagger metadata to our API. A bit over half of the instance endpoints are now covered with the rest expected to land in the coming days. This will leave us with just the storage API to document.

We're now expecting this to be fully complete in LXD 4.15.

A temporary rendering of this can be found here: https://dl.stgraber.org/swag-lxd/

Complete changelog

Here is a complete list of all changes in this release:

  • lxd/firewwall/drivers/drivers/nftables: Changes nftables to use a single inet table rather than separate ip and ip6 tables
  • test: Updates proxy tests to check nftables inet table
  • tests: Fix failure on 5.11 kernel
  • lxd/network/acl/driver/common: Improve error messages in d.validateRuleSubjects
  • lxd/network/acl/driver/common: Allow single IP addresses in source/destination subjects
  • lxd/network/driver/ovn: Renames logName var to logPrefix
  • lxd/network/acl/acl/ovn: Handle single IP in source/destination subjects
  • lxd/network/acl/acl/ovn: Renames logName arg to logPrefix in OVNApplyInstanceNICDefaultRules
  • lxd/firewall/drivers/drivers/xtables: Don't check for existing rule in iptablesAdd
  • lxd/firewall/drivers/drivers/xtables: Updates d.iptablesChainExists to return if chain has any rules
  • shared/validate/validate: Check IsNetworkPortRange range starts lower than end
  • forkexec: log more failures
  • Revert "lxd/firewall/drivers/drivers/xtables: Don't check for existing rule in iptablesAdd"
  • lxd/daemon/images: Adds imageDownloadLock function
  • lxd/daemon/images: Use d.imageDownloadLock in ImageDownload
  • lxd/daemon/images: Improve error messages in ImageDownload
  • lxd/instance: Improve error messages in instanceCreateFromImage
  • lxd/instance: Use d.imageDownloadLock in instanceCreateFromImage
  • lxd/firewall/drivers/drivers/xtables: Only add multiple instance <> instance NAT rules for proxy if connect port range used in InstanceSetupProxyNAT
  • lxd/firewall/drivers/drivers/xtables: Don't look for existing rules in iptablesAdd
  • lxd/firewall/drivers/drivers/nftables: Only add multiple instance <> instance NAT rules for proxy if connect port range used in InstanceSetupProxyNAT
  • lxd/network/acl/driver/common: Add check for incorrect use of mixed IP family subjects in validateRule
  • lxd/network/acl/driver/common: Improve IP family validation for ICMP
  • lxd/networks: Updates doNetworksCreate to skip network validation during pre-join phase
  • lxd/network/acl/driver/common: Fix typo
  • lxd/project: Only consider syscall interception as low-level
  • lxd/network/driver/bridge: Validate ACL options
  • lxd/firewall/firewall/interface: Adds NetworkApplyACLRules function
  • lxd/firewall/drivers/drivers/consts: Adds ACL field to Opts to indicate we should ready firewall setup for ACL rules
  • lxd/firewall/drivers/drivers/consts: Define ACLRule type
  • lxd/network/acl/acl/firewall: Adds ACL firewall helper functions
  • lxd/network/acl/acl/interface: Adds clientType to Update
  • lxd/network/acl/acl/load: Add Config field to NetworkACLUsage
  • lxd/network/acl/acl/load: Update NetworkUsage to return bridge and ovn networks
  • lxd/network/acl/driver/common: Modifies Update to support clientType arg
  • lxd/network/acls: Pass clientType to netACL.Update
  • lxd/network/driver/ovn: Populate acl.NetworkACLUsage Config field
  • lxd/network/driver/bridge: Set ACL field in fwOpts if ACLs specified
  • lxd/network/driver/bridge: Apply ACLs on network start
  • lxd/firewall/drivers/drivers/xtables: Add ACL support
  • lxd/firewall/drivers/drivers/nftables: NetworkApplyACLRules WIP
  • test: Adds container_devices_nic_bridged_acl test for bridge ACL tests with iptables and nftables
  • api: Adds network_bridge_acl extension
  • doc/networks: Adds security.acls* config keys for bridge networks
  • doc: Adds network ACLs limitations section and links to it from bridge security.acls config key
  • shared/simplestreams: Improve error messages
  • lxd/daemon/images: Improve error messages
  • client/simplestreams/images: Improve error messages
  • test/godeps.list: Adds github.com/pkg/errors
  • Renames container_devices_nic_bridged_acl test file to align with other tests
  • test: Fix Udhcpc6 detection for nic bridged acl tests
  • lxd: don't set device cgroup values for unpriv containers
  • lxd/storage: Re-introduce cluster distributino of volume snapshots
  • lxc/remote: Only update URL in set-url
  • lxd/instance/drivers: Don't overwrite template triggers
  • lxd/daemon/images: Removes unnecessary imagesDownloadingLock mutex
  • lxc: Fix help for string arguments
  • tests: Fix apply_template check
  • lxd/cluster/membership: Updates Bootstrap to generate new cluster certificate
  • lxd/util/encryption: Comment on LoadCert
  • lxd/util/encryption: Adds LoadClusterCert function
  • test: load cluster.crt not server.crt when bootstrapping a cluster
  • lxc-to-lxd: Fix TestConvertNetworkConfig loopback only test
  • lxd/db: Add cluster ToAPI
  • lxd: Switch to using GetNodes
  • lxd/cluster: Drop List function
  • tests: Update for current cluster messages
  • lxd/lxd: Prevent multiple routed NIC devices from using "auto" gateway mode
  • lxd/db: Add node ID to StorageVolumeArgs
  • lxd/storage/volumes/snapshots: Updates autoCreateCustomVolumeSnapshotsTask to always snapshot local custom volumes
  • lxd/storage/volumes/snapshots: Update autoCreateCustomVolumeSnapshots return value
  • lxd/storage/volumes/snapshots: Adds comments to autoCreateCustomVolumeSnapshots
  • lxd: Move image-refresh to /internal/testing/
  • test/suites: Use /internal/testing/image-refresh
  • lxc/storage_volume: Properly use cluster target
  • lxc/storage_volume: Add missing target
  • vm/qemu: configure spice using -spice parameter
  • lxd/storage_volume_snapshots: Fix cluster redirection
  • lxd/db/storage: Properly increment snapshots
  • lxd/storage_pools: Fix ordering of pool delete
  • lxd/endpoint: Retry binding on startup
  • lxd/instance/qemu: Move to query-cpus-fast
  • shared/api/certificate: Adds certificate type constants
  • lxd/db/certificates: Adds CertificateAPITypeToDBType and ToAPIType functions
  • lxd/db/certificates: Comment on Certificate
  • lxc: Switch to CertificateTypeClient constant
  • lxd: Switch to CertificateTypeClient constant
  • lxd-p2c/utils: Switch to CertificateTypeClient constant
  • lxd/util/encryption: Adds LoadServerCert function
  • lxd/certificates: updateCertificateCache error quoting consistency
  • lxd/certificates: Store certificateCache by certificate type
  • lxd/certificates: db.CertificateAPITypeToDBType usage and set certificate type to server
  • lxd/certificates: Comment ending consistency
  • lxd/daemon: Adds getTrustedCertificates function
  • lxd/daemon: Update Authenticate to use d.getTrusterCertificates
  • lxd/daemon: Comment ending consistency in Authenticate
  • lxd/daemon: Ensure d.clientCerts.Projects isn't accessed without a lock
  • tests: Removes use of -v flag for nc inside busybox
  • lxd/network/driver/bridge: Don't attempt to setup ipv6 firewall when no ipv6.address
  • lxd/swagger: Add NotFound response
  • lxd/snapshots: Fix multiple schedules
  • lxd/images: Ignore intervals on manual refreshes
  • api: Add warnings
  • shared/api: Add warning structs
  • lxd/db/cluster: Create warnings table
  • lxd/db: Add operation type OperationWarningsPruneResolved
  • lxd/db: Allow object retrieval by ID
  • lxd/db: Add getURIFromEntity
  • lxd/db: Add warning severity
  • lxd/db: Add warning types
  • lxd/db: Add warning status
  • lxd/db: Add warning functions
  • lxd: Add warnings endpoints
  • lxd: Prune resolved warnings
  • lxd: Add internal /testing/warnings endpoint
  • client: Add warning functions
  • lxc: Add warning sub-command
  • test: Add warnings test
  • po: Update translations
  • lxd/db: Fix typo in error
  • doc/rest-api: Refresh swagger YAML
  • doc/rest-api: Add warnings
  • lxd: Add function to resolve warnings by their type code
  • lxd/db: Add GetWarningsByType
  • lxd/db: Add CGroup warning types
  • lxd/cgroup: Replace Log() with Warnings()
  • lxd: Handle CGroup logging and warnings in daemon
  • lxd/util/http: Fix CheckTrustState to block access for revoked certificates that were formerly trusted
  • lxd/certificates: Adds comment about the importance of a check related to CA mode in certificatesPost
  • test: Remove trusted remote before checking adding untrusted remote
  • test: Don't use CA PKI generated server certs for LXD
  • test/deps: Removes alternative pre-generated server cert and key
  • test: Remove LXD_ALT_CERT
  • test: Update PKI tests to comply with expectations of revocation behaviour
  • lxd/ip: Add ip package
  • lxd/device: Replace ip command with ip package
  • lxd: Replace ip command with ip package
  • lxd/network: Replace ip command with ip package
  • lxd/openvswitch: Replace ip command with ip package
  • tests: Add ip package to static_analysis test
  • lxd/networks/utils: Log forkdns refresh task starting in networkUpdateForkdnsServersTask
  • lxd/db/node: Adds certificates table to local database
  • lxd/db/certificates: Adds GetCertificates function
  • lxd/db/certificates: Adds ReplaceCertificates function
  • lxd/db/certificates: Adds DeleteCertificateByNameAndType function
  • lxd/certificates: Fix import ordering
  • lxd/certificates: Updates updateCertificateCache to handle per-certificate upgrade
  • Revert "lxd/instance/qemu: Move to query-cpus-fast"
  • lxd/certificates: Adds updateCertificateCacheFromLocal function
  • lxd/certificates: Notify other cluster members of certificate update in doCertificateUpdate
  • lxd/certificates: Notify other cluster members of certificate deletion in certificateDelete
  • lxd/certificates: Allow certificate type change in doCertificateUpdate
  • lxd/certificates: cluster.ErrCertificateExists and serverCert usage in certificatesPost
  • lxd/daemon: Adds serverCert and serverCertInt vars
  • lxd/daemon: Updates State to populate serverCert
  • lxd/daemon: Load trusted server certs from local DB on startup using updateCertificateCacheFromLocal
  • lxd/daemon: Refresh cached trusted certificates when heartbeat node count changes in NodeRefreshTask
  • lxd/daemon: Pass d.serverCert and networkCert to startClusterTasks Add
  • lxd/daemon: Updates Authenticate to check trusted server certs
  • lxd/state: Updates NewState to have a serverCert and updateCertificateCache arg
  • lxd/state: Update tests with NewState usage
  • lxd/util/http: Updates CheckTrustState to use networkCert argument
  • lxd/cluster/notify: Update NewNotifier to accept networkCert and serverCert args
  • lxd/cluster/tls: Update tlsClientConfig to accept networkCert and serverCert
  • lxd/cluster/tls: Updates tlsCheckCert to accept networkCert and serverCert
  • lxd/cluster/connect: Adds ErrCertificateExists var
  • lxd/cluster/connect: Updates Connect to accept networkCert and serverCert args
  • lxd/cluster/connect: Updates SetupTrust to accept serverName arg
  • lxd/cluster/connect: Adds UpdateTrust function
  • lxd/cluster/connect: Updates HasConnectivity to accept networkCert and serverCert
  • lxd/cluster/events: Updates events functions to accept networkCert and serverCert
  • lxd/cluster/gateway: Store networkCert and serverCert in Gateway and update NewGateway
  • lxd/cluster/gateway: Updates HandlerFuncs to accept trustedCerts function
  • lxd/cluster/gateway: HasConnectivity usage
  • lxd/cluster/gateway: Update Reset to handle networkCert
  • lxd/cluster/gateway: tlsClientConfig usage
  • lxd/cluster/gateway: loadInfo usage
  • lxd/cluster/heartbeat: tlsClientConfig in Send and Heartbeat
  • lxd/cluster/upgrade: Updates NotifyUpgradeCompleted with networkCert and serverCert args
  • lxd/cluster/membership: Adds EnsureServerCertificateTrusted function
  • lxd/cluster/membership: Updates Bootstrap to store serverCert in trusted certificates table
  • lxd/cluster/membership: Update Join to handle per-server certificates
  • lxd/cluster/membership: Updates notifyNodesUpdate to handle serverCert
  • lxd/cluster/membership: HasConnectivity usage
  • lxd/cluster/membership: Update Purge to remove trusted server certificate
  • lxd/cluster: Update tests to work with changes
  • lxd/api: d.gateway.HandlerFuncs usage
  • lxd/api/cluster: Updates clusterPutJoin to handle per server certificates
  • lxd/api/cluster: d.gateway.Reset usage
  • lxd/api/cluster: Call updateCertificateCache in clusterNodeDelete after certificate removed
  • lxd/api/cluster/test: server name as cert name
  • lxd/main/init: state.NewState usage
  • lxd/main/init/interactive: cluster.SetupTrust usage and serverCert naming for consistency
  • lxd: cluster.NewNotifier usage
  • lxd: cluster.Connect and related function usage
  • lxd/patches: Adds patchClusteringServerCertTrust
  • doc/clustering: Update guide to show that cluster.crt on bootstrap member should be used
  • test: Add check for trusted server certificate removal on cluster member removal
  • test: Update table count check to account for local certificates table
  • lxd/firewall/drivers/drivers/nftables: Require kernel version >= 5.2 to allow support for inet table NAT rules
  • test/suites: Update warning tests
  • lxd/images: Specify image type during distribution
  • client/connection: Correct HTTPs to HTTPS in ConnectPublicLXD
  • lxd/operations: Clarify return values in comment on Render
  • lxd/db/operations: Adds GetOnlineNodesWithRunningOperationsOfType function
  • lxd/operations: Adds operationCancel function
  • lxd/operations: Adds operationsGetByType function
  • lxd/images: Updates imageValidSecret to accept projectName and opType arguments
  • lxd/images: projectName argument in createTokenResponse
  • lxd/images: imageValidSecret usage
  • lxd/operations: Updates operationsGet to use projectName when retrieving remote operations
  • lxd/operations: Updates operationsGetByType to use projectName when retrieving remote operations
  • lxd/instances: Swagger for logs
  • lxd/instances: Update error message
  • lxd/instances: Swagger for files
  • doc/rest-api: Refresh swagger YAML
  • lxc/warning: Fix argument parsing
  • lxc/warning: Fix usage and comments
  • i18n: Update translation templates
  • lxd/project: Add AllowBackupCreation and AllowSnapshotCreation
  • lxd/projects: Add restricted.backups and restricted.snapshots
  • lxd: Support for restricted.backups and restricted.snapshots
  • api: projects_restricted_backups_and_snapshots
  • doc/projects: Add restricted.backups and restricted.snapshots
  • shared/api: Add swagger metadata for instance exec
  • lxd/instances: Swagger for exec
  • lxd/swagger: Fix json name of metadata
  • shared/api: Add swagger metadata for instance state
  • lxd/instances: Swagger for state
  • shared/api: Add swagger metadata for instance console
  • lxd/instances: Swagger for console
  • shared/api: Add swagger metadata for instances
  • lxd/instances: Swagger for instance
  • doc/rest-api: Refresh swagger YAML
  • lxd/instance/qmp: Switch to query-cpus-fast
  • lxd/apparmor: Respect LXD_OVMF_PATH
  • lxd/daemon: Improved logging in NodeRefreshTask
  • lxd/db/operations: Import ordering
  • lxd/db/operations/types: Adds OperationClusterJoinToken type
  • lxd/db/operations: Replace GetOnlineNodesWithRunningOperationsOfType with GetOperationsOfType
  • lxd/operations: Updates operationCancel with correct remote address
  • lxd/operations: Fixes operationsGetByType to filter operations by type correctly
  • lxd/node/raft/test: Corrects typo
  • api: Adds clustering_join_token extension
  • shared/api/cluster: Adds ClusterMembersPost type
  • shared/api/cluster: Adds ClusterMemberJoinToken type
  • lxd/api/cluster: Adds clusterNodesPost handler
  • client/interfaces: Adds CreateClusterMember function to interface
  • client/lxd/cluster: Adds CreateClusterMember function
  • lxc/cluster: Add lxc cluster add command
  • lxd/certificates: Adds clusterMemberJoinTokenValid and clusterMemberJoinTokenDecode functions
  • lxd/certificates: Updates certificatesPost to check supplied password against active cluster join token operations
  • lxd/main/init/interactive: Adds join token support to askClustering
  • lxc/cluster: Adds cluster list-tokens command
  • lxc/cluster: Adds clusterJoinTokenOperationToAPI function
  • lxd/operations: Updates OperationClass.String() to use constants from shared/api
  • shared/api/operations: Adds operation class name constants
  • doc/clustering: Adds details on using the join token during adding cluster members
  • i18n: Update translation templates
  • test: Adds overridable join secret to spawn_lxd_and_join_cluster
  • test: Adds join token tests to clustering_membership
  • test: Increase the offline thresholds to above 12 as heartbeat interval is hardcoded to 10
  • doc/rest-api: Refresh swagger YAML
  • Makefile: Set GO111MODULE=on for update-api swagger build
  • shared/api: Fix snapshot structs
  • lxc/config: Update following InstanceSnapshotPut fix
  • shared/api: Add swagger metadata for instance snapshots
  • lxd/instances: Swagger for snapshots
  • doc/rest-api: Refresh swagger YAML
  • i18n: Update translations from weblate
  • shared/units: Add GetByteSizeStringIEC
  • lxc/project: Use IEC units in info
  • api: clustering_description
  • shared/api: Add cluster member description
  • lxd: Expose cluster member description
  • lxc/cluster: Tweak cluster list, add description
  • Revert "test: Increase the offline thresholds to above 12 as heartbeat interval is hardcoded to 10"
  • api: Adds description back for clustering_join_token extension
  • lxd/images: Dont log error in autoSyncImagesTask when not clustered
  • lxd/images: Make logging consistent in autoSyncImagesTask
  • lxd/db/node: Display last heartbeat time in ToAPI
  • tests: Update for project info change
  • lxc: Add -f as shorthand for --format
  • lxd/devices: Allow user.XYZ
  • lxd/db/node: Updates SetNodeHeartbeat to return ErrNoSuchObject if row doesn't exist to be updated
  • lxd/db/query/retry: Use errors.Cause in Retry
  • lxd/cluster/heartbeat: Single call to time.Now() in heartbeat
  • lxd/cluster/heartbeat: Fixes bug in heartbeat that causes heartbeat round to be discarded if member removed during round
  • lxd/cluster/heartbeat: Keep error handling from g.currentRaftNodes together
  • lxd/cluster/heartbeat: Error logging consistency
  • lxd/cluster/heartbeat: Use contextual logging
  • lxd/cluster/events: Improve logging consistency in eventsUpdateListeners
  • lxd/task/group: Adds context arg to Start
  • lxd/task/start: Add context arg to Start
  • lxd/task: Start context usage
  • lxd/daemon: Updates Start functions usage by passing daemon context
  • lxd/images: Improve logging in imageSyncBetweenNodes
  • test: Add lxc cluster list before comparison in test_clustering_handover for visability into cluster state
  • test: Separate stop and publish commands in test_clustering_image_replication

Try it for yourself

This new LXD release is already available for you to try on our demo service.

Downloads

The release tarballs can be found on our download page.

Binary builds are also available for:

  • Linux: snap install lxd
  • MacOS: brew install lxc
  • Windows: choco install lxc

LXD 4.0.6 LTS has been released

6th of May 2021

Introduction

The LXD team is pleased to announce the release of LXD 4.0.6!

This is the sixth bugfix release for LXD 4.0 which is supported until June 2025.

Bugfixes and improvements

This release includes a couple of months worth of bugfixes and minor improvements from the development branch.

Some of the highlights include:

  • Support for --column in lxc storage volume list
  • Add support for migration.stateful and size.state for VM stateful snapshots and stop
  • Add ceph.rbd.features config option for ceph storage backends
  • Initial swagger API documentation
  • Add --console in lxc stop
  • NVIDIA MIG support for containers
  • Snapshot schedule aliases

The full list of commits is available below:

  • doc/instances: Tweaks to make device type linking work
  • doc/storage: Add mention of zfs.remove_snapshots
  • simplestreams: Review and sanitize urls join
  • lxd/storage/volume: Snapshot PUT is supposed to be blocking
  • lxd/storage: Fix snapshot edit routes
  • lxc/storage_volume: Use correct API for snapshots
  • lxd/storage: Cleanup volume API endpoints
  • lxd/instance/metadata: Fix API to line up with files
  • client: Drop UpdateInstanceTemplateFile
  • client: Drop UpdateInstanceTemplateFile
  • client: Fix legacy UpdateContainerTemplateFile
  • client: Rename SetInstanceMetadata to UpdateInstanceMetadata
  • lxc/config: Switch to UpdateInstanceMetadata
  • lxc/config: Always use CreateInstanceTemplateFile
  • lxd/instance/metadata: Modernize instanceMetadataPut
  • lxd/instance/metadata: Implement PATCH
  • lxd/instance/snapshots: Implement PATCH
  • lxd/storage: Tweak volume snapshot etag
  • lxd/storage/volume/snapshot: Implement PATCH
  • shared/api: Add StorageVolumeState
  • client: Add GetStoragePoolVolumeState
  • lxc/storage_volume: Add support for column argument
  • i18n: Update translation templates
  • lxd/instance/qemu: Don't use the RAM backend
  • lxd/resources: More flexible PCI handling
  • lxd/resources: Make usb address handling match PCI
  • lxd/resources: Use %q when possible
  • containers: simplify wstatus.Close() logic in Exec()
  • containers: reap zombies on attach failure
  • seccomp: block openat2()
  • lxd/instance/qemu/qmp: Add SendFile, Migrate and MigrateIncoming
  • lxd/instance/qemu/qmp: Add ping function
  • lxd/instance/qemu/qmp: Re-shuffle functions
  • lxd/instance/qemu/qmp: Rework run() function
  • lxd/instance/qemu/qmp: Update commands to use run()
  • lxd/network/network/utils: Fixes InterfaceExists to not return true if arg is empty string
  • lxd/device/nic/routed: Dont give sysctl read error when invalid value
  • lxd/device/nic/ipvlan: Dont give sysctl read error when invalid value
  • lxd/device/nic/ipvlan: network.InterfaceExists usage
  • lxd/device/nic/ipvlan: Detach ipvlan interface back to random host name on stop, then delete
  • lxd/device/nic/sriov: network.InterfaceExists usage
  • lxd/network/network/utils: InterfaceExists usage in InterfaceBindWait
  • lxd/device/nic/sriov: Use random VF MAC if VF has no automatic MAC set
  • lxd/db/instances: Adds ErrInstanceListStop that can be returned from InstanceList to stop search
  • shared/validate/validate: Adds IsNetworkRange and IsNetworkAddressCIDR functions
  • shared/validate/validate: Adds IsNetworkPort and IsNetworkPortRange functions
  • lxd/util/config: Adds SplitNTrimSpace function
  • lxd/util/config: Avoid unnecessary allocations in CopyConfig
  • shared/api/network/acl: Adds shared struct types for Network ACLs
  • shared/api/network/acl: Adds rule Normalise function
  • client/interfaces: Adds CreateNetworkACL
  • client/interfaces: Adds GetNetworkACLs
  • client/interfaces: Adds GetNetworkACL
  • client/interfaces: Adds UpdateNetworkACL
  • client/interfaces: Adds RenameNetworkACL
  • client/interfaces: Adds DeleteNetworkACL
  • client/interfaces: Adds GetNetworkACLNames
  • client/lxd/network/acls: Implements CreateNetworkACL function
  • client/lxd/network/acls: Implements GetNetworkACLs function
  • client/lxd/network/acls: Implements GetNetworkACL function
  • client/lxd/network/acls: Implements UpdateNetworkACL function
  • client/lxc/network/acls: Implements RenameNetworkACL function
  • client/lxd/network/acls: Implements DeleteNetworkACL function
  • client/lxd/network/acls: Implements GetNetworkACLNames function
  • lxd/network: Add check for overlapping ovn.ranges and dhcp.ranges
  • lxd/instance/qemu: Rework lxd-agent startup
  • lxd/device/disk: Validate that the pool is not pending
  • api: migration_stateful
  • shared: Add migration.stateful
  • doc/instance: Add migration.stateful
  • lxd/instance/qemu: Add migration.stateful support
  • lxd/device: Add migration.stateful support
  • lxd/instance/qemu: Add checks for migration.stateful
  • api: disk_state_quota
  • doc/instances: Add size.state
  • lxd/storage: Add support for size.state
  • lxd/api: Port to updated SetInstanceQuota
  • lxd/device/disk: Add support for size.state
  • lxd/instance: Prevent stateful snapshots of VMs
  • lxd/instance/qemu: Add stateful stop/start
  • doc: Drop API extension columns
  • api: storage_ceph_features
  • lxd/storage: Add ceph.rbd.features
  • doc/storage: Add ceph.rbd.features
  • scripts/bash: Add ceph.rbd.features
  • doc: Fix bad Github action link
  • lxd/instance/qemu/qmp: Switch back to upstream repo
  • lxd/device/device/interface: Adds Type interface for accessing type specific functions of a device
  • lxd/device/device/common: UpdatableFields signature change
  • lxd/device/nic/bridged: UpdatableFields signature change
  • lxd/device/nic/routed: UpdatableFields signature change
  • lxd/device/nic/p2p: UpdatableFields signature change
  • lxd/device/disk: UpdatableFields signature change
  • lxd/device/device/load: Adds newByType and LoadByType functions
  • lxd/device/nic/bridged: Switches to use NIC type agnostic route helper functions
  • lxd/device/nic/p2p: Switches to use NIC type agnostic route helper functions
  • lxd/instance/drivers/driver/common: Update comment for deviceVolatileReset to match
  • lxd/instance/drivers: d.deviceVolatileReset usage
  • doc/preseed: LXD is pronounced lex-dee
  • doc/api-extensions: LXD is pronounced lex-dee
  • tests: Typo fix
  • lxd/storage: LXD is pronounced lex-dee
  • lxd/firewall: LXD is pronounced lex-dee
  • lxd/network: LXD is pronounced lex-dee
  • lxd/api: LXD is pronounced lex-dee
  • lxd/device: LXD is pronounced lex-dee
  • lxd/storage/utils: Updates VolumeUsedByExclusiveRemoteInstancesWithProfiles to use db.ErrInstanceListStop
  • lxd/network/network/utils: Removes whitespace trimming from SubnetParseAppend
  • lxd/instance/drivers: UpdatableFields usage
  • lxd/device/device/utils/network: Changes veth route functions to not depend on device specific logic
  • lxd/instance/drivers/driver/lxc: Removes deviceResetVolatile provided by common
  • lxd/instance/drivers/driver/qemu: Removes deviceResetVolatile provided by common
  • utils: trim whitespace from block device UUID
  • lxd/storage/drivers/btrfs: Add up fs and block quota for VMs
  • lxd/storage/drivers/dir: Pass int64 size to setQuota
  • lxd/storage/drivers/dir: Add up fs and block quota for VMs
  • shared/validate/validate: Add IsCompressionAlgorithm
  • lxd/cluster: Update compression validation
  • lxd/instance: Move CreateInternal
  • lxd/instance/drivers: Rename restart to restartCommon
  • lxd/instance/drivers: Move snapshot creation to the driver
  • lxd/instance/qemu: Add restoreState
  • lxd/instance/qemu: Add saveState
  • lxd/instance/qemu: Add stateful snapshot
  • lxd/cluster: Guarantee single hearbeat loop
  • doc/rest-api: Fix and clarify backup API
  • lxd/cluster: Improve heartbeat logging
  • lxd/api: Don't use potentially nil struct
  • lxd/init: Better error on invalid auto-detect fan underlays
  • lxd/network/network/utils: Converts UsedBy to use InstanceList function
  • lxd/network/network/utils: Changes isInUseByDevices to isInUseByDevice
  • lxd/network/network/utils: Adds usedByInstanceDevices function
  • lxd/network: Fix for stable-4.0
  • doc/rest-api: More fixes for backups
  • lxd: Remove ReadToJSON
  • lxd/db: Fix RenameCertificate
  • lxd/certificate: Modernize DB handling
  • lxd/certificate: Rework cache
  • doc/backup: Mention subuid/subgid
  • lxd/db/certificates: Fix bad error handling
  • shared/api: Add restricted and projects to certificate
  • lxd/instance/drivers/driver/lxc: Log when skipping volume delete in a recovery import scenario
  • lxd/api/internal: Don't create .importing file when performing a backup import in internalImport
  • lxd/api/internal: internalImport usage
  • lxd/instance/instance/utils: CreateInternal usage of revert package
  • lxd/instances/post: internalImport usage
  • tests: Reword deadcode
  • shared/log15: Remove dead code
  • lxd/storage/drivers/driver/btrfs: Unset pool size setting during creation if not relevant
  • lxd/storage/drivers/driver/btrfs: Consisent error quoting in Create
  • lxd/storage/pools/config: Consistent error quoting in storagePoolValidateConfig
  • driver_lxc: pass flags to shiftfs mount
  • lxd/network/driver/bridge: Ensure that DHCP firewall rules are added in fan mode
  • lxd/network: Drop unused usedByInstanceDevices
  • lxd/network/network/utils: Reorders UsedBy to do cheapest search first
  • Merge pull request #8480 from tomponline/tp-network-usedby-stable-4.0
  • Makefile: Add update-api
  • shared/api: Label Server structs
  • lxd: Setup API metadata
  • lxd: Add / and /1.0 to swagger
  • tests: Update deadcode for swagger
  • doc: Include initial YAML version of rest-api
  • lxd/certificates: Add to swagger
  • shared/api: Label Certificate structs
  • doc/rest-api/swagger: Update for certificates
  • lxd/storage/drivers/utils: Comment clarify in BlockDiskSizeBytes
  • lxd/resources/storage: Rework block size handling
  • Updated instanceLogDelete function
  • lxd/device/disk: Tweak mkisofs flags
  • lxd/instance/post: Update instancePostClusteringMigrate to respect instance's project
  • lxd/instance/backup: Makes returned containers resource conditional on instance type
  • lxd/instance/console: Conditional containers resources
  • lxd/instance/delete: Updates instanceDelete to use inst var and makes returned containers resources conditional on instance type
  • lxd/instance/exec: Makes containers resources conditional on instance type
  • lxd/instance/post: Renames c to inst and makes containers resources conditional on instance type
  • lxd/instance/put: Renames c to inst and makes containers resources conditional on instance type
  • lxd/instance/snapshot: Renames sc to snapInst and makes containers resources conditional on instance type
  • lxd/instances/post: Makes containers resources conditional on instance type
  • doc/rest-api: Updates backup endpoint docs
  • lxd/cluster: Don't warn about pending nodes
  • lxd/instances: Fix instance copy within project
  • netutils: improve file descriptor retrieval and increase robustness
  • lxd/api: Add project and target arguments to doc
  • shared/api: Add comments to certificate fields
  • shared/api: Add comments to server fields
  • lxd/resources: Add swagger documentation
  • shared/api: Label Resources structs
  • doc/rest-api: Refresh swagger YAML
  • doc/projects: Projects aren't restricted by default
  • lxd/storage/drivers/util: Updates ensureVolumeBlockFile to add unsupportedResizeTypes argument
  • lxd/storage/drivers/driver/btrfs/volumes: Updates CreateVolume with ensureVolumeBlockFile comments
  • lxd/storage/drivers/driver/btrfs/volumes: Updates SetVolumeQuota to pass VolumeTypeImage to ensureVolumeBlockFile
  • lxd/storage/drivers/driver/dir/volumes: Comment improvement in CreateVolume
  • lxd: improve unix fd retrieval infrastructure
  • Update for Go 1.17 go:build tags
  • lxd/db: Don't fail preparing statements for activateifneeded
  • unixfd: vet all parameters
  • lxd/internal: Don't access undefined fields
  • tests: Fix project limits on arm64
  • doc/README: Drop readthedocs
  • lxc/remote: Update working to line up with project
  • i18n: Update translation template
  • lxd/profiles: Add to swagger
  • shared/api: Label Profiles structs
  • lxd/projects: Add to swagger
  • shared/api: Label Projects structs
  • lxd/events: Add to swagger
  • shared/api: Label Events structs
  • lxd/networks: Add to swagger
  • shared/api: Label Networks structs
  • shared/api: Hide API extensions from swagger
  • doc/rest-api: Refresh swagger YAML
  • lxd/device/gpu: Optimize setupSriovParent
  • lxd/device: Save parent PCI address for GPU SR-IOV
  • lxd/network/network/utils/sriov: Refactors SRIOVFindFreeVirtualFunction and sriovGetFreeVFInterface
  • lxd/network/network/utils/sriov: Modifies sriovGetFreeVFInterface to check a VF is down and has no IPs before considering it available
  • shared/validate/validate: Adds IsInterfaceName function
  • lxd/network/network/utils: Removes validInterfaceName function
  • lxd/network/driver: validate.IsInterfaceName usage
  • lxd/device/nic: Validate that NIC name property is valid interface name
  • lxd/device/nic: Adds nicCheckNamesUnique function
  • lxd/device/nic: Updates nicValidationRules to accept a instance.ConfigReader argument and use nicCheckNamesUnique
  • lxd/device: nicValidationRules usage
  • lxd/device: Return -1 if all VFs are in use
  • lxd/device: Support multiple GPUs for SR-IOV
  • shared/api/cluster: Architecture is a read-only field
  • shared/api: Label Network ACLs structs
  • lxd/cluster: Add to swagger
  • shared/api: Label Cluster structs
  • doc/rest-api: Refresh swagger YAML
  • lxd/network/network/utils/sriov: Don't fail when missing vfListPath in sriovGetFreeVFInterface
  • lxd/vsock: Better handle errors
  • shared/util: Add GetStableRandomInt64FromList
  • lxd/db/images: Add AutoUpdate filter
  • lxd/db/images: Add helper functions
  • docs: typo on JSON schema
  • lxd/vsock: Retry timeouts once
  • lxd/db: Set nodes.id to auto-increment
  • lxd: Add internal endpoints for updates
  • lxd/images: Fix auto image updates
  • test/suites: Test image refresh in cluster
  • lxd/images: Properly spread replicated images
  • lxd/migration: Refresh protobuf
  • lxd/storage/ceph: Fix ceph.rbd.features
  • lxd/cluster/gateway: Expose node is not clustered error
  • lxd/cluster/gateway/test: TestGateway_Single ErrNodeIsNotClustered usage
  • lxd/patches: Adds db_nodes_autoinc patch
  • lxd/storage/drivers/driver/ceph/utils: util.SplitNTrimSpace usage
  • shared/util: Removes GetStableRandomInt64FromList and GetStableRandomGenerator from shared pkg
  • lxd/util/random: Adds GetStableRandomGenerator and GetStableRandomInt64FromList functions
  • lxd/images: util.GetStableRandomInt64FromList usage
  • lxd/network/driver/bridge: util.GetStableRandomGenerator usage
  • lxd/patches: Update DB tweak for 4.0
  • shared/api/netork/acl: Adds missing example doc fields
  • test/suites: Fix sed command
  • shared/api: Mark most ACL rule fields omitempty
  • client/lxd: Don't treat % chars from LXD server response as placeholders in lxdParseResponse
  • Doc: fix typo on network type
  • doc/rest-api: Refresh swagger YAML
  • doc/rest-api: Refresh swagger YAML
  • lxd: Unmount image and backup volume on shutdown
  • lxd: Fix static analysis
  • shared: Remove WriteTempFile
  • shared/osarch: Remove dependency on shared package
  • shared/osarch: Add SupportedArchitectures
  • shared/validate: Add IsArchitecture
  • lxd/storage/drivers/generic/vfs: Error quoting in genericVFSVolumeSnapshots
  • lxd/storage/drivers/driver/btrfs/volumes: Ensure subvolumes in snapshots are copied during CreateVolumeFromCopy
  • lxd/images: Optimize image distribution
  • lxd: Properly unmount old image volume
  • lxd/instance/qemu: Add 5s QMP timeout
  • lxd/storage/drivers/volume: Optimized creation of slice in Snapshots()
  • lxd/storage/drivers/volume: Adds SnapshotsMatch function
  • lxd/storage/drivers/interface: Updates BackupVolume to take a slice of snapshot names
  • lxd/db/instances: Clarifies expected return order of snapshots in GetInstanceSnapshotsWithName
  • lxd/storage/backend/lxd: Updates BackupInstance to provide list of snapshot names to b.driver.BackupVolume
  • lxd/storage/drivers/generic/vfs: Updates genericVFSBackupVolume to accept a list of snapshot names
  • lxd/storage/drivers/driver/btrfs/volumes: Updates BackupVolume to accept a list of snapshot names
  • lxd/storage/drivers/driver/ceph/volumes: Updates BackupVolume to accept a list of snapshot names
  • lxd/storage/drivers/driver/cephfs/volumes: Updates BackupVolume to accept a list of snapshot names
  • lxd/storage/drivers/driver/dir/volumes: Updates BackupVolume to accept a list of snapshot names
  • lxd/storage/drivers/driver/lvm/volumes: Updates BackupVolume to accept a list of snapshot names
  • lxd/storage/drivers/driver/mock: Updates BackupVolume to accept a list of snapshot names
  • lxd/storage/drivers/driver/zfs/volumes: Updates BackupVolume to accept a list of snapshot names
  • lxd/storage/drivers: Clarifies ordering of VolumeSnapshots and volume.Snapshots() in comment
  • lxd/storage/volumes/snapshot: Use requested project name for operation
  • lxd/storage/volumes: Use requested project name for operation
  • lxd/operations: Renames project to projectName
  • lxd: Renames project to projectName
  • clustering: Force config when bootstrapping
  • test: Run test_clustering_image_refresh
  • test/main: Fix clustering test typo
  • test/clustering: Cleanup properly
  • test/clustering: s/localhost/public/
  • test/clustering: Replace sleep with wait
  • test/clustring: Unset LXD_NETNS
  • lxd/device/disk: Fallback to using mount device path for major/minor number extraction for BTRFS
  • lxd/instance/drivers/driver/lxc: Ensure container is stopped if post start hooks fail
  • lxd/instance/drivers/driver/qemu: Adds comment clarifying order of post start hook failure actions
  • tests: Don't block on /dev/random
  • lxd/db/images: Fix incorrect cached attribute handling
  • lxd/images: Improve error logging in autoUpdateImages
  • doc: Added a Table of Content in /doc/index.md
  • doc: Added "Feature Requests" to Bug Reports section in /doc/index.md
  • lxd/patches: Fix typo in patchNetworkClearBridgeVolatileHwaddr
  • shared/api/network/acl: Updates example with non-depcared reserved subject
  • shared/api/network/acl: Removes reference to default.action in config
  • lxd/migrate: Set TrackProgress to true to track in-cluster progress information
  • lxd: Support for in-cluster progress information
  • lxd/device/nic/bridged: Check br_netfilter for security.ipv6_filtering loaded before clearing existing rules
  • lxd/images: Skip update if image cannot be found
  • lxd/db/cluster: Extend list of entities
  • lxd/db/cluster: Fix entity URI for images
  • lxd/network/network/utils: Updates GetNeighbourIPs to return slice of NeighbourIP struct (with State)
  • lxd/device/nic/bridge: Updates State IP neighbour scanning to return valid state neighbours first
  • lxd/instance/drivers/driver/lxc: Adds statusCode function and update State to use it
  • lxd/instance/drivers/driver/lxc: Adds isRunningStatusCode function and updates IsRunning to use it
  • lxd/instance/drivers/driver/lxc: Adds renderState function and updates RenderState to use it
  • lxd/instance/drivers/driver/lxc: Updates RenderFull to use d.renderState
  • lxd/instance/drivers/driver/lxc: Updates IsFrozen to use d.statusCode()
  • lxd/instance/drivers/driver/lxc: Updates Render to use d.statusCode
  • lxd/instance/drivers/driver/lxc: Updates RenderState to use statusCode
  • lxd/instance/drivers/driver/qemu: Updates RenderState to use d.isRunningStatusCode
  • lxd/instance/drivers/driver/qemu: Updates IsRunning to use d.isRunningStatusCode
  • lxd/instance/drivers/driver/qemu: Updates IsFrozen to use d.statusCode
  • lxd/instance/drivers/driver/qemu: Reduce calls to statusCode in Render
  • lxd/instance/drivers/driver/qemu: Updates RenderFull to use d.renderState
  • lxd/instance/drivers/driver/qemu: Adds renderState and updates RenderState to use it
  • lxd/instances: Removes check for invalid state BROKEN in instancesShutdown
  • lxc/action: Allow --console with stop action.
  • i18n: Update translation templates
  • shared/api: Label Operation structs
  • lxd/operations: Add to swagger
  • doc/rest-api: Refresh swagger YAML
  • Makefile: Set GO111MODULE=off
  • doc/rest-api: Refresh swagger YAML
  • lxd/operations: Cover public endpoints
  • shared/api: Fix cluster labeling
  • lxd: Add project arguments to swagger
  • lxd/swagger: Add background operations
  • shared/api: Label Image structs
  • lxd/images: Add to swagger
  • doc/rest-api: Refresh swagger YAML
  • lxd/instance/qemu: Disable net vectors on ccw
  • lxc/list: Handle dots in device keys
  • lxd/network/driver/bridge: Error quoting
  • lxd/device: Ensure type field in NetworkInterface is specified first for liblxc
  • lxd/storage/drivers/driver/ceph/volumes: Don't ignore unmount/unmap failures in DeleteVolume
  • lxd/images: Remove images backed by remote storage
  • lxd/db: Renames isRemoteStorage to IsRemoteStorage
  • Merge pull request #8620 from tomponline/tp-storage-ceph-stable-4.0
  • Revert "doc: Added a Table of Content in /doc/index.md"
  • lxd/device/gpu_mdev: Simplify start logic
  • lxd/device/gpu_mdev: Support mdev on top of SR-IOV
  • lxc/list: Rename state to inst
  • lxc/list: Cleanup comments
  • lxc/list_test: Rename state to inst
  • lxc/info: Sort the mdev profiles
  • lxc-to-lxd: Fix test (type always goes first)
  • test/suites/clustering: Retry removing node from database in test_clustering_remove_raft_node
  • lxd/gpu/physical: Fix compute-only passthrough
  • doc/instances: Mark mdev field as required
  • lxd/db/profiles: Cleanup arg names and errors in GetProfiles
  • lxd/api/internal: Adds internalImportRootDevicePopulate function
  • lxd/api/internal/test: Add tests for internalImportRootDevicePopulate
  • lxd/api/internal: Updates internalImport to use internalImportRootDevicePopulate
  • lxd/storage/errors: Removes ErrNotImplemented
  • lxd/storage/load: Return drivers.ErrNotSupported in GetPoolByInstance when storage pool doesn't support instance type
  • lxd/storage/backend/lxd: drivers.ErrNotImplemented usage
  • lxd/storage/backend/mock: drivers.ErrNotImplemented usage
  • lxd/instance/drivers/driver/lxc: Check pool supports instance type in lxcCreate
  • lxd/instance/drivers/driver/qemu: Check pool supports instance type in qemuCreate
  • lxd/instance/drivers/driver/lxc: Use errors.Cause
  • lxd/instance/drivers/driver/qemu: Use errors.Cause
  • lxd/instance/drivers: Clearer pool load failure message
  • lxd/backup: Clearer pool load failure message
  • lxd/instance: Add revert package usage
  • lxd/instance: Clearer error messages
  • lxd/migrate/instance: storageDrivers.ErrNotImplemented usage
  • test/suites/backup: Add tests for checking lxd import profile root disk support
  • lxd/storage/backend/lxd: Check custom volume type is supported by storage pool
  • cluster: Larger Timeout to find leader
  • lxd/firewall/firewall/interface: Add NetworkSetup and remove feature specific network setup functions
  • lxd/firewall/drivers/driver/consts: Add network firewall Opts
  • lxd/firewall/drivers/drivers/nftables: Implement NetworkSetup and unexport per-feature setup functions
  • lxd/firewall/drivers/drivers/xtables: Implement NetworkSetup and unexport per-feature setup functions
  • lxd/network/driver/bridge: Switch to n.state.Firewall.NetworkSetup usage
  • doc/instance: Fix escaping
  • lxd/device/gpu: Add NVIDIA MIG support
  • doc/instances: Add GPU MIG
  • api: gpu_mig extension
  • lxd/project: Add skipUnset
  • lxd/project: Refactor instance counting
  • shared/api: Add ProjectState
  • client: Add GetProjectState
  • client: Fixes GetContainerLogfiles and GetInstanceLogfiles
  • lxd/firewall/drivers/drivers/xtables: errors.Wrapf usage
  • lxd/firewall/drivers/drivers/xtables: Removes unused args from generateFilterIptablesRules
  • lxd/firewall/drivers/drivers/xtables: Adds iptablesChainCreate and iptablesChainExists functions
  • lxd/firewall/drivers/drivers/xtables: Moves NIC level security filtering rules into own chain
  • shared/validate: Allow uppercase letters in PCI addresses
  • shared/validate: Update unit tests for PCI addresses
  • lxd/instance/drivers: Restrict virtiofs to Intel architectures
  • lxd/device/disk: Restrict virtiofs to x86_64
  • lxd/cluster: Don't copy all images on startup
  • tests: Disable test_clustering_image_replication
  • lxd/task: Add Hourly convenience function
  • lxd/firewall/firewall/interface: Adds delete and ipVersions slice args to NetworkClear
  • lxd/network/driver/bridge: n.state.Firewall.NetworkClear usage in setup
  • lxd/network/driver/bridge: firewall setup debug logging
  • lxd/network/driver/bridge: n.state.Firewall.NetworkClear usage in Stop
  • lxd/firewall/drivers/drivers/nftables: NetworkClear updated with new arguments
  • lxd/firewall/drivers/drivers/xtables: Updates networkSetupNICFilteringChain to use network-specific chain
  • lxd/firewall/drivers/drivers/xtables: Updates generateFilterIptablesRules to use network-specific chain
  • lxd/firewall/drivers/drivers/xtables: No need to use LookPath in iptablesChainCreate
  • lxd/firewall/drivers/drivers/xtables: Adds iptablesChainDelete function
  • lxd/firewall/drivers/drivers/xtables: NetworkClear updated to add new arguments
  • lxd/instance: Move NextSnapshotName
  • lxd/operations: Fix possible NPE
  • shared/validate: Add IsCron validator
  • lxd/storage/drivers/driver/zfs/volumes: Only mount instance filesystem volumes in postHook for CreateVolumeFromBackup
  • lxd/operations: Don't wait for tokens
  • lxd/images: Run autoSyncImagesTask hourly
  • lxd/db/images: Add GetImages
  • lxd/images: Retrieve all images on sync
  • lxd/images: Use CopyImage() in autoSyncImages
  • lxd/daemon: Fix comment about autoSyncImages
  • lxd: Sync images on cluster node removal
  • lxd: Sync images when cluster.images_minimal_replica changes
  • tests: Re-enable image replication tests
  • lxd: Sync images on cluster node join
  • lxd/images: Pick a random source node for replication
  • lxd/operations: Export OperationClass type
  • lxd/firewwall/drivers/drivers/nftables: Changes nftables to use a single inet table rather than separate ip and ip6 tables
  • client: Fix copy of VM snapshots
  • test: Updates proxy tests to check nftables inet table
  • tests: Fix failure on 5.11 kernel
  • lxd/firewall/drivers/drivers/xtables: Don't check for existing rule in iptablesAdd
  • lxd/firewall/drivers/drivers/xtables: Updates d.iptablesChainExists to return if chain has any rules
  • shared/validate/validate: Check IsNetworkPortRange range starts lower than end
  • forkexec: log more failures
  • Revert "lxd/firewall/drivers/drivers/xtables: Don't check for existing rule in iptablesAdd"
  • lxd/daemon/images: Adds imageDownloadLock function
  • lxd/daemon/images: Use d.imageDownloadLock in ImageDownload
  • lxd/daemon/images: Improve error messages in ImageDownload
  • lxd/instance: Improve error messages in instanceCreateFromImage
  • lxd/instance: Use d.imageDownloadLock in instanceCreateFromImage
  • lxd/firewall/drivers/drivers/xtables: Only add multiple instance <> instance NAT rules for proxy if connect port range used in InstanceSetupProxyNAT
  • lxd/firewall/drivers/drivers/xtables: Don't look for existing rules in iptablesAdd
  • lxd/firewall/drivers/drivers/nftables: Only add multiple instance <> instance NAT rules for proxy if connect port range used in InstanceSetupProxyNAT
  • lxd/networks: Updates doNetworksCreate to skip network validation during pre-join phase
  • lxd/instance: Drop unused function
  • lxd/project: Only consider syscall interception as low-level
  • lxd/instance: Fix stable-4.0 build
  • shared/simplestreams: Improve error messages
  • lxd/daemon/images: Improve error messages
  • client/simplestreams/images: Improve error messages
  • test/godeps.list: Adds github.com/pkg/errors
  • lxd: don't set device cgroup values for unpriv containers
  • lxd/storage: Re-introduce cluster distributino of volume snapshots
  • lxc/remote: Only update URL in set-url
  • lxd/instance/drivers: Don't overwrite template triggers
  • lxd/daemon/images: Removes unnecessary imagesDownloadingLock mutex
  • lxc: Fix help for string arguments
  • tests: Fix apply_template check
  • lxd/cluster/membership: Updates Bootstrap to generate new cluster certificate
  • lxd/util/encryption: Comment on LoadCert
  • lxd/util/encryption: Adds LoadClusterCert function
  • test: load cluster.crt not server.crt when bootstrapping a cluster
  • lxc-to-lxd: Fix TestConvertNetworkConfig loopback only test
  • lxd/db: Add cluster ToAPI
  • lxd: Switch to using GetNodes
  • lxd/cluster: Drop List function
  • tests: Update for current cluster messages
  • lxd/lxd: Prevent multiple routed NIC devices from using "auto" gateway mode
  • lxd/db: Add node ID to StorageVolumeArgs
  • doc: Add aliases to snapshots.schedule
  • api: snapshots_schedule_aliases
  • lxd/util: Rework random functions
  • lxd/snapshot: Add snapshot aliases
  • lxd: Use snapshot aliases
  • lxd/instance: Add startup snapshot
  • shared/validate: Add IsCron validator
  • tests: Add snapshot scheduling
  • lxd/storage/volumes/snapshots: Updates autoCreateCustomVolumeSnapshotsTask to always snapshot local custom volumes
  • lxd/storage/volumes/snapshots: Update autoCreateCustomVolumeSnapshots return value
  • lxd/storage/volumes/snapshots: Adds comments to autoCreateCustomVolumeSnapshots
  • lxd: Move image-refresh to /internal/testing/
  • test/suites: Use /internal/testing/image-refresh
  • lxc/storage_volume: Properly use cluster target
  • lxc/storage_volume: Add missing target
  • vm/qemu: configure spice using -spice parameter
  • lxd/storage_volume_snapshots: Fix cluster redirection
  • lxd/db/storage: Properly increment snapshots
  • lxd/storage_pools: Fix ordering of pool delete
  • lxd/endpoint: Retry binding on startup
  • lxd/instance/qemu: Move to query-cpus-fast
  • shared/api/certificate: Adds certificate type constants
  • lxd/db/certificates: Adds CertificateAPITypeToDBType and ToAPIType functions
  • lxd/db/certificates: Comment on Certificate
  • lxc: Switch to CertificateTypeClient constant
  • lxd: Switch to CertificateTypeClient constant
  • lxd-p2c/utils: Switch to CertificateTypeClient constant
  • lxd/util/encryption: Adds LoadServerCert function
  • lxd/certificates: updateCertificateCache error quoting consistency
  • lxd/network/driver/bridge: Don't attempt to setup ipv6 firewall when no ipv6.address
  • lxd/swagger: Add NotFound response
  • lxd/certificates: Store certificateCache by certificate type
  • lxd/certificates: db.CertificateAPITypeToDBType usage and set certificate type to server
  • lxd/certificates: Comment ending consistency
  • lxd/daemon: Adds getTrustedCertificates function
  • lxd/daemon: Update Authenticate to use d.getTrusterCertificates
  • lxd/daemon: Comment ending consistency in Authenticate
  • lxd/snapshots: Fix multiple schedules
  • lxd/images: Ignore intervals on manual refreshes
  • shared/api: Add warning structs
  • client: Add warning functions
  • lxd/db: Fix typo in error
  • lxd/util/http: Fix CheckTrustState to block access for revoked certificates that were formerly trusted
  • lxd/certificates: Adds comment about the importance of a check related to CA mode in certificatesPost
  • test: Remove trusted remote before checking adding untrusted remote
  • test: Don't use CA PKI generated server certs for LXD
  • test/deps: Removes alternative pre-generated server cert and key
  • test: Remove LXD_ALT_CERT
  • test: Update PKI tests to comply with expectations of revocation behaviour
  • Revert "lxd/instance/qemu: Move to query-cpus-fast"
  • lxd/firewall/drivers/drivers/nftables: Require kernel version >= 5.2 to allow support for inet table NAT rules
  • lxd/ip: Add ip package
  • lxd/device: Replace ip command with ip package
  • lxd: Replace ip command with ip package
  • lxd/network: Replace ip command with ip package
  • tests: Add ip package to static_analysis test

Try it for yourself

This new LXD release is already available for you to try on our demo service.

Downloads

The release tarballs can be found on our download page.

Binary builds are also available for:

  • Linux: snap install lxd
  • MacOS: brew install lxc
  • Windows: choco install lxc

LXD 4.13 has been released

10th of April 2021

Introduction

The LXD team is very excited to announce the release of LXD 4.13!

This comes with a lot of exciting new features, including project resource usage, NVIDIA MIG support, snapshot schedule aliases, default cluster architecture and a variety of improvements to the CLI tool.

Enjoy!

New features and highlights

Support for instance filters in lxc list

New filtering options are now available in lxc list as key=value filters.

  • type= (container or virtual-machine)
  • status= (running, frozen, stopped or broken)
  • architecture= (a valid architecture name)
  • location= (a cluster server name)
  • ipv4= (specific address or CIDR)
  • ipv6= (specific address or CIDR)

Example with IPv6 CIDR filtering:

stgraber@penguin:~$ lxc list ipv6=2001:470:b368::/48
+----------+---------+-----------------------+----------------------------------------------+-----------------+-----------+----------+
|   NAME   |  STATE  |         IPV4          |                     IPV6                     |      TYPE       | SNAPSHOTS | LOCATION |
+----------+---------+-----------------------+----------------------------------------------+-----------------+-----------+----------+
| buildd01 | RUNNING | 10.232.117.1 (lxdbr0) | 2602:fd23:8:1005:216:3eff:fe19:fd6e (enp5s0) | VIRTUAL-MACHINE | 7         | abydos   |
|          |         |                       | 2001:470:b368:4242::1 (lxdbr0)               |                 |           |          |
+----------+---------+-----------------------+----------------------------------------------+-----------------+-----------+----------+
| buildd02 | RUNNING | 10.181.173.1 (lxdbr0) | 2602:fd23:8:1005:216:3eff:fec8:841b (enp5s0) | VIRTUAL-MACHINE | 8         | langara  |
|          |         |                       | 2001:470:b368:4242::1 (lxdbr0)               |                 |           |          |
+----------+---------+-----------------------+----------------------------------------------+-----------------+-----------+----------+
| buildd03 | RUNNING | 10.232.46.1 (lxdbr0)  | 2602:fd23:8:1005:216:3eff:fe67:f919 (enp5s0) | VIRTUAL-MACHINE | 7         | orilla   |
|          |         |                       | 2001:470:b368:4242::1 (lxdbr0)               |                 |           |          |
+----------+---------+-----------------------+----------------------------------------------+-----------------+-----------+----------+

NVIDIA MIG support for containers

A new GPU type was introduced to support NVIDIA Multi-Instance GPUs. On systems supporting the feature, it's now possible to pass pre-created MIG compute instances into LXD containers.

This is done using a new mig gputype for the gpu device type.

lxc config device add c1 gpu0 gpu gputype=mig mig.gi=5 mig.ci=1 pci=09:00.0

This will use the compute instance 1 of the GPU instance 5 from the GPU at address 09:00.0. You can find all the relevant values from nvidia-smi after having created your MIG instances.

System wide remote configuration

The lxc command line tool now considers /etc/lxd/ as a source of configuration. A config.yaml placed there will be merged with the user's own configuration.

This allows for system-wide configuration of LXD remotes. Server certificates can similarly be placed in /etc/lxd/servercerts/.

NOTE: This won't work for snap users yet, we will soon be setting things up there so the global configuration can be placed inside /var/snap/lxd/common/.

Project resource usage

For projects with resource limits in place, it's now possible to get a simple overview of the limits and current usage. Note that the usage will only be accurate if a limit is set.

stgraber@penguin:~$ lxc project info nsec
+------------------+-----------+---------+
|     RESOURCE     |   LIMIT   |  USAGE  |
+------------------+-----------+---------+
| CONTAINERS       | UNLIMITED | 3       |
+------------------+-----------+---------+
| CPU              | 4         | 3       |
+------------------+-----------+---------+
| DISK             | 53.69GB   | 33.29GB |
+------------------+-----------+---------+
| INSTANCES        | UNLIMITED | 3       |
+------------------+-----------+---------+
| MEMORY           | 4.29GB    | 3.22GB  |
+------------------+-----------+---------+
| NETWORKS         | 10        | 1       |
+------------------+-----------+---------+
| PROCESSES        | 100000    | 30000   |
+------------------+-----------+---------+
| VIRTUAL-MACHINES | UNLIMITED | 0       |
+------------------+-----------+---------+

Snapshot schedule aliases

LXD supports automatically scheduling snapshots for both instances and for custom storage volumes. This is done using the snapshots.schedule configuration option which takes a cron pattern.

Now on top of those cron patterns, the following aliases are also supported:

  • @hourly
  • @daily
  • @midnight
  • @weekly
  • @monthly
  • @annually
  • @yearly

And for instances only, there's an additional @startup which can be used to snapshot on every instance startup or restart.

The other advantage of those aliases over a matching cron pattern is that those will be randomly distributed over time. So a @daily will not trigger at the same time for all instances or all storage volumes but it will trigger at the same time for that one instance or storage volume.

images.default_architecture for multi-architecture setups

For those running multi-architecture clusters, launching an instance without a specific target and using an image which is available on multiple architecture would result in LXD finding the least busy of all servers regardless of architecture and creating the instance there.

That's rarely the desired behavior as most multi-architecture cluster have a primary architecture (often x86_64) and then a bit of capacity on less common architecture (aarch64, ppc64le, s390x, ...). So LXD treating them all as equal and just spreading the instances among them may be quite confusing.

The new configuration option, images.default_architecture can be set to an architecture name which will be used for any cases where the image isn't specific to a single architecture.

For example on a multi-architecture cluster:

lxc config set images.default_architecture x86_64
lxc launch images:ubuntu/20.04 c1

Will now always deploy as x86_64 and one will have to use:

lxc launch images:ubuntu/20.04/arm64 c1

To specifically request the aarch64 image which will then pick a cluster server capable of running aarch64 images.

New description column in lxc project list, lxc profile list and lxc storage list

With this change just about every top level list command now shows the description attribute. This is now consistently available on:

  • lxc profile list
  • lxc image list
  • lxc project list
  • lxc storage list
  • lxc network list

It's just not shown by default on lxc list due to lack of horizontal space there but it's one of the configurable columns so can be enabled there too.

Reworked handling of default action in network ACLs

The recently introduced network ACLs came with default.action and default.logged config options at the ACL level. This was a bad design as many ACLs can be applied to one instance making those config keys confusing.

As a result, we made the decision to completely drop those two configuration keys from the ACL configuration and instead introduce a bunch more as direct configuration options on instance network devices and networks.

New configuration keys:

  • security.acls.default.egress.action
  • security.acls.default.egress.logged
  • security.acls.default.ingress.action
  • security.acls.default.ingress.logged

This also separates ingress and egress making it easy to log any blocked egress traffic while keeping blocked ingress traffic silently ignored.

--console with lxc stop

lxc stop now joins lxc start and lxc restart in supporting a --console option.

With it, you can attach to the instance's console just as it gets signaled to shutdown. This is useful to observe the shutdown sequence and spot any error.

More auto-generated REST-API documentation

Everything except for /1.0/instances and /1.0/storage-pools is now covered in our Swagger API files. This should cover all the different parameters and ways to interact with those LXD APIs.

A temporary rendering of this can be found here: https://dl.stgraber.org/swag-lxd/

Complete changelog

Here is a complete list of all changes in this release:

  • lxd/migration: Refresh protobuf
  • lxd/storage/ceph: Fix ceph.rbd.features
  • lxd/cluster/gateway: Expose node is not clustered error
  • lxd/cluster/gateway/test: TestGateway_Single ErrNodeIsNotClustered usage
  • lxd/patches: Adds db_nodes_autoinc patch
  • lxd/storage/drivers/driver/ceph/utils: util.SplitNTrimSpace usage
  • lxd/network/openvswitch/ovs: Adds TCP flag constants
  • lxd/network/acl/acl/ovn: Switches to openvswitch TCP flag constants in OVNApplyNetworkBaselineRules
  • shared/util: Removes GetStableRandomInt64FromList and GetStableRandomGenerator from shared pkg
  • lxd/util/random: Adds GetStableRandomGenerator and GetStableRandomInt64FromList functions
  • lxd/images: util.GetStableRandomInt64FromList usage
  • lxd/network/driver/bridge: util.GetStableRandomGenerator usage
  • lxd/network/driver/ovn: util.GetStableRandomGenerator usage
  • lxd/storage/volumes/snapshot: util.GetStableRandomInt64FromList usage
  • test: Run test_clustering_image_refresh
  • shared/api/netork/acl: Adds missing example doc fields
  • lxc/network/acl: Update field examples
  • i18n: Update translation template
  • lxd/network/acl/acl/load: Fix UsedBy with project profiles
  • test/suites: Fix sed command
  • shared/api: Mark most ACL rule fields omitempty
  • Fix typo in doc/projects.md, replace images with backups
  • Fix a typo in rest-api.md for renaming a network ACL
  • client/lxd: Don't treat % chars from LXD server response as placeholders in lxdParseResponse
  • doc/network/acls: Changes reserved subject names
  • lxd/network/acl/acl/ovn: Handles deprecated aliases for subjects
  • shared/api/network/acl: Updates example with non-depcared reserved subject
  • lxd/network/acl/driver/common: Deprecates #internal and #external subjects and replaces them with @internal and @external
  • Doc: fix typo on network type
  • doc/rest-api: Refresh swagger YAML
  • doc/rest-api: Refresh swagger YAML
  • lxd: Unmount image and backup volume on shutdown
  • lxd: Fix static analysis
  • shared: Remove WriteTempFile
  • shared/osarch: Remove dependency on shared package
  • shared/osarch: Add SupportedArchitectures
  • shared/validate: Add IsArchitecture
  • lxd/project: Add images.default_architecture
  • lxd/cluster: Add images.default_architecture
  • lxd/db: Support images.default_architecture
  • lxd: Support images.default_architecture
  • doc: Add images.default_architecture
  • api: images_default_architecture
  • lxd/network/driver/ovn: Adds n.ensureNetworkPortGroup and use it in setup() and Start()
  • lxd/network/driver/ovn: Clarifies comment
  • lxd/storage/drivers/generic/vfs: Error quoting in genericVFSVolumeSnapshots
  • lxd/storage/drivers/driver/btrfs/volumes: Ensure subvolumes in snapshots are copied during CreateVolumeFromCopy
  • lxd/images: Optimize image distribution
  • lxd: Properly unmount old image volume
  • lxd/network/acl/acl/ovn: Ensure to parenthesised || when used with && in rule match
  • lxd/instance/qemu: Add 5s QMP timeout
  • lxd/storage/drivers/volume: Optimized creation of slice in Snapshots()
  • lxd/storage/drivers/volume: Adds SnapshotsMatch function
  • lxd/storage/drivers/interface: Updates BackupVolume to take a slice of snapshot names
  • lxd/db/instances: Clarifies expected return order of snapshots in GetInstanceSnapshotsWithName
  • lxd/storage/backend/lxd: Updates BackupInstance to provide list of snapshot names to b.driver.BackupVolume
  • lxd/storage/backend/lxd: Updates BackupCustomVolume to provide list of snapshot names to b.driver.BackupVolume
  • lxd/storage/drivers/generic/vfs: Updates genericVFSBackupVolume to accept a list of snapshot names
  • lxd/storage/drivers/driver/btrfs/volumes: Updates BackupVolume to accept a list of snapshot names
  • lxd/storage/drivers/driver/ceph/volumes: Updates BackupVolume to accept a list of snapshot names
  • lxd/storage/drivers/driver/cephfs/volumes: Updates BackupVolume to accept a list of snapshot names
  • lxd/storage/drivers/driver/dir/volumes: Updates BackupVolume to accept a list of snapshot names
  • lxd/storage/drivers/driver/lvm/volumes: Updates BackupVolume to accept a list of snapshot names
  • lxd/storage/drivers/driver/mock: Updates BackupVolume to accept a list of snapshot names
  • lxd/storage/drivers/driver/zfs/volumes: Updates BackupVolume to accept a list of snapshot names
  • lxd/storage/drivers: Clarifies ordering of VolumeSnapshots and volume.Snapshots() in comment
  • lxd/storage/volumes/backup: Use requested project name for operation
  • lxd/storage/volumes/snapshot: Use requested project name for operation
  • lxd/storage/volumes: Use requested project name for operation
  • lxd/operations: Renames project to projectName
  • lxd: Renames project to projectName
  • clustering: Force config when bootstrapping
  • lxd/network/openvswitch/ovn: Work around ovn-nbctl NAT bugs in LogicalRouterDNATSNATAdd
  • lxd/network/openvswitch/ovn: Use same technique as LogicalRouterDNATSNATAdd when mayExist is true
  • lxd/network/openvswitch/ovn: Merge LogicalSwitchPortAdd and LogicalSwitchPortSet
  • lxd/network/driver/ovn: client.LogicalSwitchPortAdd usage
  • lxd/network/openvswitch/ovn: Reduce ovn-nbctl calls in LogicalSwitchPortDeleteDNS
  • lxd/network/openvswitch/ovn: Reduce calls to ovn-nbctl in LogicalSwitchPortLinkRouter
  • lxd/network/openvswitch/ovn: Reduce calls to ovn-nbctl in LogicalSwitchPortLinkProviderNetwork
  • lxd/network/openvswitch/ovn: Updates LogicalRouterDNATSNATDelete to support removing multiple entries in single call
  • lxd/network/driver/ovn: Updates InstanceDevicePortDelete to always attempt to remove its IPs from DNAT entries
  • lxd/network/openvswitch/ovn: Updates LogicalRouterRouteDelete to support removing multiple routes
  • lxd/network/driver/ovn: LogicalRouterRouteDelete usage to reduce ovn-nbctl calls
  • lxc/network_acl: Fix example
  • i18n: Update translation templates
  • lxc/project: Show description
  • lxc/profile: Add description column
  • lxc/storage: Add description column
  • doc: improve wording of network ACLs
  • doc/instances: Adds ipv4.routes and ipv6.routes for OVN NICs
  • test/main: Fix clustering test typo
  • test/clustering: Cleanup properly
  • test/clustering: s/localhost/public/
  • test/clustering: Replace sleep with wait
  • test/clustring: Unset LXD_NETNS
  • lxd/device/disk: Fallback to using mount device path for major/minor number extraction for BTRFS
  • lxd/instance/drivers/driver/lxc: Ensure container is stopped if post start hooks fail
  • lxd/instance/drivers/driver/qemu: Adds comment clarifying order of post start hook failure actions
  • lxd/network/openvswitch/ovn: Adds LogicalSwitchPorts function
  • lxd/network/driver/ovn: Use client.LogicalSwitchPorts in handleDependencyChange and Update
  • tests: Don't block on /dev/random
  • lxd/network/acl/acl/ovn: Removes unused state arg from ovnApplyToPortGroup
  • lxd/network/driver/ovn: Improved comment in InstanceDevicePortAdd
  • lxd/db/images: Fix incorrect cached attribute handling
  • lxd/images: Improve error logging in autoUpdateImages
  • doc: Added a Table of Content in /doc/index.md
  • doc: Added "Feature Requests" to Bug Reports section in /doc/index.md
  • lxd/patches: Fix typo in patchNetworkClearBridgeVolatileHwaddr
  • lxd/patches: Adds patchNetworkACLRemoveDefaults to remove ACL default.action and default.logged keys
  • doc/network-acls: Removes references to default.action and default.logged
  • shared/api/network/acl: Removes reference to default.action in config
  • lxd/network/acl/acl/ovn: Removes default.action and default.logged behavior
  • lxd/network/acl/driver/common: Removes references to default.action and default.logged in config validation
  • doc/rest-api: Refresh swagger YAML
  • lxd/network/driver/ovn: Renames instance device structs to OVNInstanceNICSetupOpts and OVNInstanceNICStopOpts
  • lxd/network/driver/ovn: Renames InstanceDevicePortConfigParse to instanceDevicePortRoutesParse
  • lxd/network/driver/ovn: Renames InstanceDevicePortAdd to InstanceDevicePortSetup
  • lxd/network/driver/ovn: Updates InstanceDevicePortDelete to accept OVNInstanceNICStopOpts
  • lxd/network/driver/ovn: Updates handleDependencyChange to use n.InstanceDevicePortSetup
  • lxd/device/nic/ovn: Updates ovnNet interface
  • lxd/device/nic/ovn: d.network.InstanceDevicePortSetup and d.network.InstanceDevicePortDelete usage in Start()
  • lxd/device/nic/ovn: d.network.InstanceDevicePortSetup usage in Update()
  • lxd/device/nic/ovn: d.network.InstanceDevicePortDelete usage in Stop()
  • lxd/network/acl/driver/common: Export ValidActions for network and NIC validation
  • lxd/device/nic: Add support for validating security.acls.default.{in,e}gress.{action,logged} config keys
  • lxd/device/nic/ovn: Validates security.acls.default.{in,e}gress.{action,logged} config keys
  • doc/networks: Adds security.acls.default.{in,e}gress.{action,logged} keys to ovn network
  • doc/instances: Adds security.acls.default.{in,e}gress.{action,logged} keys to OVN NIC
  • api: Adds network_ovn_acl_defaults extension
  • lxd/network/openvswitch/ovn: space trimming cleanup
  • lxd/network/openvswitch/ovn: Renames setACLRules to aclRuleAddAppendArgs
  • lxd/network/openvswitch/ovn: Updates LogicalSwitchSetACLRules to use o.aclRuleAddAppendArgs
  • lxd/network/openvswitch/ovn: Updates PortGroupSetACLRules to use o.aclRuleAddAppendArgs
  • lxd/network/openvswitch/ovn: Adds logicalSwitchPortACLRules function
  • lxd/network/openvswitch/ovn: Updates LogicalSwitchPortDeleteDNS to use o.logicalSwitchPortDeleteDNSAppendArgs
  • lxd/network/openvswitch/ovn: Adds logicalSwitchPortDeleteAppendArgs function
  • lxd/network/openvswitch/ovn: Updates LogicalSwitchPortDelete to use o.logicalSwitchPortDeleteAppendArgs
  • lxd/network/openvswitch/ovn: Adds LogicalSwitchPortCleanup function
  • lxd/network/openvswitch/ovn: Adds aclRuleDeleteAppendArgs, PortGroupPortSetACLRules and PortGroupPortClearACLRules functions
  • lxd/network/acl/acl/ovn: Renames ovnACLPriorityPortGroupDefaultReject to ovnACLPriorityPortGroupDefaultAction
  • lxd/network/acl/acl/ovn: Adds OVNApplyInstanceNICDefaultRules function
  • lxd/network/acl/acl/ovn: ovnApplyToPortGroup change default action to drop
  • lxd/network/driver/ovn: Error improvement
  • lxd/network/driver/ovn: Updates InstanceDevicePortSetup to setup NIC port default ACL rules
  • lxd/network/driver/ovn: Updates InstanceDevicePortDelete to use LogicalSwitchPortCleanup
  • lxd/network/driver/ovn: Adds security.acls.default.{in,e}gress.{action,logged} config key validation
  • lxd/network/driver/ovn: Adds default rule config change detection to Update
  • lxd/migrate: Set TrackProgress to true to track in-cluster progress information
  • lxd: Support for in-cluster progress information
  • lxc/move: Support for in-cluster progress information
  • lxd/device/nic/bridged: Check br_netfilter for security.ipv6_filtering loaded before clearing existing rules
  • lxd/device/nic/ovn: Typo in comment
  • lxd/network/openvswitch/ovn: Removes LogicalSwitchDHCPOptionsGetID
  • lxd/network/driver/ovn: Use client.LogicalSwitchDHCPOptionsGet in InstanceDevicePortSetup
  • lxd/network/openvswitch/ovn: Simplify LogicalSwitchDHCPOptionsDelete and make more efficient
  • lxd/network/openvswitch/ovn: Use more efficient o.LogicalSwitchDHCPOptionsDelete in LogicalSwitchDelete
  • lxd/network/openvswitch/ovn: Makes logicalSwitchDNSRecordsDelete more efficient
  • lxd/images: Skip update if image cannot be found
  • lxc/move: Support for quietFlag for in-cluster instance move
  • lxd/db/cluster: Extend list of entities
  • lxd/db/cluster: Fix entity URI for images
  • lxd/network/network/utils: Updates GetNeighbourIPs to return slice of NeighbourIP struct (with State)
  • lxd/device/nic/bridge: Updates State IP neighbour scanning to return valid state neighbours first
  • lxd/instance/drivers/driver/lxc: Adds statusCode function and update State to use it
  • lxd/instance/drivers/driver/lxc: Adds isRunningStatusCode function and updates IsRunning to use it
  • lxd/instance/drivers/driver/lxc: Adds renderState function and updates RenderState to use it
  • lxd/instance/drivers/driver/lxc: Updates RenderFull to use d.renderState
  • lxd/instance/drivers/driver/lxc: Updates IsFrozen to use d.statusCode()
  • lxd/instance/drivers/driver/lxc: Updates Render to use d.statusCode
  • lxd/instance/drivers/driver/lxc: Updates RenderState to use statusCode
  • lxd/instance/drivers/driver/qemu: Updates RenderState to use d.isRunningStatusCode
  • lxd/instance/drivers/driver/qemu: Updates IsRunning to use d.isRunningStatusCode
  • lxd/instance/drivers/driver/qemu: Updates IsFrozen to use d.statusCode
  • lxd/instance/drivers/driver/qemu: Reduce calls to statusCode in Render
  • lxd/instance/drivers/driver/qemu: Updates RenderFull to use d.renderState
  • lxd/instance/drivers/driver/qemu: Adds renderState and updates RenderState to use it
  • lxd/instances: Removes check for invalid state BROKEN in instancesShutdown
  • lxc/action: Allow --console with stop action.
  • i18n: Update translation templates
  • shared/api: Label Operation structs
  • lxd/operations: Add to swagger
  • doc/rest-api: Refresh swagger YAML
  • Makefile: Set GO111MODULE=off
  • lxd/operations: Cover public endpoints
  • shared/api: Fix cluster labeling
  • lxd: Add project arguments to swagger
  • lxd/swagger: Add background operations
  • shared/api: Label Image structs
  • lxd/images: Add to swagger
  • doc/rest-api: Refresh swagger YAML
  • lxd/instance/qemu: Disable net vectors on ccw
  • lxc/list: Handle dots in device keys
  • lxd/device/nic/bridged: Comment typo
  • lxd/network/driver/bridge: Error quoting
  • lxc/network/acl: Allow output of lxc network acl show to be used as input to lxc network acl edit
  • lxd/device: Ensure type field in NetworkInterface is specified first for liblxc
  • lxc/list: Add more instance filters
  • i18n: Update translation templates
  • Revert "doc: Added a Table of Content in /doc/index.md"
  • lxd/device/gpu_mdev: Simplify start logic
  • lxd/device/gpu_mdev: Support mdev on top of SR-IOV
  • lxc/list: Remove name filter
  • lxc/list: Rename state to inst
  • lxc/list: Cleanup comments
  • lxc/list: Pass state to filters
  • lxc/list: ipv4/ipv6 filters apply to state
  • lxc/list: Optimize filtering
  • lxc/list_test: Rename state to inst
  • lxc/list_test: Fix function signature
  • lxc/list_test: Fix name filter
  • lxc/list_test: Add state testing
  • i18n: Update translation templates
  • lxc/config: Add system-wide remotes
  • lxc/remote: Add system-wide remotes
  • lxc/info: Sort the mdev profiles
  • lxc-to-lxd: Fix test (type always goes first)
  • lxd/storage/drivers/driver/ceph/volumes: Don't ignore unmount/unmap failures in DeleteVolume
  • doc: Remotes documentation
  • i18n: Update translation templates
  • test/suites/clustering: Retry removing node from database in test_clustering_remove_raft_node
  • lxd/gpu/physical: Fix compute-only passthrough
  • doc/instances: Mark mdev field as required
  • lxd/db/profiles: Cleanup arg names and errors in GetProfiles
  • lxd/api/internal: Adds internalImportRootDevicePopulate function
  • lxd/api/internal/test: Add tests for internalImportRootDevicePopulate
  • lxd/api/internal: Updates internalImport to use internalImportRootDevicePopulate
  • lxd/storage/errors: Removes ErrNotImplemented
  • lxd/storage/load: Return drivers.ErrNotSupported in GetPoolByInstance when storage pool doesn't support instance type
  • lxd/storage/backend/lxd: drivers.ErrNotImplemented usage
  • lxd/storage/backend/mock: drivers.ErrNotImplemented usage
  • lxd/instance/drivers/driver/lxc: Check pool supports instance type in lxcCreate
  • lxd/instance/drivers/driver/qemu: Check pool supports instance type in qemuCreate
  • lxd/instance/drivers/driver/lxc: Use errors.Cause
  • lxd/instance/drivers/driver/qemu: Use errors.Cause
  • lxd/instance/drivers: Clearer pool load failure message
  • lxd/backup: Clearer pool load failure message
  • lxd/instance: Add revert package usage
  • lxd/instance: Clearer error messages
  • lxd/migrate/instance: storageDrivers.ErrNotImplemented usage
  • test/suites/backup: Add tests for checking lxd import profile root disk support
  • lxd/storage/backend/lxd: Check custom volume type is supported by storage pool
  • cluster: Larger Timeout to find leader
  • lxd/firewall/firewall/interface: Add NetworkSetup and remove feature specific network setup functions
  • lxd/firewall/drivers/driver/consts: Add network firewall Opts
  • lxd/firewall/drivers/drivers/nftables: Implement NetworkSetup and unexport per-feature setup functions
  • lxd/firewall/drivers/drivers/xtables: Implement NetworkSetup and unexport per-feature setup functions
  • lxd/network/driver/bridge: Switch to n.state.Firewall.NetworkSetup usage
  • doc/instance: Fix escaping
  • lxd/device/gpu: Add NVIDIA MIG support
  • doc/instances: Add GPU MIG
  • api: gpu_mig extension
  • doc/projects: Sort config keys
  • lxd/project: Add skipUnset
  • lxd/project: Refactor instance counting
  • api: project_usage
  • shared/api: Add ProjectState
  • lxd/project: Add getAggregateLimits
  • lxd/project: Add GetCurrentAllocations
  • lxd/projects: Add state endpoint
  • client: Add GetProjectState
  • lxc/project: Add info sub-command
  • i18n: Update translation templates
  • doc/rest-api: Add project state
  • doc/rest-api: Refresh swagger YAML
  • tests: Test for lxc project info
  • client: Fixes GetContainerLogfiles and GetInstanceLogfiles
  • doc/metadata: Adds remotes section
  • lxd/firewall/drivers/drivers/xtables: errors.Wrapf usage
  • lxd/firewall/drivers/drivers/xtables: Removes unused args from generateFilterIptablesRules
  • lxd/firewall/drivers/drivers/xtables: Adds iptablesChainCreate and iptablesChainExists functions
  • lxd/firewall/drivers/drivers/xtables: Moves NIC level security filtering rules into own chain
  • shared/validate: Allow uppercase letters in PCI addresses
  • shared/validate: Update unit tests for PCI addresses
  • lxd/instance/drivers: Restrict virtiofs to Intel architectures
  • lxd/device/disk: Restrict virtiofs to x86_64
  • lxd/cluster: Don't copy all images on startup
  • tests: Disable test_clustering_image_replication
  • lxd/task: Add Hourly convenience function
  • lxd/images: Use Hourly() in autoUpdateImagesTask
  • lxd/firewall/firewall/interface: Adds delete and ipVersions slice args to NetworkClear
  • lxd/network/driver/bridge: n.state.Firewall.NetworkClear usage in setup
  • lxd/network/driver/bridge: firewall setup debug logging
  • lxd/network/driver/bridge: n.state.Firewall.NetworkClear usage in Stop
  • lxd/firewall/drivers/drivers/nftables: NetworkClear updated with new arguments
  • lxd/firewall/drivers/drivers/xtables: Updates networkSetupNICFilteringChain to use network-specific chain
  • lxd/firewall/drivers/drivers/xtables: Updates generateFilterIptablesRules to use network-specific chain
  • lxd/firewall/drivers/drivers/xtables: No need to use LookPath in iptablesChainCreate
  • lxd/firewall/drivers/drivers/xtables: Adds iptablesChainDelete function
  • lxd/firewall/drivers/drivers/xtables: NetworkClear updated to add new arguments
  • doc: Add aliases to snapshots.schedule
  • api: snapshots_schedule_aliases
  • lxd/util: Rework random functions
  • lxd/instance: Move NextSnapshotName
  • lxd/snapshot: Add snapshot aliases
  • lxd: Use snapshot aliases
  • lxd/operations: Fix possible NPE
  • lxd/instance: Add startup snapshot
  • shared/validate: Add IsCron validator
  • tests: Add snapshot scheduling
  • i18n: Update translations from weblate
  • lxd/storage/drivers/driver/zfs/volumes: Only mount instance filesystem volumes in postHook for CreateVolumeFromBackup
  • lxd/operations: Don't wait for tokens
  • lxd/images: Run autoSyncImagesTask hourly
  • lxd/db/images: Add GetImages
  • lxd/images: Retrieve all images on sync
  • lxd/images: Use CopyImage() in autoSyncImages
  • lxd/daemon: Fix comment about autoSyncImages
  • lxd: Sync images on cluster node removal
  • lxd: Sync images when cluster.images_minimal_replica changes
  • tests: Re-enable image replication tests
  • lxd: Sync images on cluster node join
  • lxd/images: Pick a random source node for replication
  • lxd/operations: Export OperationClass type
  • client: Fix copy of VM snapshots

Try it for yourself

This new LXD release is already available for you to try on our demo service.

Downloads

The release tarballs can be found on our download page.

Binary builds are also available for:

  • Linux: snap install lxd
  • MacOS: brew install lxc
  • Windows: choco install lxc

LXD 4.12 has been released

5th of March 2021

Introduction

The LXD team is very excited to announce the release of LXD 4.12!

Our headline feature for this release certainly is the introduction of network ACLs, currently limited to OVN networks but soon available to normal LXD bridges too.

But this release also introduces stateful stop and snapshot for virtual machines, a new ceph configuration option and a LOT of new features for project users.

Finally, the LXD team would like to thank Piotr Resztak for his great work tackling a number of new LXD features in this release.

Enjoy!

New features and highlights

Initial Network ACLs support (OVN-only)

LXD now has a network ACL (access control list) mechanism. With it, you can create any number of ACLs and assign them to entire networks or to specific instance NICs.

Each ACL may contain a set of ingress and egress rules as well as some configuration.

ACLs can also refer each other as a traffic source or destination, allowing for labeling of instances and using those labels in rules rather than having to track everything by address.

An example would be a network with 3 ACLs:

  • default (applied to the network), allows egress to common external services
  • web (applied to web servers), allows ingress on tcp port 80/443
  • database (applied to database servers) allows ingress on tcp port 5432 from servers in web

This can all be done through lxc network acl and then assigned to networks or instances through security.acls .

This is currently only supported on OVN networks. In LXD 4.13, we're expecting this to be extended to managed LXD bridges through our xtables and nft firewall drivers, though some restrictions will likely be present.

Stateful stop and stateful snapshots for virtual machines

It is now possible to have LXD dump the running state of virtual machines to disk. This allows for both lxc stop --stateful and lxc snapshot --stateful.

In the case of a stateful stop, the VM's state is written to disk and then the emulator is terminated. When you want the VM running again, a simple lxc start will have the VM state restored and its execution resumed where it was stopped.

Similarly, a stateful snapshot records the VM running state at the time of the snapshot. lxc restore --stateful can then be used to bring that VM back in time, including its runtime state.

This is particularly useful ahead of a host system restart as it allows for only limited interruption of the running VMs. You can also use lxc move to relocate such a VM and then resume its operation where it was stopped on another system (currently requires absolutely identical CPUs).

Those same mechanisms will be expanded in the near future to support live migration of VMs, further limiting downtime and adding a few more restrictions in place so the VM can be moved to slightly different CPUs.

To allow for this, the VM must have migration.stateful set to true and size.state set on its root disk device to allow for additional space to store the runtime state. In this mode, PCI passthrough will be disabled as will be virtiofs.

Project restricted certificates

It's now possible to restrict specific certificates in the LXD trust store to specific projects. When this is done, the restricted certificate also gets a limited role preventing any impact on global configuration and preventing reconfiguration of the projects.

This is roughly equivalent to getting an operator role through Canonical's RBAC service when used with LXD.

To manage that, new commands lxc config trust edit and lxc config trust show have been added. lxc config trust add was extended to support --restricted and --projects.

Server configuration options now supported at the project level

A number of global configuration options now have project-specific equivalents:

  • images.compression_algorithm
  • backups.compression_algorithm
  • images.remote_cache_expiry
  • images.auto_update_cache
  • images.auto_update_interval

When those are set in the project configuration, they override their respective value from the global configuration.

Projects can now restrict cluster targeting

Another project configuration key added in 4.12 is restricted.cluster.target.

When it's set, non-admin users in restricted projects are no longer allowed to use cluster member targetting (--target). Administrators are still allowed to do it so they can perform manual cluster re-balance or node evacuation operations.

Configuration option for Ceph features

A new configuration option for Ceph storage pools was added. ceph.rbd.features takes a comma separate list of RBD features to enable on new volumes. This replaces our previous hardcoded default of layering and allows enabling more recent Ceph features when all systems support them.

Projects now supported by lxd init --dump and --preseed

lxd init --dump now includes projects as part of its YAML output:

projects:
- config:
    features.images: "true"
    features.networks: "true"
    features.profiles: "true"
    features.storage.volumes: "true"
  description: Default LXD project
  name: default
- config:
    features.images: "true"
    features.profiles: "true"
    features.storage.volumes: "true"
  description: ""
  name: demo

And this can obviously be fed back to lxd init --preseed to configure a new server.

Initial auto-generated REST-API documentation

LXD is slowly moving over to Swagger for API documentation, replacing our manually updated REST API documentation.

Only some of the endpoints are currently covered, we're expecting to finish this work in LXD 4.13. You can look at a preview here: https://dl.stgraber.org/swag-lxd/

Complete changelog

Here is a complete list of all changes in this release:

  • containers: simplify wstatus.Close() logic in Exec()
  • containers: reap zombies on attach failure
  • seccomp: block openat2()
  • lxd/instance/qemu/qmp: Add SendFile, Migrate and MigrateIncoming
  • lxd/instance/qemu/qmp: Add ping function
  • lxd/instance/qemu/qmp: Re-shuffle functions
  • lxd/instance/qemu/qmp: Rework run() function
  • lxd/instance/qemu/qmp: Update commands to use run()
  • lxd/network/network/utils: Fixes InterfaceExists to not return true if arg is empty string
  • lxd/device/nic/routed: Dont give sysctl read error when invalid value
  • lxd/device/nic/ipvlan: Dont give sysctl read error when invalid value
  • lxd/device/nic/ipvlan: network.InterfaceExists usage
  • lxd/device/nic/ipvlan: Detach ipvlan interface back to random host name on stop, then delete
  • lxd/db/instances: Adds ErrInstanceListStop that can be returned from InstanceList to stop search
  • shared/validate/validate: Adds IsNetworkRange and IsNetworkAddressCIDR functions
  • shared/validate/validate: Adds IsNetworkPort and IsNetworkPortRange functions
  • lxd/util/config: Adds SplitNTrimSpace function
  • lxd/util/config: Avoid unnecessary allocations in CopyConfig
  • api: Adds network_acl extension
  • shared/api/network/acl: Adds shared struct types for Network ACLs
  • shared/api/network/acl: Adds rule Normalise function
  • lxd/db/cluster: Adds networks_acls and networks_acls_config tables
  • lxd/db/network/acls: Adds GetNetworkACL function
  • lxd/db/network/acls: Adds CreateNetworkACL function
  • lxd/db/network/acls: Adds GetNetworkACLs function
  • lxd/db/network/acls: Adds UpdateNetworkACL function
  • lxd/db/network/acls: Adds RenameNetworkACL function
  • lxd/db/network/acls: Adds DeleteNetworkACL function
  • lxd/network/acl: Adds ACL package for managing Network ACLs
  • lxd: Add network-acls API hooks
  • lxd/network/acls: Implements networkACLGet function
  • lxd/network/acls: Implements networkACLsPost function
  • lxd/network/acls: Implements networkACLsGet function
  • lxd/network/acls: Implements networkACLPut function
  • lxd/network/acls: Adds PATCH support to networkACLPut
  • lxd/network/acls: Implements networkACLPost function
  • lxd/network/acls: Implements networkACLDelete function
  • client/interfaces: Adds CreateNetworkACL
  • client/interfaces: Adds GetNetworkACLs
  • client/interfaces: Adds GetNetworkACL
  • client/interfaces: Adds UpdateNetworkACL
  • client/interfaces: Adds RenameNetworkACL
  • client/interfaces: Adds DeleteNetworkACL
  • client/interfaces: Adds GetNetworkACLNames
  • client/lxd/network/acls: Implements CreateNetworkACL function
  • client/lxd/network/acls: Implements GetNetworkACLs function
  • client/lxd/network/acls: Implements GetNetworkACL function
  • client/lxd/network/acls: Implements UpdateNetworkACL function
  • client/lxc/network/acls: Implements RenameNetworkACL function
  • client/lxd/network/acls: Implements DeleteNetworkACL function
  • client/lxd/network/acls: Implements GetNetworkACLNames function
  • lxc/network: Registers acl subcommand from network command
  • lxc/network/acl: Add network acl command section
  • lxc/network/acl: Adds cmdNetworkACLCreate command
  • lxc/network/acl: Adds cmdNetworkACLList command
  • lxc/network/acl: Adds cmdNetworkACLGet and cmdNetworkACLShow commands
  • lxc/network/acl: Adds cmdNetworkACLSet command
  • lxc/network/acl: Adds cmdNetworkACLUnset command
  • lxc/network/acl: Adds cmdNetworkACLEdit command
  • lxc/network/acl: Adds cmdNetworkACLRename command
  • lxc/network/acl: Adds cmdNetworkACLDelete command
  • lxc/network/acl: Adds cmdNetworkACLRule subcommand with add/remove rule commands
  • doc/rest-api: Adds network ACL endpoint docs
  • test: Adds network ACL tests
  • doc/network-acls: Adds Network ACLs documentation
  • i18n: Update translation templates
  • lxd/network/driver/ovn: Uplink loading error improvements
  • lxd/device/nic/sriov: network.InterfaceExists usage
  • lxd/network/network/utils: InterfaceExists usage in InterfaceBindWait
  • lxd/device/nic/sriov: Use random VF MAC if VF has no automatic MAC set
  • lxd/instance/qemu: Rework lxd-agent startup
  • lxd/device/disk: Validate that the pool is not pending
  • api: migration_stateful
  • shared: Add migration.stateful
  • doc/instance: Add migration.stateful
  • lxd/instance/qemu: Add migration.stateful support
  • lxd/device: Add migration.stateful support
  • lxd/instance/qemu: Add checks for migration.stateful
  • api: disk_state_quota
  • doc/instances: Add size.state
  • lxd/storage: Add support for size.state
  • lxd/api: Port to updated SetInstanceQuota
  • lxd/device/disk: Add support for size.state
  • lxd/instance: Prevent stateful snapshots of VMs
  • lxd/instance/qemu: Add stateful stop/start
  • doc: Drop API extension columns
  • api: storage_ceph_features
  • lxd/storage: Add ceph.rbd.features
  • doc/storage: Add ceph.rbd.features
  • scripts/bash: Add ceph.rbd.features
  • doc: Fix bad Github action link
  • lxd/instance/qemu/qmp: Switch back to upstream repo
  • lxd/device/device/interface: Adds Type interface for accessing type specific functions of a device
  • lxd/device/device/common: UpdatableFields signature change
  • lxd/device/nic/bridged: UpdatableFields signature change
  • lxd/device/nic/p2p: UpdatableFields signature change
  • lxd/device/nic/routed: UpdatableFields signature change
  • lxd/device/disk: UpdatableFields signature change
  • lxd/device/device/load: Adds newByType and LoadByType functions
  • lxd/instance/drivers: UpdatableFields usage
  • lxd/device/device/utils/network: Changes veth route functions to not depend on device specific logic
  • lxd/device/nic/bridged: Switches to use NIC type agnostic route helper functions
  • lxd/device/nic/p2p: Switches to use NIC type agnostic route helper functions
  • lxd/instance/drivers/driver/common: Update comment for deviceVolatileReset to match
  • lxd/instance/drivers/driver/lxc: Removes deviceResetVolatile provided by common
  • lxd/instance/drivers/driver/qemu: Removes deviceResetVolatile provided by common
  • lxd/instance/drivers: d.deviceVolatileReset usage
  • doc/preseed: LXD is pronounced lex-dee
  • doc/api-extensions: LXD is pronounced lex-dee
  • tests: Typo fix
  • lxd/storage: LXD is pronounced lex-dee
  • lxd/firewall: LXD is pronounced lex-dee
  • lxd/network: LXD is pronounced lex-dee
  • lxd/api: LXD is pronounced lex-dee
  • lxd/device: LXD is pronounced lex-dee
  • lxd/storage/utils: Updates VolumeUsedByExclusiveRemoteInstancesWithProfiles to use db.ErrInstanceListStop
  • lxd/network/network/utils: Adds optimisation to UsedBy when firstOnly is true
  • lxd/network/network/utils: Removes whitespace trimming from SubnetParseAppend
  • lxd/api/project: Updates projectValidateRestrictedSubnets to use util.SplitNTrimSpace
  • lxd/network/driver/ovn: Switch to util.SplitNTrimSpace
  • lxd/device/nic/ovn: Updates usage of network.SubnetParseAppend to use util.SplitNTrimSpace
  • lxd/network/acl/acl/load: Adds Exists function
  • lxd/network/acl/acl/load: Adds UsedBy function
  • lxd/network/acl/driver/common: Updates usedBy to use UsedBy
  • lxd/network/driver/ovn: Adds OVNInstanceNICSetupOpts and OVNInstanceNICOpts types
  • lxd/network/driver/ovn: InstanceDevicePortAdd updated arguments
  • lxd/network/driver/ovn: InstanceDevicePortDelete updated arguments
  • lxd/network/driver/ovn: n.InstanceDevicePortAdd usage
  • lxd/device/nic/ovn: ovnNet update of arguments
  • lxd/device/nic/ovn: d.network.InstanceDevicePortAdd and d.network.InstanceDevicePortDelete usage
  • lxd/network/openvswitch/ovn: Converts LogicalSwitchPortExists to LogicalSwitchPortUUID
  • lxd/network/openvswitch/ovn: Converts string UUID variables to their own dedicated types
  • lxd/network/driver/ovn: Updates usage of OVN UUID types
  • lxd/network/driver/ovn: client.LogicalSwitchPortUUID usage
  • lxd/network/driver/ovn: Adds DNSName to OVNInstanceNICStartOpts
  • lxd/network/driver/ovn: Updates InstanceDevicePortAdd with opts.DNSName field name change
  • lxd/network/driver/ovn: Updates InstanceDevicePortAdd with opts.DNSName field name change in handleDependencyChange
  • lxd/device/nic/ovn: Updates use of d.network.InstanceDevicePortAdd with DNSName
  • utils: trim whitespace from block device UUID
  • lxd/storage/drivers/btrfs: Add up fs and block quota for VMs
  • lxd/storage/drivers/dir: Pass int64 size to setQuota
  • lxd/storage/drivers/dir: Add up fs and block quota for VMs
  • shared/validate/validate: Add IsCompressionAlgorithm
  • lxd/projects: Add backups.compression_algorithm and images.compression_algorithm
  • lxd/cluster: Update compression validation
  • lxd/images: Add checks for images.compression_algorithm
  • lxd/backup: Add checks for backups.compression_algorithm
  • doc/projects: Add backups.compression_algorithm and images.compression_algorithm
  • api: projects_compression
  • lxd/instance: Move CreateInternal
  • lxd/instance/drivers: Rename restart to restartCommon
  • lxd/instance/drivers: Move snapshot creation to the driver
  • lxd/network/network/utils: Converts UsedBy to use InstanceList function
  • lxd/network/network/utils: Changes isInUseByDevices to isInUseByDevice
  • lxd/network/network/utils: Adds usedByInstanceDevices function
  • lxd/device/nic/ovn: Removes non-ovn related limit code, use network.InterfaceExist
  • lxd/network/driver/ovn: Removes unnecessary calls to CloneNative in ovnNICExternalRoutes
  • lxd/instance/qemu: Add restoreState
  • lxd/instance/qemu: Add saveState
  • lxd/instance/qemu: Add stateful snapshot
  • lxd/db: Fix bad indent
  • lxd/db: Fix projects_used_by_ref for remote storage
  • lxd/cluster: Guarantee single hearbeat loop
  • doc/rest-api: Fix and clarify backup API
  • lxd/cluster: Improve heartbeat logging
  • lxd/api: Don't use potentially nil struct
  • lxd/init: Better error on invalid auto-detect fan underlays
  • doc/rest-api: More fixes for backups
  • lxd: Remove ReadToJSON
  • lxd/db: Fix RenameCertificate
  • lxd/certificate: Modernize DB handling
  • lxd/certificate: Rework cache
  • lxd/projects: Add images.remote_cache_expiry
  • lxd/db/images: Changes GetExpiredImages to GetExpiredImagesInProject
  • lxd/images: Support images.remote_cache_expiry per-project
  • doc/projects: Add images.remote_cache_expiry
  • api: projects_images_remote_cache_expiry
  • doc/backup: Mention subuid/subgid
  • lxd/db/certificates: Fix bad error handling
  • api: certificate_project
  • shared/api: Add restricted and projects to certificate
  • lxd/db: Add support for restricted certificates
  • lxd/certificates: Add support for restricted and projects
  • lxd/daemon: Add TLS permission checks
  • doc/security: Cover TLS restrictions
  • lxc/config/trust: Add Edit
  • lxc/config/trust: Add Show
  • i18n: Update translation templates
  • tests: Validate TLS restrictions
  • lxd/instance/drivers/driver/lxc: Log when skipping volume delete in a recovery import scenario
  • lxd/api/internal: Don't create .importing file when performing a backup import in internalImport
  • lxd/api/internal: internalImport usage
  • lxd/instance/instance/utils: CreateInternal usage of revert package
  • lxd/instances/post: internalImport usage
  • lxd/network/network/utils: Reorder UsedBy logic to do cheapest searches first
  • lxd/db/network/acls: Makes slice allocation more efficient in GetNetworkACLs
  • lxd/db/network/acls: Adds GetNetworkACLIDsByNames function
  • lxd/network/openvswitch/ovn: Adds PortGroupUUID function
  • lxd/network/openvswitch/ovn: Adds PortGroupAdd function
  • lxd/network/openvswitch/ovn: Adds PortGroupMemberAdd function
  • lxd/network/openvswitch/ovn: Adds OVNACLRule struct type
  • lxd/network/openvswitch/ovn: Adds PortGroupSetACLRules function
  • lxd/network/openvswitch/ovn: Adds PortGroupDelete function
  • lxd/network/openvswitch/ovn: Adds LogicalSwitchSetACLRules function
  • lxd/network/openvswitch/ovn: Adds PortGroupMemberDelete function
  • lxd/network/acl/acl/ovn: Adds OVN ACL helper functions
  • lxd/network/acl: Adds support for using state when creating ACL record
  • lxd/network/acl/acl/load: Updates UsedBy to allow searching for multiple ACLs in one pass
  • lxd/network/acl/driver/common: Updates usedBy to use updated UsedBy helper function
  • lxd/network/acl/driver/common: Makes Update apply new ACL rules to OVN port groups and instance ports
  • lxd/network/driver/ovn: Applies baseline network ACL rules in setup via acl.OVNApplyNetworkBaselineRules
  • lxd/network/driver/ovn: Adds SecurityACLs and SecurityACLsRemove to OVNInstanceNICStartOpts
  • lxd/network/driver/ovn: Adds Security ACL support to InstanceDevicePortAdd
  • lxd/network/driver/ovn: Adds PortGroupDeleteIfUnused to remove unused ACL port groups
  • lxc/network/driver/ovn: Adds support for security.acls assigned to OVN networks
  • lxd/device/nic: Adds security.acls optional field
  • lxd/device/nic/ovn: Adds security.acls support for OVN NICs
  • doc/metadata: Adds Network ACL left menu item section
  • api: Adds network_ovn_acl extension
  • doc: Adds security.acls property to OVN networks and NICs
  • tests: Reword deadcode
  • lxd/db: Remove unused code
  • shared/log15: Remove dead code
  • lxd/network/acl: Remove unused code
  • lxd/storage/drivers/driver/btrfs: Unset pool size setting during creation if not relevant
  • lxd/storage/drivers/driver/btrfs: Consisent error quoting in Create
  • lxd/storage/pools/config: Consistent error quoting in storagePoolValidateConfig
  • driver_lxc: pass flags to shiftfs mount
  • lxd/network/driver/bridge: Ensure that DHCP firewall rules are added in fan mode
  • lxd/network/driver/ovn: Don't delete port groups if their associated ACLs are referenced by rules in other ACLs
  • lxd/network/acl/acl/ovn: Adds OVNEnsureACLs function and unexports ovnApplyToPortGroup
  • lxd/network/acl/driver/common: Switch Update to use OVNEnsureACLs
  • lxd/network/driver/ovn: Switch setup to use OVNEnsureACLs
  • lxd/network/driver/ovn: Switch InstanceDevicePortAdd to use OVNEnsureACLs
  • Makefile: Add update-api
  • shared/api: Label Server structs
  • lxd: Setup API metadata
  • lxd: Add / and /1.0 to swagger
  • tests: Update deadcode for swagger
  • doc: Include initial YAML version of rest-api
  • lxd/certificates: Add to swagger
  • shared/api: Label Certificate structs
  • doc/rest-api/swagger: Update for certificates
  • lxd/storage/drivers/utils: Comment clarify in BlockDiskSizeBytes
  • lxd/network/openvswitch/ovn: Renames PortGroupUUID to PortGroupInfo
  • lxd/network/acl/acl/ovn: client.PortGroupInfo usage
  • lxd/network/driver/ovn: client.PortGroupInfo usage
  • lxd/network/acl/acl/ovn: Refactors OVNEnsureACLs to be smarter in how it sets up referenced ACLs
  • lxd/network/driver/ovn: Don't check if port group exists when removing port member in InstanceDevicePortAdd
  • lxd/resources/storage: Rework block size handling
  • Updated instanceLogDelete function
  • lxd/device/disk: Tweak mkisofs flags
  • lxd/init: Add projects to dump/init preseed
  • lxd/network/driver/ovn: Consistently use aclNameIDs var name
  • lxd/instance/post: Update instancePostClusteringMigrate to respect instance's project
  • lxd/instance/backup: Makes returned containers resource conditional on instance type
  • lxd/instance/console: Conditional containers resources
  • lxd/instance/delete: Updates instanceDelete to use inst var and makes returned containers resources conditional on instance type
  • lxd/instance/exec: Makes containers resources conditional on instance type
  • lxd/instance/post: Renames c to inst and makes containers resources conditional on instance type
  • lxd/instance/put: Renames c to inst and makes containers resources conditional on instance type
  • lxd/instance/snapshot: Renames sc to snapInst and makes containers resources conditional on instance type
  • lxd/instances/post: Makes containers resources conditional on instance type
  • lxd/device/nic/ovn: Clearer error message in validateConfig
  • lxd/network/openvswitch: Centralises DB OVN connection string retrieval in NewOVN
  • lxd/network/driver/ovn: openvswitch.NewOVN usage
  • lxd/network/acl/driver/common: openvswitch.NewOVN usage
  • lxd/network/acl/acl/ovn: Adds OVNPortGroupDeleteIfUnused
  • lxd/network/driver/ovn: Removes PortGroupDeleteIfUnused and acl.OVNPortGroupDeleteIfUnused usage
  • lxd/device/nic/ovn: acl.OVNPortGroupDeleteIfUnused usage
  • lxd/network/acl/driver/common: Calls OVNPortGroupDeleteIfUnused during Update
  • lxd/network/acl/acl/load: Only return unique list of ACLs when matching on ACL rulesets in UsedBy
  • lxd/network/acl/acl/ovn: Create referenced ACL port groups when reapplying rules from an existing ACL
  • doc/rest-api: Updates backup endpoint docs
  • lxd/cluster: Don't warn about pending nodes
  • lxd/instances: Fix instance copy within project
  • netutils: improve file descriptor retrieval and increase robustness
  • lxd/cluster: Remove AutoUpdateInterval and RemoteCacheExpiry
  • lxd/daemon: Add daemon startTime variable, remove taskAutoUpdate
  • lxd/instances/post: Support images.auto_update_cached per-project
  • lxd/api: Remove taskAutoUpdate reset
  • lxd/projects: Add images.auto_update_cached and images.auto_update_interval
  • lxd/images: Support images.auto_update_interval per-project
  • api: projects_images_auto_update
  • doc/projects: Add images.auto_update_cached and images.auto_update_interval
  • Update for Go 1.17 go:build tags
  • lxd/api: Add project and target arguments to doc
  • shared/api: Add comments to certificate fields
  • shared/api: Add comments to server fields
  • lxd/resources: Add swagger documentation
  • shared/api: Label Resources structs
  • doc/rest-api: Refresh swagger YAML
  • doc/projects: Projects aren't restricted by default
  • lxc/config/trust: Allow restricting on add
  • i18n: Update translation templates
  • lxd/storage/drivers/util: Updates ensureVolumeBlockFile to add unsupportedResizeTypes argument
  • lxd/storage/drivers/driver/btrfs/volumes: Updates CreateVolume with ensureVolumeBlockFile comments
  • lxd/storage/drivers/driver/btrfs/volumes: Updates SetVolumeQuota to pass VolumeTypeImage to ensureVolumeBlockFile
  • lxd/storage/drivers/driver/dir/volumes: Comment improvement in CreateVolume
  • lxd: improve unix fd retrieval infrastructure
  • lxd/db: Don't fail preparing statements for activateifneeded
  • unixfd: vet all parameters
  • lxd/internal: Don't access undefined fields
  • tests: Fix project limits on arm64
  • doc/README: Drop readthedocs
  • lxd/network/acl/acl/load: Adds NetworkUsage function
  • lxd/network/acl/driver/common: Adds ruleSubjectInternal and ruleSubjectExternal constants
  • lxd/network/acl/driver/common: Updates validateRule to allow ruleSubjectInternal and ruleSubjectExternal values
  • lxd/network/openvswitch/ovn: Updates LogicalSwitchDelete to delete associated port groups
  • lxd/network/openvswitch/ovn: Adds setACLRules to more efficiently set multiple rules in one command
  • lxd/network/openvswitch/ovn: Updates LogicalSwitchSetACLRules to use o.setACLRules
  • lxd/network/openvswitch/ovn: Updates PortGroupAdd to support associating to a project and optionally another port group and/or logical switch
  • lxd/network/openvswitch/ovn: Updates PortGroupDelete to support multiple specified port groups
  • lxd/network/openvswitch/ovn: Updates PortGroupSetACLRules to use o.setACLRules
  • lxd/network/openvswitch/ovn: Replaces PortGroupMemberAdd and PortGroupMemberDelete with PortGroupMemberChange
  • lxd/network/openvswitch/ovn: Adds PortGroupListByProject function
  • lxd/network/openvswitch/ovn: Use constants for OVN external IDs
  • lxd/network/acl/acl/ovn: Adds ovnACLPortGroupPrefix constant
  • lxd/network/acl/acl/ovn: Adds helper functions for entity name generation
  • lxd/network/acl/acl/ovn: Updates ovnAddReferencedACLs to ignore ruleSubjectInternal and ruleSubjectExternal values
  • lxd/network/acl/acl/ovn: Updates ovnApplyToPortGroup and associated functions to support network specific port group ACL rules
  • lxd/network/acl/acl/ovn: Removes trailing space in generated rule in OVNApplyNetworkBaselineRules
  • lxd/network/acl/acl/ovn: Comment improvements
  • lxd/network/acl/acl/ovn: Updates OVNEnsureACLs to support applying network specific port group rules
  • lxd/network/acl/acl/ovn: Adds OVNPortGroupInstanceNICSchedule helper function
  • lxd/network/acl/acl/ovn: Updates OVNPortGroupDeleteIfUnused to delete unused per-ACL-per-network port groups
  • lxd/network/acl/driver/common: Updates to use NetworkUsage and pass list of networks using ACL to OVNEnsureACLs
  • lxd/network/driver/ovn: Updates OVN driver to use helper functions from ACL package rather than duplicate logic
  • lxd/network/driver/ovn: Create internal port group for instance NICs on setup
  • lxd/network/driver/ovn: acl.OVNEnsureACLs and client.PortGroupMemberChange usage
  • lxd/network/driver/ovn: client.PortGroupAdd usage in setup
  • lxd/network/acl/driver/common: Adds support for default.logged and default.action ACL config properties
  • doc/network/acls: Documents default.logged and default.action ACL config properties
  • lxd/network/acl/acl/ovn: Adds support for default.logged and default.action
  • lxd/network/acl/driver/common: Adds reject support
  • lxd/network/acl/acl/ovn: Allow IPv4 IGMP and IPv6 MLD reports in network baseline rules
  • lxd/network/acl/acl/ovn: Add network baseline rules to allow reject packets from ACL reject rules
  • lxc/remote: Update working to line up with project
  • i18n: Update translation template
  • lxd/profiles: Add to swagger
  • shared/api: Label Profiles structs
  • lxd/projects: Add to swagger
  • shared/api: Label Projects structs
  • lxd/events: Add to swagger
  • shared/api: Label Events structs
  • lxd/networks: Add to swagger
  • shared/api: Label Networks structs
  • shared/api: Hide API extensions from swagger
  • doc/rest-api: Refresh swagger YAML
  • lxd/device/gpu: Optimize setupSriovParent
  • lxd/device: Save parent PCI address for GPU SR-IOV
  • lxd/network/network/utils/sriov: Refactors SRIOVFindFreeVirtualFunction and sriovGetFreeVFInterface
  • lxd/network/network/utils/sriov: Modifies sriovGetFreeVFInterface to check a VF is down and has no IPs before considering it available
  • shared/validate/validate: Adds IsInterfaceName function
  • lxd/network/network/utils: Removes validInterfaceName function
  • lxd/network/driver: validate.IsInterfaceName usage
  • lxd/device/nic: Validate that NIC name property is valid interface name
  • lxd/device/nic: Adds nicCheckNamesUnique function
  • lxd/device/nic: Updates nicValidationRules to accept a instance.ConfigReader argument and use nicCheckNamesUnique
  • lxd/device: nicValidationRules usage
  • lxd/device: Return -1 if all VFs are in use
  • lxd/device: Support multiple GPUs for SR-IOV
  • shared/api/cluster: Architecture is a read-only field
  • lxd/network_acls: Add to swagger
  • shared/api: Label Network ACLs structs
  • lxd/cluster: Add to swagger
  • shared/api: Label Cluster structs
  • doc/rest-api: Refresh swagger YAML
  • lxd/network/network/utils/sriov: Don't fail when missing vfListPath in sriovGetFreeVFInterface
  • shared/util: Add GetStableRandomInt64FromList
  • lxd/db/images: Add AutoUpdate filter
  • lxd/vsock: Better handle errors
  • lxd/db/images: Add helper functions
  • docs: typo on JSON schema
  • lxd/vsock: Retry timeouts once
  • lxd/db: Set nodes.id to auto-increment
  • lxd/images: Fix auto image updates
  • lxd: Add internal endpoints for updates
  • test/suites: Test image refresh in cluster
  • i18n: Update translations from weblate
  • lxd/images: Properly spread replicated images
  • lxd/project: Add CheckClusterTargetRestriocion
  • lxd/projects: Add restricted.cluster.target
  • lxd: Support for restricted.cluster.target
  • api: projects_restricted_cluster_target
  • doc/projects: Add restricted.cluster.target

Try it for yourself

This new LXD release is already available for you to try on our demo service.

Downloads

The release tarballs can be found on our download page.

Binary builds are also available for:

  • Linux: snap install lxd
  • MacOS: brew install lxc
  • Windows: choco install lxc

LXD 4.11 has been released

5th of February 2021

Introduction

The LXD team is very excited to announce the release of LXD 4.11!

This is quite a featureful release, adding a number of new API features, networking configuration and new devices for use with virtual machines.

Enjoy!

New features and highlights

Bulk instance state change API

A new API was added as PUT /1.0/instances which allows updating the state of all instances in the targeted project.

At its simplest, pushing:

{
    "state": {
        "action": "restart"
    }
}

Will cause LXD to restart all instances in the project in parallel.

This is now automatically used with lxc start/stop/restart/pause when the --all flag is passed rather than having the command line utility itself perform the bulk operations.

GVRP support for dynamic vlan configuration

A new gvrp property has been added to physical, macvlan, ipvlan and routed networking. When enabled, it will instruct Linux to advertise the VLAN configuration on the parent port, allowing for a suitably configured switch to update its VLAN table and port membership accordingly.

Server-side instance storage pool migration

A new pool field was added to the migration API at POST /1.0/instances/NAME. This allows for completely server-side migration of an instance between storage pools.

In the past, a temporary copy+delete operation from the client was needed to achieve the same result.

This is now also integrated with lxc move NAME --storage TARGET which will automatically use the new API on recent LXD servers.

Volume usage API

A new API at GET /1.0/storage-pools/POOL/volumes/TYPE/VOLUME/state was added to get the current disk usage information for the volume.

LXD has had that information for a long time but until now, it was only accessible when a volume was attached to an instance by accessing that instance's state information.

A new lxc storage volume info command was added to query that API. Additionally, lxc storage volume list was extended to support customizable columns and a new optional column was added for the volume size (as that can be an expensive API call on some storage drivers).

The result looks like this:

stgraber@castiana:~$ lxc storage volume list default -ctncuU
+-----------------+------------------------------------------------------------------+--------------+---------+----------+
|      TYPE       |                               NAME                               | CONTENT-TYPE | USED BY |  USAGE   |
+-----------------+------------------------------------------------------------------+--------------+---------+----------+
| container       | lxd-build                                                        | filesystem   | 1       | 2.67GB   |
+-----------------+------------------------------------------------------------------+--------------+---------+----------+
| container       | lxd-build-focal                                                  | filesystem   | 1       | 1.32GB   |
+-----------------+------------------------------------------------------------------+--------------+---------+----------+
| container       | metrics                                                          | filesystem   | 1       | 709.67MB |
+-----------------+------------------------------------------------------------------+--------------+---------+----------+
| container       | snapcraft-lxd                                                    | filesystem   | 1       | 6.61GB   |
+-----------------+------------------------------------------------------------------+--------------+---------+----------+
| container       | snapcraft-lxd-bgp                                                | filesystem   | 1       | 1.49GB   |
+-----------------+------------------------------------------------------------------+--------------+---------+----------+
| container       | steam                                                            | filesystem   | 1       | 11.13GB  |
+-----------------+------------------------------------------------------------------+--------------+---------+----------+
| custom          | backups                                                          | filesystem   | 1       | 98.30kB  |
+-----------------+------------------------------------------------------------------+--------------+---------+----------+
| custom          | images                                                           | filesystem   | 1       | 5.83GB   |
+-----------------+------------------------------------------------------------------+--------------+---------+----------+
| image           | b31b2d483586fd143e4081b292179330235d081e923db39f7f864db2e1f4045d | block        | 1       |          |
+-----------------+------------------------------------------------------------------+--------------+---------+----------+
| image           | bb0c2a5d24b424943154f0a16d909a84a394378c567f950159b2d58f06960cbe | block        | 1       |          |
+-----------------+------------------------------------------------------------------+--------------+---------+----------+
| virtual-machine | cgroup2                                                          | block        | 1       | 2.96GB   |
+-----------------+------------------------------------------------------------------+--------------+---------+----------+
| virtual-machine | ubuntu-desktop                                                   | block        | 1       | 2.40GB   |
+-----------------+------------------------------------------------------------------+--------------+---------+----------+
| virtual-machine | win10                                                            | block        | 1       | 9.14GB   |
+-----------------+------------------------------------------------------------------+--------------+---------+----------+

SR-IOV GPU support (VM only)

A new gputype of sriov is now supported.

This only works with a few rare GPUs that support SR-IOV, but should you be lucky enough to have one of those with the proper host drivers, you can now do:

lxc config device add NAME my-gpu gpu gputype=sriov pci=ADDR

Using the address of the parent GPU and LXD will automatically find an unused VF and pass it to the VM as a GPU.

PCI device type (VM only)

A new pci device type is now present in LXD and allows for any PCI device to be passed into the virtual machine.

It's still preferred to use the SR-IOV mode of nic and gpu devices when dealing with those devices, but this feature now makes it possible to pass PCI storage devices, FPGAs or any other PCI device that you want.

ISO images now exposed as cdrom (VM only)

To work around some issues with installing Windows inside LXD virtual machines, we've added logic to detect ISO images and automatically attach those as cdrom to the virtual machines.

This avoids some confusion as to what the install source and target are and makes installing Windows inside LXD virtual machines extremely easy when combined with distrobuilder's recent support for Windows ISO image repacking.

Extended lxc manpage command

The lxc manpage command now supports a --format argument which then supports exporting the help pages as:

  • man (default and previous behavior)
  • md (markdown)
  • rest (REStructured Text)
  • yaml

We intend to start using the markdown output to make those help pages available on our website.

Complete changelog

Here is a complete list of all changes in this release:

  • client: Fix output of GetClusterMemberNames
  • openvswitch/ovs.go: Simplify return in Installed method
  • rbac/server.go: Sleep for seconds instead of nanoseconds
  • lxd/instance/drivers/driver/qemu: Updates SaveConfigFile to return nil
  • lxd/api/internal: Updates internalImportFromRecovery to call inst.SaveConfigFile
  • test/suites/backup: Adds test to check exec works after recovery of running container
  • cluster/raft/file_snapshot.go: defer after checking error
  • lxd/storage/drivers/driver/cephfs/volumes: Updates RenameVolume newName arg to newVolName to bring inline with other drivers
  • lxd/storage/drivers/driver/ceph/volumes: Fix UnmountVolume to actually deactivate VM block volumes
  • lxd/storage/drivers/driver/ceph/volumes: Fix RenameVolume to also rename FS volume for VM volumes
  • test/suites/container/devices/nic/bridged: Adds port isolation feature test
  • lxc/network: Adds support for attaching instance to a managed network using network property
  • test/suites/container/devices/proxy: Ensure ipv6 nat tests use a network with stateful DHCPv6 enabled
  • test/suites/network: Updates static IPv6 allocation test to actually test stateful DHCPv6
  • test/suites/container/devices/nic/bridged: Improve validation of DHCPv6 allocation
  • lxc/query: Prevent using --project
  • i18n: Update translation templates
  • lxd/utils: Compare all addresses from lookup in IsAddressCovered, lxc#8340
  • lxd/resources: Support DMI for CPU information
  • lxd/device/nic/routed: Ensure IP neighbour proxy entries are removed on stop
  • lxd/device/nic/routed: Adds duplicate address detection
  • lxd/device/disk: Validate size field properly
  • lxd/device/nic/bridged: Only attempt to release DHCP leases if bridge interface exists
  • lxd/device/nic/bridged: Improve error context prefix in networkClearLease
  • lxd/device/nic/bridged: Use %q for error quoting in networkClearLease
  • lxd/device/nic/bridged: Improve error context prefix in State
  • lxd/instance: Fix progress on ceph instance move
  • lxd/storage/backend/lxd: Use volume config in UpdateInstanceBackupFile so that volume.block.filesystem setting is used
  • lxd/storage/drivers/utils: Adds filesystem being used to TryMount error
  • lxd: Smarter handling of volatile keys in projects
  • lxd/project: Strip volatile on copy/migrate
  • tests: Update project restrictions test
  • lxd/instance/drivers/driver/lxc: Copy parent volume config to snapshot volume config in lxcCreate
  • lxd/instance/drivers/driver/qemu: Copy parent volume config to snapshot volume config in qemuCreate
  • lxd/instance/drivers/driver/lxc: Umount instance after CRIU state path check in Restore
  • lxd/instance/drivers/driver/lxc: Avoid duplicated call to UpdateBackupFile in Restore
  • lxd/instance/drivers/driver/lxc: Log instance restarting after snapshot restore
  • lxd/instance/drivers/driver/lxc: Always run UpdateBackupFile in Update
  • lxd/instance/drivers/driver/qemu: Removes unnecessary call to UnmountInstance in Restore
  • lxd/instance/drivers/driver/qemu: Remove unnecessary call to UpdateBackupFile
  • lxd/instance/drivers/driver/qemu: Log instance restarting after snapshot restore
  • doc/rest-api: Fix typo
  • doc/rest-api: Fix missing escaping
  • lxd/instance: Tweak error and resource links
  • api: Adds support for bulk instance state change.
  • shared/api: Adds support for bulk instance state change.
  • doc: Adds doc for bulk instance state change endpoint.
  • lxd: Adds support for bulk instance state change.
  • client: Adds support for bulk instance state change.
  • lxc: Adds support for bulk instance state change.
  • lxd: Process bulk action in parallel
  • test/suites/snapshots: Adds snapshot block.filesystem config check for LVM & Ceph
  • lxd/instances: Reduce code duplication
  • shared/api: Change mass update API
  • lxc/action: Update to new InstancesPut
  • lxd/instances: Update to new bulk API
  • doc/rest-api: Update for new bulk API
  • client: Re-order functions
  • lxd: Rename container functions
  • lxd/instance_state: Simplify
  • lxd/instance: Refactor state handling
  • lxd/instances_state: Simplify logic
  • lxd/instance/drivers: Move ephemeral restart logic
  • lxd/vm: Expose ISO images as SCSI cdroms
  • lxd/storage: Cleanup CreateInstanceFromCopy
  • lxd/storage/utils: Updates VolumeDBCreate to accept volume and content type typed arguments
  • lxd/storage/backend/lxd: Error quoting and wrapping
  • lxd/storage/backend/lxd: Expand argument type in updateVolumeDescriptionOnly
  • lxd/storage/backend/lxd: VolumeDBCreate updated usage
  • api: Adds network_gvrp extension
  • doc: Adds gvrp option for selected networks and instance NICs
  • lxd/network/network/utils: Adds GVRP support to VLANInterfaceCreate
  • lxd/network: Adds GVRP support to macvlan and physical networks
  • lxd/device/device/utils/network: Adds GVRP support to networkCreateVlanDeviceIfNeeded
  • lxd/device/nic: Adds GVRP support to ipvlan, macvlan, physical and routed NICs
  • lxd/network: Add check for overlapping ovn.ranges and dhcp.ranges
  • lxd/db/instances: Improve error message from CreateInstanceConfig
  • lxd/instance/drivers/driver/common: Adds insertConfigkey function
  • lxd/instance/drivers/driver/lxc: Updates FillNetworkDevice to use d.insertConfigkey
  • lxd/instance/drivers/driver/qemu: Updates FillNetworkDevice to use d.insertConfigkey
  • lxc/instance/drivers/driver/common: Removes empty value check from insertConfigkey
  • lxd/instance/drivers: Detect failed volatile key generation
  • lxd/instance/drivers/driver/lxc: Fix volatile config key scoping issue in FillNetworkDevice
  • lxd/network/driver/bridge: Only validate non-overlapping DHCPv6 ranges with OVN ranges when stateful DHPCv6 being used
  • lxd/instance/drivers/driver/common: Prevent existing row check from wiping out desired key value in insertConfigkey
  • lxd/instance/drivers: More checks and error contexts in FillNetworkDevice
  • lxd/instance/drivers/driver/qemu: Error alignment with container driver in Rename
  • lxd/storage/utils: Improves error in VolumeDBCreate
  • lxd/db/storage/volumes: Populates ProjectName field in GetLocalStoragePoolVolumeSnapshotsWithType
  • lxd/instance/drivers/driver/lxc: Error context in Rename
  • lxd/instances/post: Unwraps long error and using double quotes placeholder
  • lxd/instance/instance/interface: Adds TemplateTrigger type and constants for template trigger types
  • lxd/instance: Adds instanceCreateAsCopyOpts argument for instanceCreateAsCopy options
  • lxd/instances/post: instanceCreateAsCopy updated usage
  • lxd/instance/instance/interface: Updates DeferTemplateApply to accept TemplateTrigger type argument
  • lxd/instance/drivers/driver/common: Updates DeferTemplateApply to accept a TemplateTrigger type argument
  • lxd/storage/backend: inst.DeferTemplateApply usage
  • lxd/instances/post: inst.DeferTemplateApply usage
  • lxd/instance/drivers/driver/lxc: Updates templateApplyNow to accept a TemplateTrigger argument
  • lxd/instance/drivers/driver/lxc: d.templateApplyNow usage
  • lxd/instance/drivers/driver/qemu: Updates templateApplyNow to accept a TriggerTemplate type argument
  • lxd/instance/drivers/driver/qemu: d.templateApplyNow usage
  • lxd/instance/instance/interface: Adds applyTemplateTrigger argument to Rename
  • lxd/instance/drivers/driver/lxc: Adds applyTemplateTrigger argument to Rename
  • lxd/instance/drivers/driver/qemu: Adds applyTemplateTrigger argument to Rename
  • lxd/instance/post: inst.Rename usage
  • lxd/instance/snapshot: sc.Rename usage
  • lxd/storage/backend/lxd: Removes call to deferred template apply in RenameInstance
  • lxd/instance/test: c.Rename usage
  • shared/api: Add Pool field to InstancePost
  • api: instance_pool_move extension
  • lxc/move: Support server-side pool migration
  • client: Add extension check for pool migration
  • lxd/instance: Implement pool migration API with instancePostPoolMigration
  • test: Add tests for volatile.apply_template config during create, copy and move
  • test: Adds check for volatile.apply_template state after rename
  • i18n: Update translation templates
  • test: Add test for moving instance between pools without renaming
  • lxd/images: Skip keys with empty values
  • lxd/instances_put: Limit to local server
  • lxd/device: Fix instance type validations
  • shared/instance: Adds ErrNoRootDisk error var and returns it from GetRootDiskDevice
  • lxd/instance: Enforces that target instance should have valid root disk config after DB create in instanceCreateAsCopy
  • lxd/instance: Don't assume root disk is called "root" when copying snapshots from a source instance
  • lxd/db/query/retry: Adds detection of checkpoint in progress to IsRetriableError
  • lxd/instances_put: Properly handle clusters
  • lxd/instance/drivers/driver_qemu: attempt to kill qemu proc on stop
  • lxd/instance/driver_qemu: Add check for qemu cmdline args to pid()
  • forkproxy: prevent zombies
  • lxd: Change some references of container to instance in comments
  • lxd/instance/post: Change error message to instance from container in instancePost
  • lxd/main/forkdns: Returns empty AAAA record response when equivalent A record exists
  • lxd/main/forkdns: Fixes typo in comment
  • test: Adds test for empty AAAA response when equivalent A record exist in clustering forkdns
  • lxd/device/pci: Consider DeviceUnbind successful on missing driver
  • shared/validate: Validate PCI addresses
  • lxd/device/gpu: Validate PCI addresses
  • lxd/device: Add function to validate PCI path
  • lxd/device: Add support for GPU SR-IOV
  • api: gpu_sriov extension
  • doc: Add SR-IOV GPU
  • lxd/device/gpu_mdev: Valdiate PCI address and path
  • lxd/device/gpu_physical: Validate PCI address and path
  • lxd/instance/qemu: Cleanup VGA ROM check
  • lxd/network/driver/bridge: Update DHCPv4Subnet to return fan bridge address subnet when in fan mode
  • lxd/device/nic/bridge: Updates validateConfig to use parent networks DHCP subnet functions when validating address
  • shared/termios: Fix static builds
  • shared/idmap: Fix shared/ build on non-cgo
  • shared/instancewriter/: Fix shared/ build on non-cgo
  • shared/eagain: Restrict to Linux
  • shared/subprocess: Restrict to unix
  • lxd/db/generate: Move DB generator
  • github: Replace Travis and Appveyor with Actions
  • lxc/manpage: Add markdown, reST and YAML output
  • i18n: Update translation templates
  • lxd/device/gpu: Skip nvidia directories
  • api: pci_device_type extension
  • doc/instance: Add pci device type
  • lxd/device: Free up the pci name
  • lxd/device: Support for both pci= and address= in checker
  • lxd/device/config: Add PCIDevice
  • lxd/device/pci: Add NormaliseAddress
  • lxd/device: Have validatePCIDevice take an address
  • lxd/device: Add PCI device type
  • lxd/instance/qemu: Rename qemuNetDevPhysical to qemuPCIPhysical
  • lxd/instance/qemu: Add PCI device support
  • cgroup: fix cgroup2 device driver settings
  • doc/instances: Tweaks to make device type linking work
  • doc/storage: Add mention of zfs.remove_snapshots
  • simplestreams: Review and sanitize urls join
  • lxd/storage/volume: Snapshot PUT is supposed to be blocking
  • lxd/storage: Fix snapshot edit routes
  • lxc/storage_volume: Use correct API for snapshots
  • lxd/storage: Cleanup volume API endpoints
  • lxd/instance/metadata: Fix API to line up with files
  • client: Drop UpdateInstanceTemplateFile
  • client: Drop UpdateInstanceTemplateFile
  • client: Fix legacy UpdateContainerTemplateFile
  • client: Rename SetInstanceMetadata to UpdateInstanceMetadata
  • lxc/config: Switch to UpdateInstanceMetadata
  • lxc/config: Always use CreateInstanceTemplateFile
  • lxd/instance/metadata: Modernize instanceMetadataPut
  • lxd/instance/metadata: Implement PATCH
  • lxd/instance/snapshots: Implement PATCH
  • lxd/storage: Tweak volume snapshot etag
  • lxd/storage/volume/snapshot: Implement PATCH
  • api: storage_volume_state extension
  • shared/api: Add StorageVolumeState
  • client: Add GetStoragePoolVolumeState
  • lxd/storage: Add storagePoolVolumeTypeStateGet
  • doc/rest-api: Add storage volume state API
  • lxc/storage_volume: Add support for column argument
  • lxc/storage_volume: Add usage column
  • lxc/storage_volume: Add info subcommand
  • i18n: Update translation templates
  • lxd/instance/qemu: Don't use the RAM backend
  • lxd/db/images: Include remote storage pools in GetPoolsWithImage
  • lxd/db: Export function IsRemoteStorage
  • lxd/resources: More flexible PCI handling
  • lxd/resources: Make usb address handling match PCI
  • lxd/resources: Use %q when possible
  • lxd/images: Remove images backed by remote storage
  • i18n: Update translations from weblate

Try it for yourself

This new LXD release is already available for you to try on our demo service.

Downloads

The release tarballs can be found on our download page.

Binary builds are also available for:

  • Linux: snap install lxd
  • MacOS: brew install lxc
  • Windows: choco install lxc

LXD 4.0.5 LTS has been released

2nd of February 2021

Introduction

The LXD team is pleased to announce the release of LXD 4.0.5!

This is the fifth bugfix release for LXD 4.0 which is supported until June 2025.

Bugfixes and improvements

This release includes a couple of months worth of bugfixes and minor improvements from the development branch.

Some of the highlights include:

  • Support for mediated device passthrough of GPUs
  • Support for SR-IOV passthrough of GPUs
  • Addition of IOMMU details to the resources API
  • Addition of USB address for network devices in the resources API
  • Addition of PCI and USB address for disk devices in the resources API
  • Addition of VLAN details to the network state API
  • Support for memory and CPU usage colums in lxc list
  • Support for --reuse in lxc snapshot
  • Support for --reuse in lxc storage volume snapshot

The full list of commits is available below:

  • extract restart logic to new instance interface function of lxc and qemu
  • scripts/bash: Fix snap handling
  • extract common restart code to driver_common.go
  • lxd/storage: Rename RunningSnapshotFreeze to RunningCopyFreeze
  • lxd/storage: Ensure source is frozen during copy
  • lxd/instance/drivers: Write out updated backup.yaml after rename
  • lxd: Switch to new candid URL
  • lxd/storage/zfs: No need to remove dashes from UUID
  • shared: Drop GroupId and UserId
  • lxd: Port to os/user
  • lxd/daemon: Log protocol
  • lxd/daemon: Pass writer to Authenticate
  • lxd/daemon: Record username on unix queries
  • lxd/storage: Lock during the whole image replace
  • lxd/db/errors: Adds ErrNoClusterMember var used to indicate no cluster member has been found for a resource
  • lxd/db/storage/volumes: Modifies GetStorageVolumeNodeAddresses to detect volumes that are not bound to a single node
  • lxd/db/storage/volumes: Removes StorageVolumeIsAvailable
  • lxd/response: Updates forwardedResponseIfVolumeIsRemote to accept poolName rather than poolID
  • lxd/storage/volumes: forwardedResponseIfVolumeIsRemote usage
  • lxd/storage/volumes/snapshot: forwardedResponseIfVolumeIsRemote usage
  • lxd/project/project: Adds StorageVolumeProjectFromRecord function
  • lxd/db/instances: Renames and reworks instanceListExpanded to InstanceList
  • lxd/db/instances/export/test: Removes unused file
  • lxd/db/instances/test: Renames TestInstanceListExpanded to TestInstanceList
  • lxd/patches: driver.VolumeTypeNameToDBType usage
  • lxd/profiles/utils: Comment on doProfileUpdateContainer for clarity
  • lxd/response: cluster.ConnectIfVolumeIsRemote usage
  • lxd/storage/drivers/driver/types: Adds VolumeMultiNode field to Info
  • lxd/storage/drivers/driver/cephfs: Adds VolumeMultiNode=true to Info struct
  • lxd/storage/utils: Renames VolumeTypeNameToType to VolumeTypeNameToDBType
  • lxd/storage/utils: Adds VolumeDBTypeToTypeName function
  • lxd/storage/utils: Comment consistency
  • lxd/storage/utils: Renames and reworks VolumeUsedByRunningInstancesWithProfilesGet to VolumeUsedByInstances
  • lxd/storage/utils: Adds VolumeUsedByExclusiveRemoteInstancesWithProfiles function
  • lxd/cluster/connect: Reworks ConnectIfVolumeIsRemote to use storagePools.VolumeUsedByExclusiveRemoteInstancesWithProfiles
  • lxd/storage/volumes: storagePools.VolumeTypeNameToDBType usage
  • lxd/storage/volumes: Updates storagePoolVolumeTypePost to use updated storagePools.VolumeUsedByInstances
  • lxd/storage/backend/lxd: Updates RestoreCustomVolume with VolumeUsedByInstances
  • lxd/storage/utils: Removes VolumeUsedByInstancesGet function as not properly project compliant
  • lxd/storage/volumes/utils: Replaces storagePools.VolumeUsedByInstancesGet usage with storagePools.VolumeUsedByInstances in storagePoolVolumeUsedByGet
  • lxd/device/disk: Replace storagePools.VolumeUsedByInstancesGet usage with storagePools.VolumeUsedByInstances in storagePoolVolumeAttachShift
  • lxd/endpoints: Update error string in test
  • shared/simplestreams: Record variant
  • shared/simplestreams: Fix sorting of images
  • lxd/project/project: Updates StorageVolumeProjectFromRecord to not return error (as never populated)
  • lxd/storage/utils: project.StorageVolumeProjectFromRecord usage
  • lxd/instance/qmp: Merge Go routines
  • shared/cancel: Close chDone on failure
  • lxd: Only close doneCh on success
  • exec: make sure to only use TIOCGPTPEER if available
  • lxd/instance/drivers: Change memory backend
  • lxd/instance/drivers: Add virtio-fs config drive template
  • lxd/instance/drivers: Handle virtio-fs config drive
  • lxd/instance/drivers: Add system unit file for virtio-fs config drive
  • lxd/device/disk: Support virtio-fs
  • lxd/device/disk: Handle alternative virtfs-proxy-helper location
  • lxd-agent: Prefer virtio-fs over 9p
  • lxd: Replace use of tx.GetProject with cluster.GetProject
  • lxd/storage: VolumeTypeNameToDBType usage
  • lxd/device/disk: storagePools.VolumeUsedByExclusiveRemoteInstancesWithProfiles usage
  • lxd/storage/backend/lxd: Updates UpdateCustomVolume to check for online resize support when resizing
  • lxd/db/storage/volumes: Adds workaround for old remote volume schema in GetStorageVolumeNodeAddresses
  • lxd/instances: Fix virtiofsd for config drive
  • lxd/instance/drivers: Issue warning if virtiofsd is missing
  • lxd/device: Issue warning if virtiofsd is missing
  • lxd/instance/drivers: Fix lxd-agent systemd unit conditions
  • lxd/storage: Only freeze if not frozen
  • lxd/device/sriov: Harden calls to ip link vf
  • lxd/storage/zfs: Add support for clone_copy rebase
  • lxd/qmp: Ensure checkbuffer is called
  • lxd/virtiofs: Fix handling of config drive
  • lxd/storage/lvm: Properly make lvm.thinpool_name node-specific
  • lxd/instance/drivers/driver/qemu: Call MountInstanceSnapshot when mounting vm snapshots
  • lxd/instance/drivers/driver/qemu: Ensure consistent mount state when restoring snapshot irrespective of whether instance was running
  • lxd/instance/drivers/driver/lxc: Ensure consistent mount state when restoring snapshot irrespective of whether instance was running
  • lxd/storage/drivers/volume: Comment clarification
  • lxd/storage/drivers/driver/zfs/volumes: Only resurrect deleted image volume if same size in CreateVolume
  • lxd/storage/drivers/driver/zfs/volumes: Improved logging
  • lxd/storage/drivers/driver/zfs/volumes: Return ErrNotSupported in SetVolumeQuota when trying to resize an image block volume
  • lxd/storage/drivers/driver/ceph/volumes: Only resurrect deleted image volume if same size in CreateVolume
  • lxd/storage/drivers/driver/ceph/volumes: Improves logging in CreateVolume
  • lxd/storage/drivers/driver/ceph/volumes: Don't allow image volume size in SetVolumeQuota
  • lxd/storage/backend/lxd: Adds size to logging in SetInstanceQuota
  • lxd/storage/backend/lxd: Update EnsureImage to resize/regenerate optimized image volumes if existing volume is different size than pool's volume.size setting
  • lxd/storage/backend/lxd: Updates CreateInstanceFromImage to detect ErrCannotBeShrunk and create one-off non-optimized volume for instance
  • lxd/storage/drivers/driver/ceph/utils: Updates getRBDMappedDevPath to allow control of mapping
  • lxd/storage/drivers/driver/ceph/utils: d.rbdUnmapVolumeSnapshot on one line
  • lxd/storage/drivers/driver/ceph/volumes: d.getRBDMappedDevPath usage
  • lxd/storage/utils: Makes InstanceDiskBlockSize snapshot aware
  • lxd/storage/drivers/driver/ceph/volumes: Removes extraneous comment
  • lxd/storage/drivers/driver/ceph/volumes: Activate volume before genericVFSMigrateVolume in MigrateVolume
  • lxd/storage/pool/interface: Adds MountInfo struct
  • lxd/storage/pool/interface: Return MountInfo from MountInstance and MountInstanceSnapshot
  • lxd/storage/backend/lxd: Populate MountInfo with OurMount and DiskPath in MountInstance
  • lxd/storage/backend/lxd: Unexports getInstanceDisk
  • lxd/storage/backend/lxd: Populates OurMount and DiskPath in MountInstanceSnapshot
  • lxd/storage/utils: Updates InstanceDiskBlockSize to use MountInfo
  • lxd/storage/backend/mock: Interface changes
  • lxd/instance: Updates instanceCreateAsSnapshot to use MountInfo
  • lxd/patches: Updates to use MountInfo
  • lxd/instance/drivers/driver/lxc: Updates mount to return MountInfo and usage
  • lxd/instance/drivers/driver/qemu: Updates mount to return MountInfo and usage
  • lxd/storage/drivers/generic/vfs: Adds genericVolumeDiskFile constant for excluding generic disk block files
  • lxd/storage/drivers/generic/vfs: Avoid using d.GetVolumeDiskPath in genericVFSMigrateVolume
  • lxd/storage/drivers/generic/vfs: Use genericVolumeDiskFile in genericVFSGetVolumeDiskPath
  • lxd/storage/drivers/driver/ceph/utils: Add logging to rbdMapVolume and rbdUnmapVolume
  • lxd/storage/drivers/driver/ceph/utils: Updates getRBDMappedDevPath to support snapshots
  • lxd/storage/drivers/driver/ceph/volumes: Updates MountVolume to return ourMount for block volumes
  • lxd/storage/drivers/driver/ceph/volumes: Updates UnmountVolumeSnapshot to handle block volumes
  • lxd/storage/drivers/driver/ceph/volumes: Renames RBDDevPath to devPath
  • lxd/storage/utils: Improves logging and uses size value from vol.ConfigSizeFromSource in ImageUnpack
  • lxd/storage/backend/lxd: Improves logging in CreateInstanceFromImage
  • lxd/storage/backend/lxd: Improves logging and uses imgVol.ConfigSizeFromSource in EnsureImage
  • doc/instances: Rephrase limits.memory.swap
  • doc/instances: Typo fix
  • lxd/storage: Use same defaults as "lxd init"
  • lxd/instance/drivers/driver/qemu: Converts all supplied memory byte values to mebibytes for comparison
  • lxd/rbac: Fix URL encoding
  • lxd/cgroup: Fix V2 detection/handling
  • lxd/cgroup: Add file read/writer
  • lxd/cgroup: Fix controller detection
  • lxd/cgroup: Add cpuset functions
  • lxd/cgroup: Fix warning wording
  • lxd/devices: Drop old workaround
  • lxd/devices: Port to cgroup package
  • lxd/instance: Replace CGroupGet/CGroupSet
  • lxd/devices: Update to use cgroup abstraction
  • lxd/cgroup: Implement proper typing
  • lxd/cgroup: Change ParseCPU to return int64
  • lxd/instance/lxc: Update for cgroup function changes
  • lxd/cgroup: Improve naming
  • lxd/instance: Update for new naming
  • lxd/cgroup: Add V2 for GetBlkioWeight and SetBlkioWeight
  • lxd/device: Move disk priority back to lxc
  • lxd/cgroup: Fix get blkio weight
  • lxd/cgroup: Add abstraction for SetBlkioLimit
  • lxd/device: Port disk limits to abstraction
  • lxd/db/storage/volumes: Renames GetStorageVolumeNodeAddresses to GetStorageVolumeNodes
  • lxd/cluster/connect: Updates ConnectIfVolumeIsRemote to use tx.GetStorageVolumeNodes
  • lxd/db/storage/volumes/test: Updates test for TestGetStorageVolumeNodes
  • lxd/storage/utils: Updates VolumeUsedByInstances to accept an api.StorageVolume arg
  • lxd/storage/utils: Updates VolumeUsedByExclusiveRemoteInstancesWithProfiles to use an api.StorageVolume arg
  • lxd/storage/volumes/utils: Updates storagePoolVolumeUsedByGet to accept an api.StorageVolume arg
  • lxd/cluster/connect: Updates ConnectIfVolumeIsRemote to use VolumeUsedByExclusiveRemoteInstancesWithProfiles with vol arg
  • lxd/device/disk: Updates validateConfig to use storagePools.VolumeUsedByExclusiveRemoteInstancesWithProfiles with vol arg
  • lxd/device/disk: Updates storagePoolVolumeAttachShift to use storagePools.VolumeUsedByInstances with vol arg
  • lxd/storage/backend/lxd: Updates UpdateCustomVolume to use VolumeUsedByInstances with vol arg
  • lxd/storage/backend/lxd: Updates RestoreCustomVolume to use VolumeUsedByInstances with vol arg
  • lxd/storage/volumes: storagePoolVolumeUsedByGet usage
  • lxd/storage/volumes: Updates storagePoolVolumeTypePost to use storagePools.VolumeUsedByInstances with a vol arg
  • lxd/storage/volumes: Use db.StoragePoolVolumeTypeName constants
  • lxd/storage/volumes: Updates storagePoolVolumeTypeGet to use storagePoolVolumeUsedByGet with a vol arg
  • lxd/storage/volumes: Updates storagePoolVolumeTypeDelete to use storagePoolVolumeUsedByGet with a vol arg
  • lxd/storage/volumes/snapshots: storagePoolVolumeUsedByGet usage
  • lxd/storage/volumes/utils: Removes storagePoolVolumeAPI constants and converter functions
  • lxd/patches: Recreates patchStoragePoolVolumeAPI constants and function for historical patches
  • lxd/storage/volumes: Simplifies volume type in URL in storagePoolVolumes routes
  • lxd/storage/volumes/snapshot: Simplifies volume type in URL generation
  • lxd/storage/volumes: Updates storagePoolVolumeTypePostRename args
  • lxd/storage/volumes: Removes unnecessary var init in storagePoolVolumeTypePostMove
  • lxd/storage/drivers/driver/ceph/volumes: Fix rbd device leak in RenameVolume
  • lxd/storage/drivers/generic/vfs: Use revert package in genericVFSRenameVolume
  • lxd/storage/utils: Adds matching of instances on same node as local volume in VolumeUsedByInstances
  • lxd/storage/volume: Removes need for loading storage volume when doing lxc storage volume attach
  • lxd/storage/utils: Renames VolumeUsedByInstanceDevices and passes usedByDevices into callback function
  • lxd/device/disk: storagePools.VolumeUsedByInstanceDevices usage
  • lxd/storage/backend/lxd: VolumeUsedByInstanceDevices usage
  • lxd/storage/utils: VolumeUsedByInstanceDevices usage
  • lxd/storage/volumes/utils: storagePools.VolumeUsedByInstanceDevices usage
  • lxd/storage/volumes: storagePools.VolumeUsedByInstanceDevices usage
  • lxd/storage/volumes: Updates storagePoolVolumeTypePost to use updated storagePoolVolumeTypePostRename and storagePoolVolumeTypePostMove
  • lxd/storage/volumes: Updates storagePoolVolumeTypePostRename to use updated storagePoolVolumeUpdateUsers
  • lxd/storage/volumes: Updates storagePoolVolumeTypePostMove to use updated storagePoolVolumeUpdateUsers
  • lxd/instance/drivers/driver/lxc: Removes common function LocalDevices implemented in LXC driver
  • lxd/db/instances: Better errors in InstanceList
  • lxd/storage/utils: Adds VolumeUsedByProfileDevices function
  • lxd/storage/utils: Removes unused volume name matching logic in VolumeUsedByInstanceDevices
  • lxd/storage/volumes/utils: Updates storagePoolVolumeUpdateUsers to use storagePools.VolumeUsedByProfileDevices and storagePools.VolumeUsedByInstanceDevices
  • lxd/storage/volumes/utils: Updates storagePoolVolumeUsedByGet to use storagePools.VolumeUsedByProfileDevices
  • lxd/storage/volumes/utils: Golint suggestions in storagePoolVolumeUsedByGet
  • lxd/cluster/connect: Removes CLI command flag in error response in ConnectIfVolumeIsRemote
  • lxd/storage: Fix building on stable-4.0
  • lxd/db/storage/pools: Adds isRemoteStorage function
  • lxd/db/storage/volumes: Updates storagePoolVolumeGetType to not populate Location when driver is remote
  • lxd/db/storage/pools/test: Initialise db.StorageRemoteDriverNames in db_test package
  • lxd/db: Removes duplicated db.StorageRemoteDriverNames init from tests
  • lxd/locking/lock: Adds UnlockFunc type and updates Lock() signature
  • lxd/storage/drivers/utils: Extends OperationLockName to take into account content type.
  • lxd/storage/drivers/volume: Adds MountLock function
  • lxd/storage/drivers/driver/lvm/utils: drivers.OperationLockName usage
  • lxd/storage/backend/lxd: drivers.OperationLockName usage
  • lxd/storage/drivers: Adds mount and unmount locking
  • lxd/storage/drivers/volume: Removes locking from MountTask and UnmountTask
  • lxd/instance/drivers/driver/lxc: Stop devices in two phases
  • lxd/device/disk: Removes workaround for ceph disks now that disks are stopped after instance is stopped
  • doc/rest-api: auth property is never set to guest
  • lxd/apparmor: Workaround socket handling
  • lxd/storage: Expand local config
  • lxd/cgroup: Fix swap limits
  • lxd/instance/lxc: Fix crash in cgroup function
  • lxc/snapshot: Add reuse option
  • lxc/storage: Add reuse option to snapshot
  • i18n: Update translation templates
  • lxd/instance: Removes instanceConfigureInternal
  • lxd/instance: Replace instanceConfigureInternal usage with update backup file which was only relevant part
  • lxd/storage/backend/lxd: Adds log to CreateInstanceFromMigration showing if migration volume size header not sent
  • lxd/cgroup: Support SetCPUShare on V2
  • lxd/cgroup: Implement SetCPUCfsLimit for V2
  • lxd/instance/lxc: Port to SetCPUCfsLimit
  • lxd/cgroup: Support CGroup V2 in ParseCPU
  • lxd-agent: Don't allow connections when rebooting
  • lxd/api/project: Reject quotes in project names
  • lxd/instance/drivers/driver/lxc: Updates initLXC to use project and instance name in callhook hook commands
  • lxd/instance/drivers/driver/lxc: Updates startCommon to quote hook command arguments
  • lxd/main/callhook: Updates cmdCallhook to support using project name and instance name in arguments
  • lxd/api/internal: Adds support for using instance name and project name in container hook routes
  • lxd/storage: Apply rename template
  • lxd/patches: Adds patchVMRenameUUIDKey patch to rename config key from volatile.vm.uuid to volatile.uuid
  • shared/validate: Adds IsUUID function
  • shared/instance: Adds volatile.uuid key to instance validation
  • shared/instance: Removes vm.uuid from instance validation in ConfigKeyChecker
  • doc/instances: Replaces volatile.vm.uuid with volatile.uuid
  • lxd/instance/drivers/driver/qemu: Updates Start to use and populate volatile.uuid instead of volatile.vm.uuid
  • lxd/instance/drivers/driver/lxc: Generate instance UUID if not set in startCommon
  • lxd/instance/drivers/driver/qemu: Makes UUID generation terminology consistent with container
  • lxc/list: Fix typo in help
  • i18n: Update translation templates
  • lxc/list: Add two new columns (memory % and CPU)
  • i18n: Update translation templates
  • doc: fix typos in instances.md
  • lxd/storage/drivers/driver/zfs/volumes: Remove workarounds for snapshot volume mounting
  • lxd/refcount: Adds ref counting package
  • lxd/storage/drivers/volume: Adds ref counting functions
  • lxd/storage/drivers/volume: Updates MountTask to use new MountVolume signature
  • lxd/storage/pool/interface: Removes OurMount from MountInfo struct
  • lxd/storage/pool/interface: Removes "our mount" bool return value from MountCustomVolume
  • lxd/storage/drivers/interface: Removes "our mount" bool return value from MountVolume
  • lxd/storage/drivers/errors: Adds ErrInUse error
  • lxd/storage/drivers/drivers/mock: Updates MountVolume signature
  • lxd/storage/drivers/utils: Error quoting in shrinkFileSystem
  • lxd/storage/drivers/driver/btrfs/volumes: Updates MountVolume signature
  • lxd/storage/drivers/driver/ceph/volumes: Adds ref counting to MountVolume and UnmountVolume
  • lxd/storage/drivers/driver/cephfs/volumes: Updates MountVolume signature
  • lxd/storage/drivers/driver/dir/volumes: Updates MountVolume signature
  • lxd/storage/drivers/driver/lvm/volumes: Adds ref counting to MountVolume and UnmountVolume
  • lxd/storage/drivers/driver/zfs/volumes: Adds ref counting to MountVolume and UnmountVolume
  • lxd/storage/drivers/generic/vfs: Updates genericVFSBackupUnpack to use new MountVolume signature
  • lxd/storage/utils: Adds InstanceMount and InstanceUnmount and updates InstanceDiskBlockSize to use them
  • lxd/storage/backend/mock: Removes OurMount
  • lxd/storage/backend/mock: Removes "our mount" bool return value from MountCustomVolume
  • lxd/storage/backend/lxd: Updates mount functions to remove OurMount and use new MountVolume signature
  • lxd/storage/backend/lxd/patches: b.driver.MountVolume usage
  • lxd/instance/drivers/driver: Unexports common restart function
  • lxd/instance/instance/interface: Removes deprecated StorageStart and StorageStop functions
  • lxd/instance/drivers/driver/common: Import ordering
  • lxd/instance/drivers/driver/lxc: Updates mount usage with ref counting in mind
  • lxd/instance/drivers/driver/lxc: Removes deprecated StorageStart and StorageStop
  • lxd/instance/drivers/driver/qemu: Updates mount usage with ref counting in mind
  • lxd/instance/drivers/driver/qemu: Implements RegisterDevices
  • lxd/instance/drivers/driver/qemu: Removes deprecated StorageStart and StorageStop
  • lxd/patches: Updates instance mount usage
  • lxd/instance/metadata: Removes use of c.StorageStart and c.StorageStop
  • lxd/instance/test: Removes use of StorageStart
  • lxd/instance: Updates instanceCreateAsSnapshot to use updated mount functions
  • lxd/devices: Register devices on all instance types
  • lxd/device/disk: Implements Register function
  • lxd/device/disk: Updates mount function usage in mountPoolVolume
  • lxd/instance/drivers/driver/qemu: mount fixes
  • lxd/storage/backend/lxd: Adds revert to MountInstance
  • lxd/storage/drivers/driver/ceph/volumes: Adds revert to MountVolume
  • lxd/storage/drivers/driver/lvm/volumes: Adds revert to MountVolume
  • lxd/storage/drivers/driver/zfs/volumes: Adds revert to CreateVolumeFromBackup
  • lxd/storage/drivers/driver/zfs/volumes: Adds revert to MountVolume
  • lxd/storage/drivers/driver/zfs/volumes: Simplifies MountVolumeSnapshot and adds revert for parent volume mount
  • lxd/storage/drivers/generic/vfs: Adds revert to genericVFSBackupUnpack
  • lxd/api/internal: Adds internalImportFromRecovery function for instance recovery import
  • lxd/instances/post: Updates createFromBackup to use updated internalImport signature
  • lxd/device/disk comments
  • test/suites/backup: Updates lxd import tests to expect instance to be unmounted after import
  • lxd/instance/drivers/driver/lxc: Moves instance mount before idmap related var loading
  • lxd/instance/drivers/driver/lxc: Rotate log file same stage as VM for consistency
  • lxd/instance/drivers/driver/qemu: Use instance.LoadByProjectAndName in getMonitorEventHandler
  • test: Updates container_import tests to remove lxd import followed by kill and start test
  • lxd/storage/backend/lxd: Detect unsupported live copy of VMs and fail with clear message
  • lxd/instance/lxc: Add extra check for devpts_fd
  • lxd/device/nic/bridged: Clarifies when device's Add function is called
  • lxd/migrate/instance: Improves comments when instantiating migration.VolumeTargetArgs
  • lxd/storage/backend/lxd: Improves comments when instantiating migration.VolumeTargetArgs
  • lxd/storage/backend/lxd: Reject custom volume config if supplied in CreateInstanceFromMigration
  • lxd/storage/drivers/driver/zfs/volumes: Use srcVol.NewVMBlockFilesystemVolume in CreateVolumeFromCopy
  • lxd/storage/drivers/driver/zfs/volumes: Apply filesystem quota in CreateVolumeFromMigration
  • lxd/storage/drivers/driver/btrfs/volumes: Apply quota in CreateVolumeFromMigration
  • lxd/storage/drivers/driver: Makes size update consistent with other drivers in UpdateVolume
  • lxd/storage/drivers/driver/cephfs/volumes: Use vol.ConfigSize() rather than vol.ExpandedConfig("size") for consistency with other drivers
  • lxd/storage/drivers/driver/cephfs/volumes: Makes CreateVolumeFromMigration volume quota setting consistent with other non-block-backed drivers
  • lxd/ap/internal: Improved error messages from instanceCreateInternal
  • lxd/instance: Improved error messages from instanceCreateInternal
  • lxd/instances/post: Improved error messages from instanceCreateInternal
  • lxd/migrate/instance: Improved error messages from instanceCreateInternal
  • lxd/device/disk: Only validate external disk source paths when real instance is loaded
  • lxd/instance/drivers/driver/lxc: Remove user facing reference to "common start logic" in error
  • lxd/instance/drivers/driver: Just log device add failures when adding device in non-user requested context
  • lxd/instance/drivers/driver/lxc: Pass existing isRunning to c.updateDevices to avoid extra call to IsRunning()
  • lxd/storage: Fix build on 4.0
  • shared: Allow volatile uuid config keys
  • lxd/instance/drivers: Support vgpu in qemu template
  • lxd/instance/drivers: Support vgpu in VMs
  • lxd/device/nic/sriov: Don't fail when resetting VF MAC to 00:00:00:00:00:00
  • lxd/device/config: Allow gputype property
  • lxd/device: Support mdev GPUs
  • doc: Document mdev config key
  • api: Add gpu_mdev
  • lxc/info: Show mdev profiles
  • po: Update translation
  • lxd/images: Replace fp with fingerprint in logs
  • lxd/daemon/images: Add contextual logging and use "fingerprint" rather than "image" for consistency with other code areas
  • lxd/profiles/utils: Remove container references, improve comments
  • lxd/db/profiles: Updates GetInstancesWithProfile to return all instance types, not just containers
  • shared/instance: Improves comments
  • lxd/profiles: Use project.ProfileProject instead of tx.ProjectHasProfiles
  • test/suites/projects: Fix bug in test that assumed project wasnt checked for existance
  • lxd/profiles/utils: Updates doProfileUpdate and doProfileUpdateCluster to return project and instance name in error
  • lxd/device/device/interface: Moves updatable fields from CanHotPlug() into UpdatableFields()
  • lxd/device/errors: Adds ErrCannotUpdate error
  • lxd/device/device/common: Updates common implementation of CanHotPlug() and UpdatableFields()
  • lxd/device/disk: Adds UpdatableFields function based on instance type
  • lxd/device/disk: Only apply running IO limits to containers in Update
  • lxd/device/nic/bridged: Adds UpdatableFields function and removes custom CanHotPlug function
  • lxd/device/nic/ipvlan: Updates CanHotPlug function
  • lxd/device/nic/p2p: Removes custom CanHotPlug function and adds UpdatableFields function
  • lxd/device/nic/routed: Splits CanHotPlug function into new CanHotPlug and UpdatableFields functions
  • lxd/instance/drivers/driver/lxc: Updates device management functions to use new CanHotPlug and UpdatableFields functions
  • lxd/instance/drivers/driver/qemu: Updates device management functions to use new CanHotPlug and UpdatableFields functions
  • lxd/device/config/devices/sort: Improves comments in Less
  • lxd/device/disk: Removes use of global logger and use device contextual logger
  • lxd/device/disk: Rework volatile apply_quota key handling to support virtual machines
  • lxd/refcount: Adds Get function
  • lxd/storage/backend/lxd: Removes dependence on RunningQuotaResize in SetInstanceQuota
  • lxd/storage/backend/lxd: Removes dependence on RunningQuotaResize in UpdateCustomVolume
  • lxd/storage/errors: Removes ErrRunningQuotaResizeNotSupported
  • lxd/storage/drivers/volume: Adds MountInUse function
  • lxd/storage/drivers/utils: Adds vol.MountInUse usage to ensureVolumeBlockFile
  • lxd/storage/drivers/utils: Adds filesystemTypeCanBeShrunk and updates shrinkFileSystem to use it
  • lxd/storage/drivers/utils: Updates growFileSystem to use DefaultFilesystem
  • lxd/storage/drivers/driver/types: Removes RunningQuotaResize
  • lxd/storage/drivers: Renames drivers_mock.go to driver_mock.go to align with other driver naming
  • lxd/storage/drivers/driver/mock: Removes RunningQuotaResize
  • lxd/storage/drivers/driver/btrfs: Updates BTRFS to use ensureVolumeBlockFile's in-use detection
  • lxd/storage/drivers/driver/dir: Updates to use ensureVolumeBlockFile's in-use detection
  • lxd/storage/drivers/driver/ceph/utils: Adds resizeVolume function
  • lxd/storage/drivers/driver/ceph: Removes RunningQuotaResize
  • lxd/storage/drivers/driver/ceph/volumes: Reworks SetVolumeQuota to be more aligned with LVM driver structure
  • lxd/storage/drivers/driver/cephfs: Removes RunningQuotaResize
  • lxd/storage/drivers/driver/lvm: Removes RunningQuotaResize
  • lxd/storage/drivers/driver/lvm/volumes: Updates SetVolumeQuota to use Volume's in-use detection
  • lxd/storage/drivers/driver/zfs: Removes RunningQuotaResize
  • lxd/storage/drivers/driver/zfs/volumes: Updates SetVolumeQuota to use Volume's in-use detection
  • lxd/storage/utils: Updates validatePoolCommonRules to differentiate VM volumes and filesystem volumes
  • lxd/instance: Error quoting and logging improvements in instanceCreateInternal
  • lxd/instance/drivers/driver/lxc: Adds revert to lxcCreate
  • lxd/instance/drivers/driver/qemu: Adds revert to qemuCreate
  • lxd/storage/backend/lxd: Set the correct volume content type for custom volumes
  • lxd/project/project: Adds ProfileProject and ProfileProjectFromRecord functions
  • lxd/db/storage/volumes: Adds content type constants and populates ContentType field in storagePoolVolumeGetType
  • lxd/storage/backend/lxd: Use volume's ContentType field in MountCustomVolume
  • lxc/info: Extend mdev details
  • i18n: Update translation templates
  • lxd/device/disk: Ignore ErrNotRunning for virtfs-proxy-helper
  • lxd/patches/utils: Adds legacy volumeFillDefault function for patches
  • lxd/patches: Updates patches to switch from driver.VolumeFillDefault to volumeFillDefault
  • lxd/storage/drivers/interface: Adds FillVolumeConfig
  • lxd/storage/drivers/driver/common: Adds FillVolumeConfig no-op for common drivers
  • lxd/storage/drivers/driver/{ceph,lvm}: Adds FillVolumeConfig function to populate default filesystem settings
  • lxd/storage/utils: Updates VolumeDBCreate to accept a Pool and call driver.FillVolumeConfig
  • lxd/storage/backend/lxd: VolumeDBCreate usage
  • lxd/storage/utils: Removes VolumeFillDefault and VolumeValidateConfig
  • lxd/storage/pool/interface: Adds FillInstanceConfig
  • lxd/storage/backend/lxd: Implements FillInstanceConfig
  • lxd/storage/backend/mock: Adds FillInstanceConfig
  • lxd/instance/drivers/driver/lxc: Updates lxcCreate to use storagePool.FillInstanceConfig
  • lxd/instance/drivers/driver/qemu: Updates qemuCreate to use storagePool.FillInstanceConfig
  • lxd/instance/drivers: Better errors in instance create functions
  • lxd/storage/backend/mock: Return storage pool ID 1 rather than -1 to allow tests to run
  • lxd/instance/qemu: Always render disk
  • Support zstd compression.
  • lxd-agent: Don't rely on systemd for rebooting
  • lxd/instance: Move id field to common
  • lxd/instance/common: Use 'd' as main variable
  • lxd/instance/qemu: Rename d to dev
  • lxd/instance/qemu: Replace vm with d
  • lxd/instance/lxc: Rename d to dev
  • lxd/instance/lxc: Replace c with d
  • lxd/isntance: Move most properties to common
  • lxd/instance: Move common functions to drive_common
  • shared/instance: golint fixes
  • shared/instance: Adds ConfigVolatilePrefix constant
  • shared/instance: ConfigVolatilePrefix usage
  • shared/instance: Adds InstanceIncludeWhenCopying function
  • lxd/copy: shared.InstanceIncludeWhenCopying usage in copyInstance
  • lxc: shared.ConfigVolatilePrefix usage
  • lxd: shared.ConfigVolatilePrefix usage
  • lxd/instances/post: shared.InstanceIncludeWhenCopying usage in createFromCopy
  • lxd/storage: Add volatile idmap setting debug log to resetContainerDiskIdmap
  • lxd/device/disk: Include network-config in cidata
  • lxd/instance: Fix build on 4.0
  • lxd/resources: Add GetNetworkState and GetNetworkCounters
  • lxd/storage/pools/utils: Updates comment and error for storagePoolCreateLocal
  • lxd/storage/pools: Error quoting
  • lxd/networks: Whitespace
  • lxd/network/driver/bridge: Adds some basic revert to setup()
  • lxd/network/driver/bridge: Only initialise revert if config has changed
  • lxd/network/driver/bridge: Fix incorrect return value
  • api: add resources_pci_iommu extension
  • shared/api: Add IOMMUGroup field to ResourcesPCIDevice
  • Add IOMMU group value to PCI devices
  • lxd/instance: Use revert package in instanceCreateFromImage
  • lxd/storage/backend/lxd: Remove revert from CreateInstanceFromImage
  • lxd/storage/drivers/driver/common: Enable unsafe resize mode in runFiller when unpacking into image volumes
  • lxd/storage/drivers/driver/ceph/volume: Allow image resize when in unsafe mode in SetVolumeQuota
  • lxd/storage/drivers/driver/zfs/volume: Allow image resize when in unsafe mode in SetVolumeQuota
  • lxd/storage/backend/lxd: Log new volume size in CreateInstanceFromImage
  • lxd/instance/qemu: Follow symlink to lxd-agent
  • lxd/db/networks: Comments
  • lxd/network/network/interface: Updates init to take api.Network and network nodes map
  • lxd/network/network/interface: Adds LocalStatus
  • lxd/network/network/load: Updates LoadByName to pass network nodes from s.Cluster.GetNetworkInAnyState to init()
  • lxd/db/networks: Adds NetworkState type and uses it in place of int
  • lxd/db/networks: Renames networkFillStatus to NetworkStateToAPIStatus
  • lxd/db/networks: Adds NetworkNode type
  • lxd/db/networks: Exports NetworkNodes and updates to return map of NetworkNodes
  • lxd/db/networks: Updates GetNonPendingNetworks usage of NetworkNodes()
  • lxd/db/networks: Modifies getNetwork and GetNetworkInAnyState to return map of NetworkNodes for network
  • lxd/db/networks: Exports NetworkNodes
  • lxd/db/networks: c.GetNetworkInAnyState usage
  • lxd/db/networks: Updates comments to reference state constants
  • lxd/patches: d.cluster.GetNetworkInAnyState usage
  • lxd/api/cluster: d.cluster.GetNetworkInAnyState usage
  • lxd/device/nic: d.state.Cluster.GetNetworkInAnyState usage
  • lxd/network/driver/common: Adds LocalStatus function and store node info inside network via init()
  • lxd/network/driver/bridge: Only perform local date if local status is api.NetworkStatusCreated
  • lxd/networks: Updates doNetworksCreate to skip creation if node is already marked created
  • lxd/networks: d.cluster.GetNetworkInAnyState usage
  • lxd/networks: Don't skip network clean up if network is pending in networkDelete()
  • lxd/db/migration/test: cluster.GetNetworkInAnyState usage
  • lxd/network/network/interface: Adds IsManaged function
  • lxd/network/driver/common: Adds IsManaged function and associated internal variable
  • lxd/networks: Prevent rename of pending networks
  • lxd/network/driver: Only apply local DB change in Update() when local node is in pending state
  • lxd/networks: Updates networksPostCluster to only mark global network states as created once all nodes created
  • lxd/networks: Reduce duplicate query loading network in networkPut and doNetworkUpdate
  • lxd/networks: Prevent update of global network config when network is pending in networkPut
  • lxd/network/bridge: Also delete on unknown status
  • lxd/instance/qemu: Fix GPU passthrough
  • lxd/instance/operations: Allow Wait/Done on nil struct
  • lxd/instance/lxc: Improve use of operations
  • lxd/instance/lxc: Improve locking on file ops
  • lxd/instance/operations: Introduce CreateWaitGet
  • lxd/instance: Introduce restart tracking
  • Makefile: Fix golint URL
  • lxd/network/driver/bridge: Improve IP parsing errors
  • lxd/network/driver/bridge: Don't fill default config on update
  • lxd/network/driver/bridge: Regenerate auto values on update
  • test/suites/network: Adds test for unsetting ipv4.address and ipv6.address
  • test/suites/network: Adds test for regeneration of auto values
  • doc/networks: Clarify bridge default auto values
  • lxd/device/disk: Only validate disk source pool when an actual instance is set
  • test/suites/migration: Adds tests for copying instance with snapshots containing invalid disk devices
  • lxc-to-lxd: Fix handling on snap
  • lxd/instance: Bypass delete protection for internal calls
  • lxd/instance/qemu: Improve state handling
  • lxd/instance/operationlock: Allow Reset
  • lxd/instance/qemu: Stretch start/stop timeout
  • lxd/instance/qemu: Increase virtiofsd timeout to 10s
  • lxd/instance/qemu: Move more logic into qemuArchConfig
  • lxd/instance: Add Info function
  • lxd/instance: Add SupportedInstanceDrivers
  • lxd/instance: Add driver cache
  • lxd/api: Show all instance drivers
  • lxd/qemu: Don't stop processing events on shutdown
  • lxd/rbac: Improve access to user information
  • lxd/daemon: Improve request context
  • lxd/rbac: Move userIsAdmin and userHasPermission
  • lxd: Move to new RBAC helpers
  • lxd/storage/volumes: Error quoting in storagePoolVolumesTypePost
  • lxd/storage/volumes: Fixes misleading comment in storagePoolVolumesPost
  • lxd/storage/volumes: Error quoting in storagePoolVolumesPost
  • lxd/networks: Use SmartError for response when loading networks
  • lxd/project: Add new FilterUsedBy helper
  • lxd: Filter all UsedBy based on RBAC
  • lxc/file: Fix typo in fileGetWrapper
  • lxc/restore: Fix typo in help
  • lxd/networks: Fix bad logging level
  • lxd/daemon: Fix bad permission check
  • lxd/storage/drivers/generic: Fix VM rename with ZFS
  • lxd/instance: Remove duplicate event
  • lxd/instance/common: Implement lifecycle wrapper
  • lxd/instance/lxc: Port to new wrapper
  • lxd/instance/lxc: Lock restore operations
  • lxd/instance/qemu: Port to new wrapper
  • lxd/instance/qemu: Lock restore operations
  • lxd/backup: Add lifecycle events
  • lxd/network: Add lifecycle function
  • lxd/network: Implement create wrapper
  • lxd/network: Add lifecycle events
  • lxd/cluster/request/clienttype: Moves client type constants and helper into own package
  • lxd/cluster/connect: Removes client type constants and helper
  • lxd: Updates use of ClientType now moved to cluster/request package
  • lxd/networks: Ensure etag generation uses its own copy of config in networkPut
  • lxd/networks: Comment in networksPostCluster
  • lxd/networks: Corrects log level in networksPostCluster
  • lxd/networks: golint fix
  • lxd/db/networks: Removes unused NetworkErrored function
  • lxd/db/networks: Updates network state comments to indicate node usage
  • lxd/apparmor/qemu: Allow some more files
  • lxd/storage/drivers/drivers/zfs/volumes: Fixes 10s delay when using VMs with ZFS in snap
  • lxd/instance: Adds per-struct contextual logger.
  • lxd/instance/drivers: Fixes instanceType in instance logger
  • i18n: Update translation templates
  • Revert "lxd/db/networks: Removes unused NetworkErrored function"
  • lxd/db/storage/pools: Updates storage pool state comments to indicate node usage
  • lxd/db/storage/pools: Replace use of networkCreated with storagePoolCreated in getStoragePool
  • lxd/storage/pools/utils: Consistent commnent endings
  • lxd/storage/pools/utils: Fix comment in storagePoolCreateLocal
  • lxd/storage/pools: Add logging for storage pool state updates in storagePoolsPostCluster
  • lxd/db/storage/pools: Updates comment on StoragePoolCreated
  • lxd/storage/pools: Fix copy paste error in comment
  • lxd/storage/load: Updates GetPoolByName to use state.Cluster.GetStoragePoolInAnyState
  • lxc/storage: Adds --target flag support to cmdStorageSet
  • lxd/db/storage/pools: Adds StoragePoolState type and updates state constants to be of that type
  • lxd/db/storage/pools: Adds StoragePoolNode type
  • lxd/db/storage/pools: StoragePoolState usage
  • lxd/db/storage/pools: Adds storagePoolNodes function
  • lxd/db/storage/pools: Updates storage pool load functions to return nodes
  • lxd/db/storage/pools: Updates storagePoolNodes to return map of StoragePoolNode
  • lxd/db/storage/pools: c.GetStoragePoolInAnyState usage
  • shared/api/storage/pool: Adds storage pool status contants
  • lxd/db/storage/pools: Adds StoragePoolStateToAPIStatus and updates getStoragePool to use it
  • lxd/patches: d.cluster.GetStoragePoolInAnyState usage
  • lxd/api/cluster: d.cluster.GetStoragePoolInAnyState usage
  • lxd/backup/backup/config: c.GetStoragePool usage
  • lxd/daemon/storage: s.Cluster.GetStoragePool usage
  • lxd/device/disk: d.state.Cluster.GetStoragePool usage
  • lxd/instance/post: d.cluster.GetStoragePool usage
  • lxd/instances/post: d.cluster.GetStoragePoolInAnyState usage
  • lxd/storage/pools: d.cluster.GetStoragePoolInAnyState usage
  • lxd/storage/volumes/snapshot: d.cluster.GetStoragePool usage
  • lxd/storage/pool/interface: Adds Description, Status and LocalStatus functions to definition
  • lxd/storage/backend/mock: Adds Description, Status and LocalStatus functions
  • lxd/storage/backend/lxd: Adds Description, Status, LocalStatus functions and adds nodes property
  • lxd/storage/load: state.Cluster.GetStoragePoolInAnyState usage and populates pool nodes in GetPoolByName
  • lxd/storage/pool/interface: Adds IsUsed and Create functions
  • lxd/storage/backend/lxd: Exports Create and adds IsUsed
  • lxd/storage/backend/mock: Adds IsUsed and Create
  • lxd/storage/load: Deprecates CreatePool
  • lxd/storage/load: Updates CreatePool to initialise empty node list
  • lxd/db/migration/test: cluster.GetStoragePool usage
  • lxd/storage/pools: Removes unused storagePoolValidateClusterConfig, storagePoolClusterConfigForEtag, storagePoolClusterFillWithNodeConfig functions
  • lxd/storage/pools/utils: Removes unused storagePoolUpdate
  • lxd/api/cluster: Updates client type usage to new package
  • lxd/storage/load: Updates deprecated CreatePool to use client type
  • lxd/patches: storagePools.CreatePool usage
  • lxd/storage/pool/interface: Replaces localOnly and driverOnly indicators with clientType
  • lxd/storage/backend/mock: Replace localOnly and driverOnly with clientType
  • lxd/storage/drivers/driver/ceph: Simplify Delete logic
  • lxd/api/cluster: Removal special casing for ceph/cephfs
  • lxd/storage/backend/lxd: Adds protection against using a pending pool
  • lxd/storage: Adds target support to cmdStorageGet
  • lxd/storage/pools: Updates storagePoolsPostCluster to only forward non-node specific config
  • shared: Add IsUserConfig() utility function
  • lxd/config: Allow user keys in server config
  • lxd/storage/backend/lxd: Comment typo fix
  • lxd/storage/drivers/driver/btrfs/volumes: Enable allowUnsafeResize in CreateVolume when creating initial image volume
  • lxd/storage/drivers/utils: Updates ensureVolumeBlockFile to return unsupported when trying to resize image volume without allowUnsafeResize enabled
  • lxd/storage/utils: Ensure pool's volume.size is checked when unpacking images to pools that use file based images
  • lxd/instance/qemu: Deref OVMF path
  • lxc: Clarify --compression option
  • doc/image-handling: Update compression details
  • i18n: Update translation templates
  • lxd/rbac: Fix checks by matching proper name
  • api: Add resources_network_usb and resources_disk_address
  • shared/api: Add PCIAddress/USBAddress on network and storage
  • lxd/resources: Add PCIAddress/USBAddress for networks and disks
  • lxd/storage/drivers/utils: Modifies roundVolumeBlockFileSizeBytes to round up
  • lxd/storage/drivers/utils: roundVolumeBlockFileSizeBytes usage
  • lxd/storage/drivers/driver/zfs/utils: Use roundVolumeBlockFileSizeBytes in createVolume
  • lxd/storage/drivers/driver/zfs/volumes: Use roundVolumeBlockFileSizeBytes in CreateVolume
  • lxd/storage/drivers/driver/zfs/volumes: Use roundVolumeBlockFileSizeBytes in SetVolumeQuota
  • lxd/storage/backend/lxd: Use revert in CreateInstanceFromCopy
  • lxd/storage/backend/lxd: Don't fail in DeleteInstance if DB record already removed
  • lxd/instance: Use revert in instanceCreateAsCopy
  • lxd/storage/drivers/driver/ceph/volumes: Whitespace
  • lxd/storage/drivers/driver/ceph/volumes: Adds a hasVolume function that accepts an RBD volume name
  • lxd/storage/drivers/driver/ceph/volumes: Fixes issue in DeleteVolume that prevented image volume deletion if no readonly snapshot existed
  • lxd/storage/backend/lxd: Return error in EnsureImage when cannot delete orphaned volume
  • doc/networks: Mention DNSSEC setting
  • lxd/storage/pools/utils: Updates storagePoolCreateLocal to mark local node state as created
  • lxd/db/storage/pools: Removes unused function StoragePoolErrored
  • lxd/storage/pools: Adds doStoragePoolUpdate function
  • lxd/storage/pools/utils: Updates storagePoolCreateLocal to use GetPoolByName
  • lxd/storage/pools: Reworks storagePoolDelete to only delete locally if node has created state
  • lxd/storage/pools: Reworks storagePoolPut and calls storagePoolPut from storagePoolPatch
  • lxd/storage/backend/lxd: Reworks Update to only apply changes to local node if not pending
  • lxd/storage/backend/lxd: Replace localOnly and driverOnly with clientType
  • lxd/storage/pools: Switch to clientType
  • lxd/storage/pools/utils: Switch to clientType
  • lxd/db/storage: Hardcode unknown node state
  • tests: Add test for import after deleted snapshot
  • lxd/instances: Update backup file when deleting a snapshot
  • lxd/instance/lxc: Fix backup.yaml delete logic to trigger properly
  • lxd/instance/qemu: Also update backup.yaml on snapshot delete
  • lxd/instance/qemu: Update backup.yaml on startup
  • lxd/db/storage/pools: Comment wrapping
  • lxd/storage/backend/lxd: Prevent modification of source field on non-pending nodes
  • lxd/storage/drivers/driver/lvm: Comment typo
  • lxd/apparmor/qemu: Allow ceph snap paths
  • lxd/network/network/interface: Adds Project function
  • lxd/network/driver/common: Adds Project function
  • lxd/network/driver: Always delete when requested, ignore LocalStatus() pending
  • lxc/networks: Remove revert removal on failure of clustered network in networksPost
  • lxd/networks: Allow re-create of pending network when pending nodes already exist in networksPost
  • lxd/networks: Adds revert to doNetworksCreate
  • shared/api: Fix typo
  • shared/api: Add NetworkStateVLAN
  • lxd/resources: Add VLAN struct
  • api: Add network_state_vlan
  • lxd/instance/qmp: Update for go-qmp change
  • lxd/backup: Fix URL in lifecycle events
  • Add DeepSource config
  • Use result of type assertion to simplify cases
  • Replace .Sub(time.Now()) with time.Until() handler
  • Remove unnecessary fmt.Sprintf() on string
  • Omit comparison with boolean constant
  • lxd/network/driver/common: Remove cluster notification and DB record removal from delete() function
  • lxd/networks: Moves cluster notification an DB record removal into networkDelete
  • lxd/db/networks: Adds duplicate key detection to getNetworkConfig
  • lxd/instance/drivers/qmp/monitor: Handle closed event channel from qmp package in run
  • lxd/instance/drivers/driver/qemu: Logs when instance is stopped in getMonitorEventHandler
  • lxd/instance/operationlock: Fixes deadlock caused by call to Reset in Create
  • lxd/instance/operationlock: Store operation in instanceOperations before calling go routine
  • lxd/instance/operationlock: Exit go routine started in Create when the operation is done
  • lxd/device: allow adding proxy device to VM instances
  • lxd/instance/drivers: run device post-start hooks in QEMU driver
  • doc: update proxy doc to reflect VM support
  • lxd/device/nic/routed: Switches to network.InterfaceExists for clarity
  • lxd/device/nic/routed: Remove host side veth interface if exists in postStop
  • lxd/db/networks: Changes UpdateNetwork to not set created status
  • lxd/networks: Updates doNetworksCreate to accept a Network rather than load its own
  • lxd/networks: Debug log consistency in doNetworksCreate
  • lxd/networks: doNetworksCreate usage
  • lxd/networks: When auto creating pending nodes, don't pass global config into DB function in networksPost
  • lxd/networks: Adds networkPartiallyCreated helper function
  • lxd/networks: Updates networksPostCluster to detect existing global config and skip create if already exists
  • lxd/api/cluster: Skip non-created networks when joining
  • lxd/device/nic: Don't allow NICs to use networks that are not created
  • lxd/db/networks: Renames ClusterTx GetNonPendingNetworks to GetCreatedNetworks
  • lxd/db/networks: Renames Cluster GetNonPendingNetworks to GetCreatedNetworks
  • lxd/api/cluster: cluster.GetCreatedNetworks usage
  • lxd/networks: s.Cluster.GetCreatedNetworks usage
  • lxd/patches: tx.GetCreatedNetworks usage
  • lxd/db/networks: Tighten restrictions in CreatePendingNetwork to only allow pending nodes to be added while network is pending
  • lxd/networks: Allow single node cluster network create using --target
  • lxd/storage/pools/utils: Debug log consistency in storagePoolCreateLocal
  • lxd/db/storage/pools: Adds duplicate key detection to getStoragePoolConfig
  • lxd/storage/pools: storagePoolsPost comments line width
  • lxd/db/storage/pools: Adds StoragePoolErrored function
  • lxd/db/storage/pools: Renames GetNonPendingStoragePoolNames to GetCreatedStoragePoolNames
  • lxd/api/cluster: cluster.GetCreatedStoragePoolNames usage
  • lxd/storage: s.Cluster.GetCreatedStoragePoolNames usage
  • lxd/storage/pools: Restructures storagePoolsPost to align with networksPost
  • lxd/storage/pools: Updates storagePoolsPostCluster to reject global config on re-create attempts
  • lxd/storage/pools: Adds storagePoolPartiallyCreated function
  • lxd/db/storage/pools: Improve errors in CreatePendingStoragePool
  • stable-4.0: Remove debug/accidental files
  • lxd/db/networks: Corrects comment on GetCreatedNetworks
  • lxd/networks: Prevent re-create attempts on errored networks
  • lxd/networks: Don't allow config modification on errored networks in networkPut
  • lxd/network/driver/bridge: Don't apply updates to node when network is pending
  • lxd/storage/pools: Prevent re-create attempts on errored pools
  • lxd/storage/backend/lxd: Prevent changing pool node source if pool state isn't pending
  • lxd/storage/backend/lxd: Only apply local node changes if both pool and node status are not pending
  • lxd/storage/pools: Dont allow config modification on errored pools in storagePoolPut
  • test/suites/clustering: Adds adapted tests for stable-4.0 clustered storage setup
  • test/suites/clustering: Adds adapted tests for stable-4.0 clustered network setup
  • shared/util: Adds StringHasPrefix function
  • lxd/device/disk: Adds sourceIsLocalPath function
  • lxd/device/disk: Use shared.StringHasPrefix when validating ceph/cephfs prefixes
  • lxd/device/disk: Use d.sourceIsLocalPath when validating source host path exists
  • lxd/instance/qemu: Enable multiqueue on tap NICs
  • lxd/instance/qemu: Use a minimum of 2 network queues
  • lxd/storage/drivers/driver/zfs/volumes: Error quoting in RestoreVolume
  • lxd/storage/backend/lxd: Don't fail in DeleteInstanceSnapshot if volume DB record already deleted
  • lxd/storage/backend/lxd: Fix deleting subsequent snapshots for ZFS in RestoreInstanceSnapshot
  • lxd/instances/post: Use source.Project when loading instance to get instance type in containersPost
  • lxd/instances/post: Error quoting in containersPost
  • lxd/instances/post: Add comment about default instance type for migration in containersPost
  • lxd/instances/post: Populate req.Source.Project with project.Default if not specified in containersPost
  • test/suites/projects: Adds tests for copying snapshot to another project
  • lxd/instances/post: Rename project to targetProject to differentiate between source.Project in containersPost
  • lxd/instances/project: Import project package normally and rename project var to projectName
  • doc/image-handling: Fix typo
  • shared/proxy: Support CIDR ranges in no_proxy
  • simplestreams: Drop duplicated slash
  • lxd/instance/drivers/qmp: Fix race in Disconnect
  • test/suites/static/analysis: Fixes ineffassign usage due to upstream changes
  • lxd/instance: Copy snapshot expiry in instanceCreateAsCopy
  • lxd/migration: Rebuilds protobuf using protoc v3.14 and latest google.golang.org/protobuf/cmd/protoc-gen-go
  • lxd/migration: Adds expiry_date field to snapshots protobuf
  • lxd/migrate/instance: Populate expiry date in snapshotToProtobuf
  • lxd/migrate/storage/volumes: Populate zero expiry date in volumeSnapshotToProtobuf
  • lxd/storage/migration: Populate expiry date in snapshotProtobufToInstanceArgs
  • lxd/migration/migration/volumes: Updates TypesToHeader and MatchTypes to use a pointer to MigrationHeader
  • lxd/migrate/instance: Avoid copying migration.MigrationHeader due to new internal state lock added by protobuf
  • lxd/migrate/storage/volumes: Avoid copying migration.MigrationHeader due to new internal state lock added by protobuf
  • lxd/migrate/instance: Fix snapshotToProtobuf to not use loop pointer for device name
  • lxd/storage/migration: Conistently use accessor functions in snapshotProtobufToInstanceArgs
  • test/suites/snapshots: Adds test for local copy of snapshot expiry date
  • test/suites/migration: Adds test for copying snapshot expiry date during migration
  • test/suites/migration: Adds test to ensure snapshot devices are copied during migration
  • lxd/storage/quota/projectquota: Consistent comment endings and error quoting
  • lxd/storage/drivers/driver/dir/utils: Updates setQuota to remove old quota if volID has changed
  • lxd/storage/drivers/driver/dir/utils: Modifies setupInitialQuota to not use initQuota
  • lxd/api/internal: Updates internalImportFromRecovery to reinitialise root disk quota
  • lxd: Rename Operation types
  • lxd/db: Rename operation type descriptions
  • lxd/network/network/interface: Adds handleDependencyChange function
  • lxd/network/driver/common: Adds notifyDependentNetworks function and no-op placeholder handleDependencyChange function
  • lxd/resources: Always initialize lists
  • lxd/storage/utils: Improves error message in VolumeUsedByExclusiveRemoteInstancesWithProfiles
  • lxd/db/instances: Updates InstanceList to accept filter to pass to GetInstances()
  • lxd/db/instances: Clarifies comment and arg name on GetLocalInstancesInProject
  • lxd/db/instances/test: cluster.InstanceList usage
  • lxd/storage/utils: s.Cluster.InstanceList usage
  • lxd/patches: InstanceList usage
  • lxd/network/network/utils/sriov: Adds SR-IOV allocation functions
  • lxd/network/network/utils/sriov: Updates SRIOVGetHostDevicesInUse to use InstanceList()
  • lxd/network/network/utils/sriov: Adds network usage support to SRIOVGetHostDevicesInUse
  • lxd/network/network/utils/sriov: SRIOVGetHostDevicesInUse usage
  • lxd/network/network/utils/sriov: Updates SRIOVFindFreeVirtualFunction args to not need Device
  • lxd/network/network/utils/sriov: Adds SRIOVGetVFDevicePCISlot function
  • lxd/network/network/utils: Adds InterfaceBindWait function
  • lxd/device/pci: Adds PCI device management package
  • lxd/device/infiniband/sriov: SRIOV network function usage
  • lxd/device/nic/physical: Use pci package
  • lxd/device/gpu: Use pci package
  • lxd/device/nic/sriov: network.InterfaceBindWait
  • lxd/device/nic/sriov: Use pci package
  • lxd/device/nic/sriov: SRIOV network function usage
  • lxd/device/nic/sriov: Comment clarity in setupSriovParent
  • lxd/device/nic/sriov: Removes networkGetVFDevicePCISlot function
  • lxd/device/device/utils/generic: Removes pci functions
  • lxd/device/device/utils/network: Removes networkInterfaceBindWait function
  • lxd/device/device/utils/instance: Removes instanceGetReservedDevices function
  • lxd/network/driver/bridge: Comment improvements
  • lxd/init: Clarify https listener question
  • client: Fix output of GetClusterMemberNames
  • openvswitch/ovs.go: Simplify return in Installed method
  • rbac/server.go: Sleep for seconds instead of nanoseconds
  • lxd/instance/drivers/driver/qemu: Updates SaveConfigFile to return nil
  • lxd/api/internal: Updates internalImportFromRecovery to call inst.SaveConfigFile
  • test/suites/backup: Adds test to check exec works after recovery of running container
  • cluster/raft/file_snapshot.go: defer after checking error
  • lxd/storage/drivers/driver/cephfs/volumes: Updates RenameVolume newName arg to newVolName to bring inline with other drivers
  • lxd/storage/drivers/driver/ceph/volumes: Fix UnmountVolume to actually deactivate VM block volumes
  • lxd/storage/drivers/driver/ceph/volumes: Fix RenameVolume to also rename FS volume for VM volumes
  • lxc/network: Adds support for attaching instance to a managed network using network property
  • test/suites/container/devices/proxy: Ensure ipv6 nat tests use a network with stateful DHCPv6 enabled
  • test/suites/network: Updates static IPv6 allocation test to actually test stateful DHCPv6
  • test/suites/container/devices/nic/bridged: Improve validation of DHCPv6 allocation
  • lxc/query: Prevent using --project
  • i18n: Update translation templates
  • lxd/utils: Compare all addresses from lookup in IsAddressCovered, lxc#8340
  • lxd/resources: Support DMI for CPU information
  • lxd/device/nic/routed: Ensure IP neighbour proxy entries are removed on stop
  • lxd/device/nic/routed: Adds duplicate address detection
  • lxd/device/disk: Validate size field properly
  • lxd/device/nic/bridged: Only attempt to release DHCP leases if bridge interface exists
  • lxd/device/nic/bridged: Improve error context prefix in networkClearLease
  • lxd/device/nic/bridged: Use %q for error quoting in networkClearLease
  • lxd/device/nic/bridged: Improve error context prefix in State
  • lxd/instance: Fix progress on ceph instance move
  • lxd/storage/backend/lxd: Use volume config in UpdateInstanceBackupFile so that volume.block.filesystem setting is used
  • lxd/storage/drivers/utils: Adds filesystem being used to TryMount error
  • lxd: Smarter handling of volatile keys in projects
  • lxd/project: Strip volatile on copy/migrate
  • tests: Update project restrictions test
  • lxd/instance/drivers/driver/lxc: Umount instance after CRIU state path check in Restore
  • lxd/instance/drivers/driver/lxc: Avoid duplicated call to UpdateBackupFile in Restore
  • lxd/instance/drivers/driver/lxc: Log instance restarting after snapshot restore
  • lxd/instance/drivers/driver/lxc: Always run UpdateBackupFile in Update
  • lxd/instance/drivers/driver/qemu: Removes unnecessary call to UnmountInstance in Restore
  • lxd/instance/drivers/driver/qemu: Remove unnecessary call to UpdateBackupFile
  • lxd/instance/drivers/driver/qemu: Log instance restarting after snapshot restore
  • lxd/instance/drivers/driver/lxc: Copy parent volume config to snapshot volume config in lxcCreate
  • lxd/instance/drivers/driver/qemu: Copy parent volume config to snapshot volume config in qemuCreate
  • doc/rest-api: Fix typo
  • doc/rest-api: Fix missing escaping
  • lxd/instance: Tweak error and resource links
  • client: Adds support for bulk instance state change.
  • test/suites/snapshots: Adds snapshot block.filesystem config check for LVM & Ceph
  • shared/api: Adds support for bulk instance state change.
  • shared/api: Change mass update API
  • client: Re-order functions
  • lxd: Rename container functions
  • lxd/instance_state: Simplify
  • lxd/instance: Refactor state handling
  • lxd/instance/drivers: Move ephemeral restart logic
  • lxd/db/instances: Improve error message from CreateInstanceConfig
  • lxd/instance/drivers/driver/common: Adds insertConfigkey function
  • lxd/instance/drivers/driver/lxc: Updates FillNetworkDevice to use d.insertConfigkey
  • lxd/instance/drivers/driver/qemu: Updates FillNetworkDevice to use d.insertConfigkey
  • lxd/vm: Expose ISO images as SCSI cdroms
  • lxd/storage: Cleanup CreateInstanceFromCopy
  • lxd/storage/utils: Updates VolumeDBCreate to accept volume and content type typed arguments
  • lxd/storage/backend/lxd: Error quoting and wrapping
  • lxd/storage/backend/lxd: Expand argument type in updateVolumeDescriptionOnly
  • lxd/storage/backend/lxd: VolumeDBCreate updated usage
  • lxd/instance/drivers/driver/lxc: Fix volatile config key scoping issue in FillNetworkDevice
  • lxd/instance/drivers: Detect failed volatile key generation
  • lxc/instance/drivers/driver/common: Removes empty value check from insertConfigkey
  • lxd/instance/drivers/driver/common: Prevent existing row check from wiping out desired key value in insertConfigkey
  • lxd/instance/drivers: More checks and error contexts in FillNetworkDevice
  • lxd/db/query/retry: Adds detection of checkpoint in progress to IsRetriableError
  • lxd/instance/drivers/driver/qemu: Error alignment with container driver in Rename
  • lxd/storage/utils: Improves error in VolumeDBCreate
  • lxd/db/storage/volumes: Populates ProjectName field in GetLocalStoragePoolVolumeSnapshotsWithType
  • lxd/instance/drivers/driver/lxc: Error context in Rename
  • lxd/instances/post: Unwraps long error and using double quotes placeholder
  • lxd/instance/instance/interface: Adds TemplateTrigger type and constants for template trigger types
  • lxd/instance: Adds instanceCreateAsCopyOpts argument for instanceCreateAsCopy options
  • lxd/instances/post: instanceCreateAsCopy updated usage
  • lxd/instance/instance/interface: Updates DeferTemplateApply to accept TemplateTrigger type argument
  • lxd/instance/drivers/driver/common: Updates DeferTemplateApply to accept a TemplateTrigger type argument
  • lxd/storage/backend: inst.DeferTemplateApply usage
  • lxd/instances/post: inst.DeferTemplateApply usage
  • lxd/instance/drivers/driver/lxc: Updates templateApplyNow to accept a TemplateTrigger argument
  • lxd/instance/drivers/driver/lxc: d.templateApplyNow usage
  • lxd/instance/drivers/driver/qemu: Updates templateApplyNow to accept a TriggerTemplate type argument
  • lxd/instance/drivers/driver/qemu: d.templateApplyNow usage
  • lxd/instance/instance/interface: Adds applyTemplateTrigger argument to Rename
  • lxd/instance/drivers/driver/lxc: Adds applyTemplateTrigger argument to Rename
  • lxd/instance/drivers/driver/qemu: Adds applyTemplateTrigger argument to Rename
  • lxd/instance/post: inst.Rename usage
  • lxd/instance/snapshot: sc.Rename usage
  • lxd/storage/backend/lxd: Removes call to deferred template apply in RenameInstance
  • lxd/instance/test: c.Rename usage
  • shared/api: Add Pool field to InstancePost
  • client: Add extension check for pool migration
  • test: Add tests for volatile.apply_template config during create, copy and move
  • test: Adds check for volatile.apply_template state after rename
  • test: Add test for moving instance between pools without renaming
  • lxd/images: Skip keys with empty values
  • lxd/device: Fix instance type validations
  • shared/instance: Adds ErrNoRootDisk error var and returns it from GetRootDiskDevice
  • lxd/instance: Enforces that target instance should have valid root disk config after DB create in instanceCreateAsCopy
  • lxd/instance: Don't assume root disk is called "root" when copying snapshots from a source instance
  • lxd/instance/drivers/driver_qemu: attempt to kill qemu proc on stop
  • lxd/instance/driver_qemu: Add check for qemu cmdline args to pid()
  • forkproxy: prevent zombies
  • lxd: Change some references of container to instance in comments
  • lxd/instance/post: Change error message to instance from container in instancePost
  • lxd/main/forkdns: Returns empty AAAA record response when equivalent A record exists
  • lxd/main/forkdns: Fixes typo in comment
  • test: Adds test for empty AAAA response when equivalent A record exist in clustering forkdns
  • lxd/device/pci: Consider DeviceUnbind successful on missing driver
  • shared/validate: Validate PCI addresses
  • lxd/device/gpu: Validate PCI addresses
  • lxd/device: Add function to validate PCI path
  • lxd/device: Add support for GPU SR-IOV
  • api: gpu_sriov extension
  • doc: Add SR-IOV GPU
  • lxd/device/gpu_mdev: Valdiate PCI address and path
  • lxd/device/gpu_physical: Validate PCI address and path
  • lxd/instance/qemu: Cleanup VGA ROM check
  • lxd/network/driver/bridge: Update DHCPv4Subnet to return fan bridge address subnet when in fan mode
  • lxd/device/nic/bridge: Updates validateConfig to use parent networks DHCP subnet functions when validating address
  • Revert "test: Add test for moving instance between pools without renaming"
  • tests: Fix for stable-4.0
  • shared/termios: Fix static builds
  • shared/idmap: Fix shared/ build on non-cgo
  • shared/instancewriter/: Fix shared/ build on non-cgo
  • shared/eagain: Restrict to Linux
  • shared/subprocess: Restrict to unix
  • lxd/db/generate: Move DB generator
  • github: Replace Travis and Appveyor with Actions
  • README: Update for 4.0
  • lxc/manpage: Add markdown, reST and YAML output
  • i18n: Update translation templates
  • lxd/device/gpu: Skip nvidia directories
  • lxd/device: Free up the pci name
  • lxd/device: Support for both pci= and address= in checker
  • lxd/device/pci: Add NormaliseAddress
  • lxd/device: Have validatePCIDevice take an address
  • lxd/instance/qemu: Rename qemuNetDevPhysical to qemuPCIPhysical
  • cgroup: fix cgroup2 device driver settings

Try it for yourself

This new LXD release is already available for you to try on our demo service.

Downloads

The release tarballs can be found on our download page.

Binary builds are also available for:

  • Linux: snap install lxd
  • MacOS: brew install lxc
  • Windows: choco install lxc

LXD 4.10 has been released

8th of January 2021

Introduction

The LXD team is very excited to announce the release of LXD 4.10!

This is a lighter release as the LXD team was off between the 18th of December and 4th of January but a lot of bugfixes and a few new improvements have made it in anyway.

Enjoy!

New features and highlights

VLAN information in network state

Similarly to bond and bridge information, a new vlan struct was added to the network state endpoint. This exposes the lower device and the VLAN id of the interface.

root@abydos:~# lxc query /1.0/networks/bond-sw01.100/state
{
    "addresses": [],
    "bond": null,
    "bridge": null,
    "counters": {
        "bytes_received": 213651991756,
        "bytes_sent": 42453202,
        "packets_received": 97607519,
        "packets_sent": 431818
    },
    "hwaddr": "0a:0f:7c:6e:db:d9",
    "mtu": 1500,
    "state": "up",
    "type": "broadcast",
    "vlan": {
        "lower_device": "bond-sw01",
        "vid": 100
    }
}

Proxy device support for VMs (NAT only)

Virtual machines can now make use of the proxy device type. This is restricted to NAT mode only (nat=true) and so requires the same protocol be used on both sides.

Bridge port isolation

A new security.port_isolation option on bridged network interfaces allows restricting communication between instances.

New sub-commands for image properties

Three new sub-commands to lxc image were added to help with accessing, setting and unsetting image properties.

  • lxc image get-property
  • lxc image set-property
  • lxc image unset-property

Example:

stgraber@castiana:~$ lxc image get-property 305db7054652 os
Ubuntu
stgraber@castiana:~$ lxc image set-property 305db7054652 foo bar
stgraber@castiana:~$ lxc image get-property 305db7054652 foo
bar
stgraber@castiana:~$ lxc image unset-property 305db7054652 foo
stgraber@castiana:~$

Multi-queue networking in VMs

Network interfaces in virtual machines are now automatically setup to have a number of RX and TX queues matching the number virtual CPUs assigned to the virtual machine.

This should provide much improved network performance especially when dealing with high speed networking.

Complete changelog

Here is a complete list of all changes in this release:

  • lxd/network/network/interface: Adds Project function
  • lxd/network/driver/common: Adds Project function
  • lxd/network/driver/common: Remove cluster notification and DB record removal from delete() function
  • lxd/network/driver: Always delete when requested, ignore LocalStatus() pending
  • lxc/networks: Remove revert removal on failure of clustered network in networksPost
  • lxd/networks: Allow re-create of pending network when pending nodes already exist in networksPost
  • lxd/networks: Adds revert to doNetworksCreate
  • lxd/networks: Moves cluster notification an DB record removal into networkDelete
  • shared/api: Fix typo
  • shared/api: Add NetworkStateVLAN
  • lxd/resources: Add VLAN struct
  • api: Add network_state_vlan
  • lxd/instance/qmp: Update for go-qmp change
  • lxd/backup: Fix URL in lifecycle events
  • Add DeepSource config
  • Use result of type assertion to simplify cases
  • Replace .Sub(time.Now()) with time.Until() handler
  • Remove unnecessary fmt.Sprintf() on string
  • Omit comparison with boolean constant
  • lxd/db/networks: Adds duplicate key detection to getNetworkConfig
  • lxd/db/networks: Adds NetworkErrored function
  • lxd/db/networks: Changes UpdateNetwork to not set created status
  • lxd/network/driver/ovn: Reject instance port start if cannot find DHCP options
  • lxd/networks: Updates doNetworksCreate to accept a Network rather than load its own
  • lxd/networks: Debug log consistency in doNetworksCreate
  • lxd/networks: doNetworksCreate usage
  • lxd/networks: When auto creating pending nodes, don't pass global config into DB function in networksPost
  • lxd/networks: Adds networkPartiallyCreated helper function
  • lxd/networks: Updates networksPostCluster to detect existing global config and skip create if already exists
  • lxd/api/cluster: Skip non-created networks when joining
  • lxd/device/nic: Don't allow NICs to use networks that are not created
  • lxd/db/networks: Renames ClusterTx GetNonPendingNetworks to GetCreatedNetworks
  • lxd/db/networks: Renames Cluster GetNonPendingNetworks to GetCreatedNetworks
  • lxd/api/cluster: cluster.GetCreatedNetworks usage
  • lxd/network: tx.GetCreatedNetworks usage
  • lxd/networks: s.Cluster.GetCreatedNetworks usage
  • lxd/patches: tx.GetCreatedNetworks usage
  • test/suites/clustering: More network clustering tests
  • lxd/db/networks: Tighten restrictions in CreatePendingNetwork to only allow pending nodes to be added while network is pending
  • lxd/networks: Allow single node cluster network create using --target
  • lxd/db/cluster/update: Adds patch updateFromV41 function
  • lxd/storage/pools/utils: Debug log consistency in storagePoolCreateLocal
  • lxd/db/storage/pools: Adds duplicate key detection to getStoragePoolConfig
  • lxd/storage/pools: storagePoolsPost comments line width
  • lxd/db/storage/pools: Adds StoragePoolErrored function
  • lxd/db/storage/pools: Renames GetNonPendingStoragePoolNames to GetCreatedStoragePoolNames
  • lxd/api/cluster: cluster.GetCreatedStoragePoolNames usage
  • lxd/storage/pools/utils: Renames id arg to poolID in storagePoolCreateLocal
  • lxd/storage: s.Cluster.GetCreatedStoragePoolNames usage
  • lxd/storage/pools: Restructures storagePoolsPost to align with networksPost
  • lxd/storage/pools: Updates storagePoolsPostCluster to reject global config on re-create attempts
  • lxd/storage/pools: Adds storagePoolPartiallyCreated function
  • test/suites/clustering: Updates storage pool status tests
  • lxd/db/storage/pools: Improve errors in CreatePendingStoragePool
  • test/suites/clustering: Adds additional storage pool state tests
  • lxd/db/cluster/update: Adds patch updateFromV42 function
  • lxd/device: Add support for bridge port isolation
  • api: Add instance_nic_port_isolation extension
  • lxd/instance/drivers/qmp/monitor: Handle closed event channel from qmp package in run
  • lxd/instance/drivers/driver/qemu: Logs when instance is stopped in getMonitorEventHandler
  • lxd/instance/operationlock: Fixes deadlock caused by call to Reset in Create
  • lxd/instance/operationlock: Store operation in instanceOperations before calling go routine
  • lxd/instance/operationlock: Exit go routine started in Create when the operation is done
  • lxd/network/driver/ovn: Detect IPv6 DHCP options correctly
  • lxd/device: allow adding proxy device to VM instances
  • lxd/instance/drivers: run device post-start hooks in QEMU driver
  • doc: update proxy doc to reflect VM support
  • lxd/device/nic/routed: Switches to network.InterfaceExists for clarity
  • lxd/device/nic/routed: Remove host side veth interface if exists in postStop
  • lxd/network/driver/ovn: Adds support for physical uplink interface to be a bridge
  • lxd/db/networks: Corrects comment on GetCreatedNetworks
  • lxd/network/driver/physical: Clarify error when changing parent interface when in use
  • lxd/network/driver/bridge: Don't apply updates to node when network is pending
  • lxd/network/driver: Don't apply changes to node if network is pending
  • lxd/storage/backend/lxd: Only apply local node changes if both pool and node status are not pending
  • lxc/image: Add support for directly getting, setting and unsetting image properties
  • i18n: Update translation templates
  • lxd/db/cluster/update: Modifies updateFromV43 and updateFromV42 to use IFNULL(node_id, -1) to avoid nodes with 0 ID
  • lxd/db/cluster: Adds updateFromV43 patch that adds unique index to storage_pools_config and networks_config table
  • doc: features.networks is not enabled by default for projects
  • shared/util: Adds StringHasPrefix function
  • lxd/device/disk: Adds sourceIsLocalPath function
  • lxd/device/disk: Use shared.StringHasPrefix when validating ceph/cephfs prefixes
  • lxd/device/disk: Use d.sourceIsLocalPath when validating source host path exists
  • lxd/instance/qemu: Enable multiqueue on tap NICs
  • lxd/instance/qemu: Use a minimum of 2 network queues
  • lxd/storage/drivers/driver/zfs/volumes: Error quoting in RestoreVolume
  • lxd/storage/backend/lxd: Don't fail in DeleteInstanceSnapshot if volume DB record already deleted
  • lxd/storage/backend/lxd: Fix deleting subsequent snapshots for ZFS in RestoreInstanceSnapshot
  • lxd/instances/post: Use source.Project when loading instance to get instance type in containersPost
  • lxd/instances/post: Rename project to targetProject to differentiate between source.Project in containersPost
  • lxd/instances/post: Error quoting in containersPost
  • lxd/instances/post: Add comment about default instance type for migration in containersPost
  • lxd/instances/project: Import project package normally and rename project var to projectName
  • lxd/instances/post: Populate req.Source.Project with project.Default if not specified in containersPost
  • test/suites/projects: Adds tests for copying snapshot to another project
  • doc/image-handling: Fix typo
  • shared/proxy: Support CIDR ranges in no_proxy
  • simplestreams: Drop duplicated slash
  • lxd/instance/drivers/qmp: Fix race in Disconnect
  • test/suites/static/analysis: Fixes ineffassign usage due to upstream changes
  • lxd/instance: Copy snapshot expiry in instanceCreateAsCopy
  • lxd/migration: Rebuilds protobuf using protoc v3.14 and latest google.golang.org/protobuf/cmd/protoc-gen-go
  • lxd/migration: Adds expiry_date field to snapshots protobuf
  • lxd/migrate/instance: Populate expiry date in snapshotToProtobuf
  • lxd/migrate/storage/volumes: Populate zero expiry date in volumeSnapshotToProtobuf
  • lxd/storage/migration: Populate expiry date in snapshotProtobufToInstanceArgs
  • lxd/migration/migration/volumes: Updates TypesToHeader and MatchTypes to use a pointer to MigrationHeader
  • lxd/migrate/instance: Avoid copying migration.MigrationHeader due to new internal state lock added by protobuf
  • lxd/migrate/storage/volumes: Avoid copying migration.MigrationHeader due to new internal state lock added by protobuf
  • lxd/migrate/instance: Fix snapshotToProtobuf to not use loop pointer for device name
  • lxd/storage/migration: Conistently use accessor functions in snapshotProtobufToInstanceArgs
  • test/suites/snapshots: Adds test for local copy of snapshot expiry date
  • test/suites/migration: Adds test for copying snapshot expiry date during migration
  • test/suites/migration: Adds test to ensure snapshot devices are copied during migration
  • lxd/storage/quota/projectquota: Consistent comment endings and error quoting
  • lxd/storage/drivers/driver/dir/utils: Updates setQuota to remove old quota if volID has changed
  • lxd/storage/drivers/driver/dir/utils: Modifies setupInitialQuota to not use initQuota
  • lxd/api/internal: Updates internalImportFromRecovery to reinitialise root disk quota
  • lxd/network/openvswitch/ovn: Adds mayExist argument to LogicalRouterAdd
  • lxd/network/openvswitch/ovn: Adds mayExist argument to LogicalRouterSNATAdd
  • lxd/network/openvswitch/ovn: Simplifies LogicalRouterRouteAdd
  • lxd/network/openvswitch/ovn: Adds mayExist argument to LogicalRouterPortAdd
  • lxd/network/openvswitch/ovn: Adds LogicalRouterSNATDeleteAll function
  • lxd/network/openvswitch/ovn: Clear unused keys in LogicalSwitchSetIPAllocation
  • lxd/network/openvswitch/ovn: Adds support for clearing unused settings in LogicalRouterPortSetIPv6Advertisements
  • lxd/network/openvswitch/ovn: Adds LogicalRouterPortDeleteIPv6Advertisements function
  • lxd/network/driver/ovn: Enforce that ipv6.address if specified is at least a /64 subnet
  • lxd/network/driver/ovn: Pass update flag to mayExist where possible
  • lxd/network/driver/ovn: Delete SNAT rules from route before adding new ones
  • lxd/network/driver/ovn: Improve SNAT failure errors
  • lxd/network/driver/ovn: Pass update to mayExists when setting up default routes
  • lxd/network/driver/ovn: Create internal router port before DHCP option setup
  • lxd/network/driver/ovn: Modifies IPv6 RA settings and removes them entirely when IPv6 disabled
  • lxd/network/driver/ovn: Don't return DHCPv6 subnet if IPv6 prefix smaller than /64
  • lxd: Rename Operation types
  • lxd/db: Rename operation type descriptions
  • lxd/network/network/interface: Adds handleDependencyChange function
  • lxd/network/driver/common: Adds notifyDependentNetworks function and no-op placeholder handleDependencyChange function
  • lxd/network/driver/ovn: Adds handleDependencyChange function
  • lxd/network/driver/physical: Calls notifyDependentNetworks when config is updated
  • lxd/network/openvswitch/ovn: Adds LogicalRouterDNATSNATDeleteAll function
  • lxd/network/openvswitch/ovn: Clarifies DNAT_AND_SNAT related function comments
  • lxd/network/openvswitch/ovn: Adds LogicalSwitchPortExists function
  • lxd/network/driver/ovn: Moves instance NIC port config parsing into InstanceDevicePortConfigParse function
  • lxd/network/driver/ovn: Updates InstanceDevicePortAdd to accept an uplinkConfig argument
  • lxd/network/driver/ovn: Clarifies argument names in the context of an OVN dependent network in handleDependencyChange
  • lxd/network/driver/ovn: Updates handleDependencyChange to handle changes to uplink network's ovn.ingress_mode setting
  • lxd/device/nic/ovn: Updates NIC to use d.network.InstanceDevicePortConfigParse and updated d.network.InstanceDevicePortAdd
  • lxd/resources: Always initialize lists
  • lxd/storage/utils: Improves error message in VolumeUsedByExclusiveRemoteInstancesWithProfiles
  • lxd/db/instances: Updates InstanceList to accept filter to pass to GetInstances()
  • lxd/db/instances: Clarifies comment and arg name on GetLocalInstancesInProject
  • lxd/db/instances/test: cluster.InstanceList usage
  • lxd/storage/utils: s.Cluster.InstanceList usage
  • lxd/network/driver/ovn: n.state.Cluster.InstanceList usage
  • lxd/patches: InstanceList usage
  • lxd/network/network/utils/sriov: Adds SR-IOV allocation functions
  • lxd/network/network/utils/sriov: Updates SRIOVGetHostDevicesInUse to use InstanceList()
  • lxd/network/network/utils/sriov: Adds network usage support to SRIOVGetHostDevicesInUse
  • lxd/network/network/utils/sriov: SRIOVGetHostDevicesInUse usage
  • lxd/network/network/utils/sriov: Updates SRIOVFindFreeVirtualFunction args to not need Device
  • lxd/network/network/utils/sriov: Adds SRIOVGetVFDevicePCISlot function
  • lxd/network/network/utils: Adds InterfaceBindWait function
  • lxd/device/pci: Adds PCI device management package
  • lxd/device/infiniband/sriov: SRIOV network function usage
  • lxd/device/nic/physical: Use pci package
  • lxd/device/gpu: Use pci package
  • lxd/device/nic/sriov: network.InterfaceBindWait
  • lxd/device/nic/sriov: Use pci package
  • lxd/device/nic/sriov: SRIOV network function usage
  • lxd/device/nic/sriov: Comment clarity in setupSriovParent
  • lxd/device/nic/sriov: Removes networkGetVFDevicePCISlot function
  • lxd/device/device/utils/generic: Removes pci functions
  • lxd/device/device/utils/network: Removes networkInterfaceBindWait function
  • lxd/device/device/utils/instance: Removes instanceGetReservedDevices function
  • lxd/network/driver/bridge: Comment improvements
  • lxd/network/driver/ovn: Updates addChassisGroupEntry to generate chassis priority using stable random value
  • i18n: Update translations from weblate
  • lxd/init: Clarify https listener question
  • doc: Fixes typo in macvlan NIC section

Try it for yourself

This new LXD release is already available for you to try on our demo service.

Downloads

The release tarballs can be found on our download page.

Binary builds are also available for:

  • Linux: snap install lxd
  • MacOS: brew install lxc
  • Windows: choco install lxc

LXD 4.9 has been released

11th of December 2020

Introduction

The LXD team is very excited to announce the release of LXD 4.9!

This comes with a few contributions from students of the University of Texas in Austin:

  • limits.instances project config key
  • qemu driver and version listed in server environment
  • IOMMU groups listed in the resources API
  • user. config keys in the server config

On top of that, we're adding support for mediated devices GPU passthrough, some major improvements on lifecycle events, a few more additions to the resources API, zstd compression support and a variety of new options for those using OVN.

Enjoy!

New features and highlights

Mediated GPU devices for Virtual Machines

LXD now supports allocating mediated devices from GPUs supporting it and attaching the resulting device to a virtual machine.

This is done through the introduction of a new gputype key for gpu devices which currently supports:

  • physical (entire GPU, pre-existing default behavior)
  • mdev compined with the additional mdev key to specify the profile

lxc info --resources also now lists mdev profiles.

GPU:
  NUMA node: 0
  Vendor: Intel Corporation (8086)
  Product: HD Graphics 620 (5916)
  PCI address: 0000:00:02.0
  Driver: i915 (5.8.0-29-generic)
  DRM:
    ID: 0
    Card: card0 (226:0)
    Control: controlD64 (226:0)
    Render: renderD128 (226:128)
  Mdev profiles:
    - i915-GVTg_V5_4 (1 available)
        low_gm_size: 128MB
        high_gm_size: 512MB
        fence: 4
        resolution: 1920x1200
        weight: 4
    - i915-GVTg_V5_8 (2 available)
        low_gm_size: 64MB
        high_gm_size: 384MB
        fence: 4
        resolution: 1024x768
        weight: 2

IOMMU groups for PCI devices

Each device in the PCI section of the resource API (/1.0/resources) now has an iommu_group key to indicate the ID of its IOMMU group.

This is quite useful to look at the IOMMU topology prior to adding passthrough network or GPU devices to a virtual machine.

stgraber@castiana:~$ lxc query /1.0/resources | jq .pci.devices[-1]
{
  "driver": "xhci_hcd",
  "driver_version": "5.8.0-29-generic",
  "iommu_group": 16,
  "numa_node": 0,
  "pci_address": "0000:3c:00.0",
  "product": "JHL6540 Thunderbolt 3 USB Controller (C step) [Alpine Ridge 4C 2016]",
  "product_id": "15d4",
  "vendor": "Intel Corporation",
  "vendor_id": "8086"
}

QEMU version in server environment information

The version of QEMU on the system is now included in the driver and driver_version fields as is visible in lxc info.

stgraber@castiana:~$ lxc info | grep " driver"
  driver: lxc | qemu
  driver_version: 4.0.0 (devel) | 5.2.0

Improved lifecycle events

The set of lifecycle events has been reworked and expanded.

The complete list supported at this point is:

  • instance-created
  • instance-renamed
  • instance-deleted
  • instance-updated
  • instance-started
  • instance-stopped
  • instance-shutdown
  • instance-restarted
  • instance-paused
  • instance-resumed
  • instance-snapshot-create
  • instance-snapshot-renamed
  • instance-snapshot-deleted
  • instance-restored
  • instance-backup-created (new)
  • instance-backup-renamed (new)
  • instance-backup-deleted (new)
  • network-created (new)
  • network-updated (new)
  • network-renamed (new)
  • network-deleted (new)

As you may notice, instance is now used consistently rather than mixing in legacy container and virtual-machine prefixes. Some gaps were filled around the lack of events for backups and initial coverage for network events was added too.

user. keys allowed on all objects

With this release, user. keys can now be used in every LXD object which holds configuration. Those keys are particularly useful for external orchestration or monitoring systems that need to store some additional context.

We had recently made those keys allowed on all objects except for the server itself, this has now been resolved.

stgraber@castiana:~$ lxc config set user.foo bar
stgraber@castiana:~$ lxc config get user.foo
bar

usb_address and pci_address properties in USB/network resources

A new usb_address field has now been added to both network and storage devices in the sources API. It will be populated by the <bus>:<dev> of the device when it's USB attached. This is very similar to pci_address for PCI devices.

At the same time, the missing pci_address field was added to storage devices.

stgraber@castiana:~$ lxc query /1.0/resources | jq .storage.disks[-1]
{
  "block_size": 512,
  "device": "8:0",
  "device_id": "usb-Kingston_DataTraveler_3.0_08606E6B6612BE50D7168119-0:0",
  "device_path": "pci-0000:00:14.0-usb-0:1:1.0-scsi-0:0:0:0",
  "firmware_version": "PMAP",
  "id": "sda",
  "model": "DataTraveler 3.0",
  "numa_node": 0,
  "partitions": [
    {
      "device": "8:1",
      "id": "sda1",
      "partition": 1,
      "read_only": false,
      "size": 7863254528
    }
  ],
  "read_only": false,
  "removable": true,
  "rpm": 0,
  "serial": "08606E6B6612BE50D7168119",
  "size": 7864320000,
  "type": "usb",
  "usb_address": "2:7"
}

ipv4.dhcp and ipv6.dhcp on OVN networks

It's now possible to disable IPv4 and/or IPv6 DHCP on an OVN network.

This is done through the same ipv4.dhcp and ipv6.dhcp keys as used on traditional managed bridges.

ovn.ingress_mode on physical networks

When allocating external addresses or subnets to an OVN network, something needs to tell the upstream gateway that the particular OVN router is responsible for that traffic.

Up until now, we have been using an L2 proxy, effectively causing OVN to respond to ARP/NDP packets on the uplink network for any address that it is responsible for on its network and instances.

This works great in many cases and avoids having to externally setup routes, but it requires individual address records in OVN itself which doesn't scale particularly well on large subnets (think /24 IPv4 or /64 IPv6).

For those cases, a new config key called ovn.ingress_mode has been added and can now be set to routed, indicating that the upstream router knows what subnet goes to what OVN router and OVN can therefore skip having to individually handle every single address.

This can then be combined with something like https://github.com/stgraber/lxd-bgp to use a dynamic routing protocol with the upstream router to automatically setup the needed routes to the relevant OVN routers.

ipv4.routes.anycast and ipv6.routes.anycast on physical networks

Somewhat related to the previous entry, two new keys have been added to allow bypassing a check that LXD performs on routed subnets.

Out of the box, we prevent a given subnet being used to back two networks or to be assigned to two instances at once. However, with support for external routing and dynamic routing comes the ability to do anycast.

In environment where this is supported, the ipv4.routes.anycast and ipv6.routes.anycast keys may now be set to true, bypassing the duplicate subnet check and allowing two instances to hold the same public address, leaving it up to the upstream router to decide which gets the traffic.

limits.instances project option

A new limit now joins limits.containers and limits.virtual-machines on projects. limits.instances allows setting an overall limit on the number of instances in a project, regardless of type.

You can therefore now use:

  • limits.instances: 5
  • limits.containers: 5
  • limits.virtual-machines: 2

To allow a given project to have only up to 5 instances, all of which can be containers but only 2 of which can be virtual machines.

zstd compression for images and backups

The zstd is now supported for both images and backups.

This can be set through images.compression_algorithm, backups.compression_algorithm or be directly specified through --compression to lxc publish or lxc export.

Complete changelog

Here is a complete list of all changes in this release:

  • lxd/api/project: Reject quotes in project names
  • lxd/instance/drivers/driver/lxc: Updates initLXC to use project and instance name in callhook hook commands
  • lxd/instance/drivers/driver/lxc: Updates startCommon to quote hook command arguments
  • lxd/main/callhook: Updates cmdCallhook to support using project name and instance name in arguments
  • lxd/api/internal: Adds support for using instance name and project name in container hook routes
  • lxd/storage: Apply rename template
  • lxd/patches: Adds patchVMRenameUUIDKey patch to rename config key from volatile.vm.uuid to volatile.uuid
  • shared/validate: Adds IsUUID function
  • shared/instance: Adds volatile.uuid key to instance validation
  • shared/instance: Removes vm.uuid from instance validation in ConfigKeyChecker
  • doc/instances: Replaces volatile.vm.uuid with volatile.uuid
  • lxd/instance/drivers/driver/qemu: Updates Start to use and populate volatile.uuid instead of volatile.vm.uuid
  • lxd/instance/drivers/driver/lxc: Generate instance UUID if not set in startCommon
  • lxd/instance/drivers/driver/qemu: Makes UUID generation terminology consistent with container
  • lxc/list: Fix typo in help
  • i18n: Update translation templates
  • lxc/list: Add two new columns (memory % and CPU)
  • i18n: Update translation templates
  • doc: fix typos in instances.md
  • lxd/storage/drivers/driver/zfs/volumes: Remove workarounds for snapshot volume mounting
  • lxd/refcount: Adds ref counting package
  • lxd/storage/drivers/volume: Adds ref counting functions
  • lxd/storage/drivers/volume: Updates MountTask to use new MountVolume signature
  • lxd/storage/pool/interface: Removes OurMount from MountInfo struct
  • lxd/storage/pool/interface: Removes "our mount" bool return value from MountCustomVolume
  • lxd/storage/drivers/interface: Removes "our mount" bool return value from MountVolume
  • lxd/storage/drivers/errors: Adds ErrInUse error
  • lxd/storage/drivers/drivers/mock: Updates MountVolume signature
  • lxd/storage/drivers/utils: Error quoting in shrinkFileSystem
  • lxd/storage/drivers/driver/btrfs/volumes: Updates MountVolume signature
  • lxd/storage/drivers/driver/ceph/volumes: Adds ref counting to MountVolume and UnmountVolume
  • lxd/storage/drivers/driver/cephfs/volumes: Updates MountVolume signature
  • lxd/storage/drivers/driver/dir/volumes: Updates MountVolume signature
  • lxd/storage/drivers/driver/lvm/volumes: Adds ref counting to MountVolume and UnmountVolume
  • lxd/storage/drivers/driver/zfs/volumes: Adds ref counting to MountVolume and UnmountVolume
  • lxd/storage/drivers/generic/vfs: Updates genericVFSBackupUnpack to use new MountVolume signature
  • lxd/storage/utils: Adds InstanceMount and InstanceUnmount and updates InstanceDiskBlockSize to use them
  • lxd/storage/backend/mock: Removes OurMount
  • lxd/storage/backend/mock: Removes "our mount" bool return value from MountCustomVolume
  • lxd/storage/backend/lxd: Updates mount functions to remove OurMount and use new MountVolume signature
  • lxd/storage/backend/lxd/patches: b.driver.MountVolume usage
  • lxd/instance/drivers/driver: Unexports common restart function
  • lxd/instance/instance/interface: Removes deprecated StorageStart and StorageStop functions
  • lxd/instance/drivers/driver/common: Import ordering
  • lxd/instance/drivers/driver/lxc: Updates mount usage with ref counting in mind
  • lxd/instance/drivers/driver/lxc: Removes deprecated StorageStart and StorageStop
  • lxd/instance/drivers/driver/qemu: Updates mount usage with ref counting in mind
  • lxd/instance/drivers/driver/qemu: Implements RegisterDevices
  • lxd/instance/drivers/driver/qemu: Removes deprecated StorageStart and StorageStop
  • lxd/patches: Updates instance mount usage
  • lxd/instance/metadata: Removes use of c.StorageStart and c.StorageStop
  • lxd/instance/test: Removes use of StorageStart
  • lxd/instance: Updates instanceCreateAsSnapshot to use updated mount functions
  • lxd/devices: Register devices on all instance types
  • lxd/device/disk: Implements Register function
  • lxd/device/disk: Updates mount function usage in mountPoolVolume
  • lxd/instance/drivers/driver/qemu: mount fixes
  • lxd/storage/backend/lxd: Adds revert to MountInstance
  • lxd/storage/drivers/driver/ceph/volumes: Adds revert to MountVolume
  • lxd/storage/drivers/driver/lvm/volumes: Adds revert to MountVolume
  • lxd/storage/drivers/driver/zfs/volumes: Adds revert to CreateVolumeFromBackup
  • lxd/storage/drivers/driver/zfs/volumes: Adds revert to MountVolume
  • lxd/storage/drivers/driver/zfs/volumes: Simplifies MountVolumeSnapshot and adds revert for parent volume mount
  • lxd/storage/drivers/generic/vfs: Adds revert to genericVFSBackupUnpack
  • lxd/api/internal: Adds internalImportFromRecovery function for instance recovery import
  • lxd/instances/post: Updates createFromBackup to use updated internalImport signature
  • lxd/device/disk comments
  • test/suites/backup: Updates lxd import tests to expect instance to be unmounted after import
  • lxd/instance/drivers/driver/lxc: Moves instance mount before idmap related var loading
  • lxd/instance/drivers/driver/lxc: Rotate log file same stage as VM for consistency
  • lxd/instance/drivers/driver/qemu: Use instance.LoadByProjectAndName in getMonitorEventHandler
  • test: Updates container_import tests to remove lxd import followed by kill and start test
  • lxd/storage/backend/lxd: Detect unsupported live copy of VMs and fail with clear message
  • lxd/instance/lxc: Add extra check for devpts_fd
  • lxd/device/nic/ovn: Removes unused Add function
  • lxd/device/nic/bridged: Clarifies when device's Add function is called
  • lxd/migrate/instance: Improves comments when instantiating migration.VolumeTargetArgs
  • lxd/storage/backend/lxd: Improves comments when instantiating migration.VolumeTargetArgs
  • lxd/storage/backend/lxd: Reject custom volume config if supplied in CreateInstanceFromMigration
  • lxd/storage/drivers/driver/zfs/volumes: Use srcVol.NewVMBlockFilesystemVolume in CreateVolumeFromCopy
  • lxd/storage/drivers/driver/zfs/volumes: Apply filesystem quota in CreateVolumeFromMigration
  • lxd/storage/drivers/driver/btrfs/volumes: Apply quota in CreateVolumeFromMigration
  • lxd/storage/drivers/driver: Makes size update consistent with other drivers in UpdateVolume
  • lxd/storage/drivers/driver/cephfs/volumes: Use vol.ConfigSize() rather than vol.ExpandedConfig("size") for consistency with other drivers
  • lxd/storage/drivers/driver/cephfs/volumes: Makes CreateVolumeFromMigration volume quota setting consistent with other non-block-backed drivers
  • lxd/ap/internal: Improved error messages from instanceCreateInternal
  • lxd/instance: Improved error messages from instanceCreateInternal
  • lxd/instances/post: Improved error messages from instanceCreateInternal
  • lxd/migrate/instance: Improved error messages from instanceCreateInternal
  • lxd/device/disk: Only validate external disk source paths when real instance is loaded
  • lxd/instance/drivers/driver/lxc: Remove user facing reference to "common start logic" in error
  • lxd/instance/drivers/driver: Just log device add failures when adding device in non-user requested context
  • lxd/instance/drivers/driver/lxc: Pass existing isRunning to c.updateDevices to avoid extra call to IsRunning()
  • shared: Allow volatile uuid config keys
  • lxd/instance/drivers: Support vgpu in qemu template
  • lxd/instance/drivers: Support vgpu in VMs
  • lxd/device/nic/sriov: Don't fail when resetting VF MAC to 00:00:00:00:00:00
  • lxd/device/config: Allow gputype property
  • lxd/device: Support mdev GPUs
  • doc: Document mdev config key
  • api: Add gpu_mdev
  • lxc/info: Show mdev profiles
  • po: Update translation
  • lxd/images: Replace fp with fingerprint in logs
  • lxd/daemon/images: Add contextual logging and use "fingerprint" rather than "image" for consistency with other code areas
  • lxd/profiles/utils: Remove container references, improve comments
  • lxd/db/profiles: Updates GetInstancesWithProfile to return all instance types, not just containers
  • shared/instance: Improves comments
  • lxd/project/project: Adds ProfileProject and ProfileProjectFromRecord functions
  • lxd/profiles: Use project.ProfileProject instead of tx.ProjectHasProfiles
  • test/suites/projects: Fix bug in test that assumed project wasnt checked for existance
  • lxd/profiles/utils: Updates doProfileUpdate and doProfileUpdateCluster to return project and instance name in error
  • lxd/device/device/interface: Moves updatable fields from CanHotPlug() into UpdatableFields()
  • lxd/device/errors: Adds ErrCannotUpdate error
  • lxd/device/device/common: Updates common implementation of CanHotPlug() and UpdatableFields()
  • lxd/device/disk: Adds UpdatableFields function based on instance type
  • lxd/device/disk: Only apply running IO limits to containers in Update
  • lxd/device/nic/bridged: Adds UpdatableFields function and removes custom CanHotPlug function
  • lxd/device/nic/ipvlan: Updates CanHotPlug function
  • lxd/device/nic/ovn: Removes custom CanHotPlug function
  • lxd/device/nic/p2p: Removes custom CanHotPlug function and adds UpdatableFields function
  • lxd/device/nic/routed: Splits CanHotPlug function into new CanHotPlug and UpdatableFields functions
  • lxd/instance/drivers/driver/lxc: Updates device management functions to use new CanHotPlug and UpdatableFields functions
  • lxd/instance/drivers/driver/qemu: Updates device management functions to use new CanHotPlug and UpdatableFields functions
  • lxd/device/config/devices/sort: Improves comments in Less
  • lxd/device/disk: Removes use of global logger and use device contextual logger
  • lxd/device/disk: Rework volatile apply_quota key handling to support virtual machines
  • lxd/refcount: Adds Get function
  • lxd/storage/backend/lxd: Removes dependence on RunningQuotaResize in SetInstanceQuota
  • lxd/storage/backend/lxd: Removes dependence on RunningQuotaResize in UpdateCustomVolume
  • lxd/storage/errors: Removes ErrRunningQuotaResizeNotSupported
  • lxd/storage/drivers/volume: Adds MountInUse function
  • lxd/storage/drivers/utils: Adds vol.MountInUse usage to ensureVolumeBlockFile
  • lxd/storage/drivers/utils: Adds filesystemTypeCanBeShrunk and updates shrinkFileSystem to use it
  • lxd/storage/drivers/utils: Updates growFileSystem to use DefaultFilesystem
  • lxd/storage/drivers/driver/types: Removes RunningQuotaResize
  • lxd/storage/drivers: Renames drivers_mock.go to driver_mock.go to align with other driver naming
  • lxd/storage/drivers/driver/mock: Removes RunningQuotaResize
  • lxd/storage/drivers/driver/btrfs: Updates BTRFS to use ensureVolumeBlockFile's in-use detection
  • lxd/storage/drivers/driver/dir: Updates to use ensureVolumeBlockFile's in-use detection
  • lxd/storage/drivers/driver/ceph/utils: Adds resizeVolume function
  • lxd/storage/drivers/driver/ceph: Removes RunningQuotaResize
  • lxd/storage/drivers/driver/ceph/volumes: Reworks SetVolumeQuota to be more aligned with LVM driver structure
  • lxd/storage/drivers/driver/cephfs: Removes RunningQuotaResize
  • lxd/storage/drivers/driver/lvm: Removes RunningQuotaResize
  • lxd/storage/drivers/driver/lvm/volumes: Updates SetVolumeQuota to use Volume's in-use detection
  • lxd/storage/drivers/driver/zfs: Removes RunningQuotaResize
  • lxd/storage/drivers/driver/zfs/volumes: Updates SetVolumeQuota to use Volume's in-use detection
  • lxd/storage/utils: Updates validatePoolCommonRules to differentiate VM volumes and filesystem volumes
  • lxd/instance: Error quoting and logging improvements in instanceCreateInternal
  • lxd/instance/drivers/driver/lxc: Adds revert to lxcCreate
  • lxd/instance/drivers/driver/qemu: Adds revert to qemuCreate
  • lxd/storage/backend/lxd: Set the correct volume content type for custom volumes
  • lxc/info: Extend mdev details
  • i18n: Update translation templates
  • lxd/device/disk: Ignore ErrNotRunning for virtfs-proxy-helper
  • lxd/patches/utils: Adds legacy volumeFillDefault function for patches
  • lxd/patches: Updates patches to switch from driver.VolumeFillDefault to volumeFillDefault
  • lxd/storage/drivers/interface: Adds FillVolumeConfig
  • lxd/storage/drivers/driver/common: Adds FillVolumeConfig no-op for common drivers
  • lxd/storage/drivers/driver/{ceph,lvm}: Adds FillVolumeConfig function to populate default filesystem settings
  • lxd/storage/utils: Updates VolumeDBCreate to accept a Pool and call driver.FillVolumeConfig
  • lxd/storage/backend/lxd: VolumeDBCreate usage
  • lxd/storage/utils: Removes VolumeFillDefault and VolumeValidateConfig
  • lxd/storage/pool/interface: Adds FillInstanceConfig
  • lxd/storage/backend/lxd: Implements FillInstanceConfig
  • lxd/storage/backend/mock: Adds FillInstanceConfig
  • lxd/instance/drivers/driver/lxc: Updates lxcCreate to use storagePool.FillInstanceConfig
  • lxd/instance/drivers/driver/qemu: Updates qemuCreate to use storagePool.FillInstanceConfig
  • lxd/instance/drivers: Better errors in instance create functions
  • lxd/storage/backend/mock: Return storage pool ID 1 rather than -1 to allow tests to run
  • lxd/network/openvswitch/ovs: Adds InterfaceAssociatedOVNSwitchPort function
  • lxd/network/driver/ovn: Updates Instance port functions to use instance UUID rather than instance ID
  • lxd/network/driver/ovn: Updates InstanceDevicePortDelete to accept an instance UUID and a ovsExternalOVNPort hint
  • lxd/device/nic/ovn: Update ovnNet interface to use instance UUIDs.
  • lxd/device/nic/ovn: Use volatile.uuid instance UUID rather than instance ID for OVN switch port name
  • lxd/device/nic/ovn: No need for intermediate v variable
  • lxd/device/nic/ovn: Updates Stop to pass instance UUID and an OVS external OVN switch port hint to InstanceDevicePortDelete
  • lxd/instance/qemu: Always render disk
  • Support zstd compression.
  • api: add resources_pci_iommu extension
  • lxd-agent: Don't rely on systemd for rebooting
  • lxd/instance: Move id field to common
  • lxd/instance/common: Use 'd' as main variable
  • lxd/instance/qemu: Rename d to dev
  • lxd/instance/qemu: Replace vm with d
  • lxd/instance/lxc: Rename d to dev
  • lxd/instance/lxc: Replace c with d
  • lxd/isntance: Move most properties to common
  • lxd/instance: Move common functions to drive_common
  • shared/instance: golint fixes
  • shared/instance: Adds ConfigVolatilePrefix constant
  • shared/instance: ConfigVolatilePrefix usage
  • shared/instance: Adds InstanceIncludeWhenCopying function
  • lxd/copy: shared.InstanceIncludeWhenCopying usage in copyInstance
  • lxc: shared.ConfigVolatilePrefix usage
  • lxd: shared.ConfigVolatilePrefix usage
  • lxd/instances/post: shared.InstanceIncludeWhenCopying usage in createFromCopy
  • lxd/storage: Add volatile idmap setting debug log to resetContainerDiskIdmap
  • lxd/device/disk: Include network-config in cidata
  • lxd/resources: Add GetNetworkState and GetNetworkCounters
  • shared/api: Add IOMMUGroup field to ResourcesPCIDevice
  • Add IOMMU group value to PCI devices
  • lxd/storage/pools/utils: Updates comment and error for storagePoolCreateLocal
  • lxd/storage/pools: Error quoting
  • lxd/db/cluster: Adds state column to networks_nodes table and set existing rows to state=1 (created)
  • lxd/db/networks: Populate node state column in NetworkNodeJoin
  • lxd/db/networks: Populate node state column in CreatePendingNetwork
  • lxd/db/networks: Adds networkNodeState and NetworkNodeCreated functiond
  • lxd/db/networks: Comments
  • lxd/db/networks: Populate node state column in CreateNetwork
  • lxd/network/driver: Remove check that prevents starting network in pending state
  • lxd/networks: Whitespace
  • lxd/network/network/interface: Updates init to take api.Network and network nodes map
  • lxd/network/network/interface: Adds LocalStatus
  • lxd/network/network/load: Updates LoadByName to pass network nodes from s.Cluster.GetNetworkInAnyState to init()
  • lxd/db/networks: Adds NetworkState type and uses it in place of int
  • lxd/db/networks: Renames networkFillStatus to NetworkStateToAPIStatus
  • lxd/db/networks: Adds NetworkNode type
  • lxd/db/networks: Exports NetworkNodes and updates to return map of NetworkNodes
  • lxd/db/networks: Updates GetNonPendingNetworks usage of NetworkNodes()
  • lxd/db/networks: Modifies getNetwork and GetNetworkInAnyState to return map of NetworkNodes for network
  • lxd/db/networks: Exports NetworkNodes
  • lxd/db/networks: c.GetNetworkInAnyState usage
  • lxd/db/networks: Updates comments to reference state constants
  • lxd/patches: d.cluster.GetNetworkInAnyState usage
  • lxd/api/cluster: d.cluster.GetNetworkInAnyState usage
  • lxd/api/project: s.Cluster.GetNetworkInAnyState usage
  • lxd/device/nic: d.state.Cluster.GetNetworkInAnyState usage
  • lxd/network/driver/ovn: n.state.Cluster.GetNetworkInAnyState usage
  • lxd/network/driver/common: Adds LocalStatus function and store node info inside network via init()
  • lxd/network/driver/bridge: Only perform local date if local status is api.NetworkStatusCreated
  • lxd/network/driver/ovn: Only perform local date if local status is api.NetworkStatusCreated
  • lxd/network/driver/physical: Only perform local date if local status is api.NetworkStatusCreated
  • lxd/networks: Updates doNetworksCreate to skip creation if node is already marked created
  • lxd/networks: d.cluster.GetNetworkInAnyState usage
  • lxd/networks: Don't skip network clean up if network is pending in networkDelete()
  • lxd/networks: d.cluster.GetNetworkInAnyState usage
  • lxd/networks: Updates networksPostCluster to only mark global network states as created once all nodes created
  • lxd/db/migration/test: cluster.GetNetworkInAnyState usage
  • lxd/network/network/interface: Adds IsManaged function
  • lxd/network/driver/common: Adds IsManaged function and associated internal variable
  • lxd/networks: Prevent rename of pending networks
  • lxd/networks: Reduce duplicate query loading network in networkPut and doNetworkUpdate
  • lxd/networks: Prevent update of global network config when network is pending in networkPut
  • lxd/network/driver/bridge: Adds some basic revert to setup()
  • lxd/network/driver/bridge: Only initialise revert if config has changed
  • lxd/network/driver: Only apply local DB change in Update() when local node is in pending state
  • lxd/network/driver/bridge: Fix incorrect return value
  • test/suites/clustering: Add network node state tests for bridge networking
  • lxd/instance: Use revert package in instanceCreateFromImage
  • lxd/storage/backend/lxd: Remove revert from CreateInstanceFromImage
  • lxd/storage/drivers/driver/common: Enable unsafe resize mode in runFiller when unpacking into image volumes
  • lxd/storage/drivers/driver/ceph/volume: Allow image resize when in unsafe mode in SetVolumeQuota
  • lxd/storage/drivers/driver/zfs/volume: Allow image resize when in unsafe mode in SetVolumeQuota
  • lxd/storage/backend/lxd: Log new volume size in CreateInstanceFromImage
  • lxd/instance/qemu: Follow symlink to lxd-agent
  • lxd/instance/qemu: Fix GPU passthrough
  • lxd/instance/operations: Allow Wait/Done on nil struct
  • lxd/instance/lxc: Improve use of operations
  • lxd/instance/lxc: Improve locking on file ops
  • lxd/instance/operations: Introduce CreateWaitGet
  • lxd/instance: Introduce restart tracking
  • Makefile: Fix golint URL
  • lxd/network/driver/bridge: Improve IP parsing errors
  • lxd/network/driver/bridge: Don't fill default config on update
  • lxd/network/driver/ovn: Improve IP parsing errors
  • lxd/network/driver/ovn: Don't fill default config on update
  • lxd/network/driver/bridge: Regenerate auto values on update
  • lxd/network/driver/ovn: Regenerate auto values on update
  • test/suites/network: Adds test for unsetting ipv4.address and ipv6.address
  • test/suites/network: Adds test for regeneration of auto values
  • doc/networks: Clarify bridge default auto values
  • doc/networks: Clarifies default values for ovn ranges settings
  • doc/networks: Clarify ovn default auto values
  • lxd/device/disk: Only validate disk source pool when an actual instance is set
  • test/suites/migration: Adds tests for copying instance with snapshots containing invalid disk devices
  • lxc-to-lxd: Fix handling on snap
  • lxd/instance: Bypass delete protection for internal calls
  • lxd/instance/qemu: Improve state handling
  • lxd/instance/operationlock: Allow Reset
  • lxd/instance/qemu: Stretch start/stop timeout
  • lxd/instance/qemu: Increase virtiofsd timeout to 10s
  • lxd/instance/qemu: Move more logic into qemuArchConfig
  • lxd/instance: Add Info function
  • lxd/instance: Add SupportedInstanceDrivers
  • lxd/instance: Add driver cache
  • lxd/api: Show all instance drivers
  • lxd/qemu: Don't stop processing events on shutdown
  • lxd/rbac: Improve access to user information
  • lxd/daemon: Improve request context
  • lxd/rbac: Move userIsAdmin and userHasPermission
  • lxd: Move to new RBAC helpers
  • lxd/storage/volumes: Replace hardcoded "filesystem" with db.StoragePoolVolumeContentTypeNameFS in storagePoolVolumesTypePost
  • lxd/storage/volumes: Error quoting in storagePoolVolumesTypePost
  • lxd/storage/volumes: Fixes misleading comment in storagePoolVolumesPost
  • lxd/storage/volumes: Set default volume content type to filesystem in storagePoolVolumesPost
  • lxd/storage/volumes: Error quoting in storagePoolVolumesPost
  • lxd/storage/utils: Align error returned from VolumeContentTypeNameToContentType with similar functions
  • lxd/storage/volumes: Removes stuttering in errors in storagePoolVolumesTypePost
  • lxd/networks: Use SmartError for response when loading networks
  • lxd/project: Add new FilterUsedBy helper
  • lxd: Filter all UsedBy based on RBAC
  • lxd/images: Fix incorrect RBAC on push
  • lxc/file: Fix typo in fileGetWrapper
  • i18n: Update translation templates
  • lxc/restore: Fix typo in help
  • i18n: Update translation templates
  • lxd/networks: Fix bad logging level
  • lxd/daemon: Fix bad permission check
  • lxd/storage/drivers/generic: Fix VM rename with ZFS
  • lxd/instance: Remove duplicate event
  • lxd/instance/common: Implement lifecycle wrapper
  • lxd/instance/lxc: Port to new wrapper
  • lxd/instance/lxc: Lock restore operations
  • lxd/instance/qemu: Port to new wrapper
  • lxd/instance/qemu: Lock restore operations
  • lxd/backup: Add lifecycle events
  • lxd/network: Add lifecycle function
  • lxd/network: Implement create wrapper
  • lxd/network: Add lifecycle events
  • lxd/cluster/request/clienttype: Moves client type constants and helper into own package
  • lxd/cluster/connect: Removes client type constants and helper
  • lxd: Updates use of ClientType now moved to cluster/request package
  • lxd/networks: Ensure etag generation uses its own copy of config in networkPut
  • lxd/network/driver: Takes NetworkStatus safety patch from stable-4.0 and applies to master
  • lxd/networks: Comment in networksPostCluster
  • lxd/networks: Corrects log level in networksPostCluster
  • lxd/networks: golint fix
  • lxd/db/networks: Removes unused NetworkErrored function
  • lxd/db/networks: Updates network state comments to indicate node usage
  • lxd/instance: Adds per-struct contextual logger.
  • lxd/instance/drivers: Fixes instanceType in instance logger
  • lxd/db/cluster: Adds state column to storage_pools_nodes table and set existing rows to state=1 (created)
  • lxd/db/storage/pools: Updates storage pool state comments to indicate node usage
  • lxd/db/storage/pools: Replace use of networkCreated with storagePoolCreated in getStoragePool
  • lxd/db/storage/pools: Set storage pool node state to created in UpdateStoragePoolAfterNodeJoin
  • lxd/db/storage/pools: Set storage pool node state to pending in CreatePendingStoragePool
  • lxd/db/storage/pools: Adds StoragePoolNodeCreated and storagePoolNodeState functions
  • lxd/db/storage/pools: Set storage pool node state to pending in CreateStoragePool
  • lxd/storage/pools/utils: Consistent commnent endings
  • lxd/storage/pools/utils: Fix comment in storagePoolCreateLocal
  • lxd/storage/pools: Add logging for storage pool state updates in storagePoolsPostCluster
  • lxd/storage/pools/utils: Updates storagePoolCreateLocal to mark local node state as created
  • lxd/db/storage/pools: Removes unused function StoragePoolErrored
  • lxd/db/storage/pools: Updates comment on StoragePoolCreated
  • lxd/storage/pools: Fix copy paste error in comment
  • lxd/storage/load: Updates GetPoolByName to use state.Cluster.GetStoragePoolInAnyState
  • lxc/storage: Adds --target flag support to cmdStorageSet
  • lxd/storage/pools: Adds doStoragePoolUpdate function
  • lxd/db/storage/pools: Adds StoragePoolState type and updates state constants to be of that type
  • lxd/db/storage/pools: Adds StoragePoolNode type
  • lxd/db/storage/pools: StoragePoolState usage
  • lxd/db/storage/pools: Adds storagePoolNodes function
  • lxd/db/storage/pools: Updates storage pool load functions to return nodes
  • lxd/db/storage/pools: Updates storagePoolNodes to return map of StoragePoolNode
  • lxd/db/storage/pools: c.GetStoragePoolInAnyState usage
  • shared/api/storage/pool: Adds storage pool status contants
  • lxd/db/storage/pools: Adds StoragePoolStateToAPIStatus and updates getStoragePool to use it
  • lxd/patches: d.cluster.GetStoragePoolInAnyState usage
  • lxd/api/cluster: d.cluster.GetStoragePoolInAnyState usage
  • lxd/backup/backup/config: c.GetStoragePool usage
  • lxd/daemon/storage: s.Cluster.GetStoragePool usage
  • lxd/device/disk: d.state.Cluster.GetStoragePool usage
  • lxd/instance/post: d.cluster.GetStoragePool usage
  • lxd/instances/post: d.cluster.GetStoragePoolInAnyState usage
  • lxd/storage/pools: d.cluster.GetStoragePoolInAnyState usage
  • lxd/storage/volumes: GetStoragePoolInAnyState usage
  • lxd/storage/volumes/backup: d.cluster.GetStoragePool usage
  • lxd/storage/volumes/snapshot: d.cluster.GetStoragePool usage
  • lxd/storage/pool/interface: Adds Description, Status and LocalStatus functions to definition
  • lxd/storage/backend/mock: Adds Description, Status and LocalStatus functions
  • lxd/storage/backend/lxd: Adds Description, Status, LocalStatus functions and adds nodes property
  • lxd/storage/load: state.Cluster.GetStoragePoolInAnyState usage and populates pool nodes in GetPoolByName
  • lxd/storage/pool/interface: Adds IsUsed and Create functions
  • lxd/storage/backend/lxd: Exports Create and adds IsUsed
  • lxd/storage/backend/mock: Adds IsUsed and Create
  • lxd/storage/load: Deprecates CreatePool
  • lxd/storage/load: Updates CreatePool to initialise empty node list
  • lxd/storage/pools/utils: Updates storagePoolCreateLocal to use GetPoolByName
  • lxd/storage/pools: Reworks storagePoolDelete to only delete locally if node has created state
  • lxd/db/migration/test: cluster.GetStoragePool usage
  • lxd/storage/pools: Reworks storagePoolPut and calls storagePoolPut from storagePoolPatch
  • lxd/storage/pools: Removes unused storagePoolValidateClusterConfig, storagePoolClusterConfigForEtag, storagePoolClusterFillWithNodeConfig functions
  • lxd/storage/pools/utils: Removes unused storagePoolUpdate
  • lxd/storage/backend/lxd: Reworks Update to only apply changes to local node if not pending
  • lxd/api/cluster: Updates client type usage to new package
  • lxd/storage/load: Updates deprecated CreatePool to use client type
  • lxd/patches: storagePools.CreatePool usage
  • lxd/storage/pool/interface: Replaces localOnly and driverOnly indicators with clientType
  • lxd/storage/backend/lxd: Replace localOnly and driverOnly with clientType
  • lxd/storage/backend/mock: Replace localOnly and driverOnly with clientType
  • lxd/storage/drivers/driver/ceph: Simplify Delete logic
  • lxd/storage/pools: Switch to clientType
  • lxd/storage/pools/utils: Switch to clientType
  • lxd/api/cluster: Removal special casing for ceph/cephfs
  • lxd/storage/backend/lxd: Adds protection against using a pending pool
  • lxd/storage: Adds target support to cmdStorageGet
  • lxd/storage/pools: Updates storagePoolsPostCluster to only forward non-node specific config
  • test/suites/clustering: Add pool node state tests
  • lxd/apparmor/qemu: Allow some more files
  • lxd/storage/drivers/drivers/zfs/volumes: Fixes 10s delay when using VMs with ZFS in snap
  • shared: Add IsUserConfig() utility function
  • lxd/config: Allow user keys in server config
  • lxd/storage/backend/lxd: Comment typo fix
  • lxd/storage/drivers/driver/btrfs/volumes: Enable allowUnsafeResize in CreateVolume when creating initial image volume
  • lxd/storage/drivers/utils: Updates ensureVolumeBlockFile to return unsupported when trying to resize image volume without allowUnsafeResize enabled
  • lxd/storage/utils: Ensure pool's volume.size is checked when unpacking images to pools that use file based images
  • lxd/instance/qemu: Deref OVMF path
  • lxc: Clarify --compression option
  • doc/image-handling: Update compression details
  • i18n: Update translation templates
  • lxd/rbac: Fix checks by matching proper name
  • api: Add resources_network_usb and resources_disk_address
  • shared/api: Add PCIAddress/USBAddress on network and storage
  • lxd/resources: Add PCIAddress/USBAddress for networks and disks
  • lxd/storage/drivers/utils: Modifies roundVolumeBlockFileSizeBytes to round up
  • lxd/storage/drivers/utils: roundVolumeBlockFileSizeBytes usage
  • lxd/storage/drivers/driver/zfs/utils: Use roundVolumeBlockFileSizeBytes in createVolume
  • lxd/storage/drivers/driver/zfs/volumes: Use roundVolumeBlockFileSizeBytes in CreateVolume
  • lxd/storage/drivers/driver/zfs/volumes: Use roundVolumeBlockFileSizeBytes in SetVolumeQuota
  • lxd/storage/backend/lxd: Use revert in CreateInstanceFromCopy
  • lxd/storage/backend/lxd: Don't fail in DeleteInstance if DB record already removed
  • lxd/instance: Use revert in instanceCreateAsCopy
  • lxd/storage/drivers/driver/ceph/volumes: Whitespace
  • lxd/storage/drivers/driver/ceph/volumes: Adds a hasVolume function that accepts an RBD volume name
  • lxd/storage/drivers/driver/ceph/volumes: Fixes issue in DeleteVolume that prevented image volume deletion if no readonly snapshot existed
  • lxd/storage/backend/lxd: Return error in EnsureImage when cannot delete orphaned volume
  • lxd/network/driver/ovn: Improve error message
  • lxd/network/driver/physical: Adds ovn.ingress_mode config key
  • lxd/network/driver/ovn: Updates uplinkRoutes to accept an *api.Network argument
  • lxd/network/driver/ovn: n.uplinkRoutes usage
  • lxd/network/driver/ovn: Moves subnet size validation into InstanceDevicePortValidateExternalRoutes
  • lxd/network/driver/ovn: Updates InstanceDevicePortAdd to only publish external IPs using DNAT when uplink l2proxy mode enabled
  • lxd/device/nic/ovn: Removes external subnet validation
  • doc/networks: Adds ovn.ingress_mode to physical networks
  • api: Adds network_physical_ovn_ingress_mode extensions
  • lxd/network/network/utils: Don't reference ourselves in UsedBy
  • lxd/network/driver/ovn: Only delete DNAT rules in InstanceDevicePortDelete if ingress mode is l2proxy
  • lxd/network/openvswitch/ovn: Exports LogicalSwitchDHCPOptionsDelete and adds optional UUID filter for deletion
  • lxc/network/driver/ovn: Adds ipv4.dhcp and ipv6.dhcp boolean settings
  • lxc/network/driver/ovn: Modifies setup to only activate DHCP/RA if its enabled on network
  • lxd/network/driver/ovn: Updates InstanceDevicePortAdd to respect DHCP options on network
  • lxd/network/driver/ovn: Updates DHCPv4Subnet and DHCPv6Subnet to use IP helper functions
  • api: Adds network_ovn_dhcp extension
  • doc/networks: Adds ipv4.dhcp and ipv6.dhcp docs for OVN networks
  • doc/networks: Mention DNSSEC setting
  • doc/networks: Adds ipv4.routes.anycast and ipv6.routes.anycast to physical networks
  • lxd/network/driver/physical: Adds ipv4.routes.anycast and ipv6.routes.anycast options
  • lxd/network/driver/ovn: Adds uplinkHasIngressRoutedAnycastIPv4 and uplinkHasIngressRoutedAnycastIPv6 functions
  • lxc/network/driver/ovn: Skip overlap detection of networks external subnets when uplink is in anycast routed ingress mode
  • lxd/network/driver/ovn: Skip NIC external route overlap detection when uplink is in anycast routed ingress mode
  • api: Adds network_physical_routes_anycast extension
  • tests: Add test for import after deleted snapshot
  • lxd/instances: Update backup file when deleting a snapshot
  • lxd/instance/lxc: Fix backup.yaml delete logic to trigger properly
  • lxd/instance/qemu: Also update backup.yaml on snapshot delete
  • lxd/instance/qemu: Update backup.yaml on startup
  • lxd/db/storage/pools: Comment wrapping
  • lxd/storage/backend/lxd: Prevent modification of source field on non-pending nodes
  • lxd/storage/drivers/driver/lvm: Comment typo
  • lxd/network/driver/ovn: Only add default route and SNAT rules to router after adding external router port
  • i18n: Update translations from weblate
  • doc/networks: Add missing escaping
  • lxd/apparmor/qemu: Allow ceph snap paths
  • doc: Adds limits.instances key description.
  • lxd/project: Adds 'limits.instances' configuration key
  • api: Add projects_limits_instances extension
  • doc/api-extensions: Fix escaping

Try it for yourself

This new LXD release is already available for you to try on our demo service.

Downloads

The release tarballs can be found on our download page.

Binary builds are also available for:

  • Linux: snap install lxd
  • MacOS: brew install lxc
  • Windows: choco install lxc

LXD 4.8 has been released

12th of November 2020

Introduction

The LXD team is very excited to announce the release of LXD 4.8!

This introduces vTPM and VirtioFS support, finishes our CGroup2 support and adds a few more useful features and improvements.

It also comes with much improved network and storage tracking and lifecycle to completely eliminate entire classes of race conditions as well as the usual pile of normal bugfixes.

Enjoy!

New features and highlights

vTPM support

A new tpm device type was added with support for both containers and virtual-machines. This uses a persistent swtpm instance and exposes the usual /dev/tpmX device inside of the instance.

stgraber@castiana:~$ lxc config device add tpm1 tpm tpm path=/dev/tpm0
Device tpm added to tpm1
stgraber@castiana:~$ lxc config device add tpm2 tpm tpm path=/dev/tpm0
Device tpm added to tpm2
stgraber@castiana:~$ lxc start tpm1 tpm2

stgraber@castiana:~$ lxc list tpm
+------+---------+------------------------+-------------------------------------------------+-----------------+-----------+
| NAME |  STATE  |          IPV4          |                      IPV6                       |      TYPE       | SNAPSHOTS |
+------+---------+------------------------+-------------------------------------------------+-----------------+-----------+
| tpm1 | RUNNING | 10.166.11.45 (eth0)    | fd42:4c81:5770:1eaf:216:3eff:fe95:4a5 (eth0)    | CONTAINER       | 0         |
+------+---------+------------------------+-------------------------------------------------+-----------------+-----------+
| tpm2 | RUNNING | 10.166.11.120 (enp5s0) | fd42:4c81:5770:1eaf:216:3eff:fe71:4323 (enp5s0) | VIRTUAL-MACHINE | 0         |
+------+---------+------------------------+-------------------------------------------------+-----------------+-----------+

stgraber@castiana:~$ lxc exec tpm1 -- tpm2_gettestresult
status:   success
stgraber@castiana:~$ lxc exec tpm2 -- tpm2_gettestresult
status:   success

VirtioFS support for virtual machines

Until now LXD has been using 9p as the transport for both the agent config drive as well as for any additional path being exposed to the virtual machine using a disk device.

While reliable and generally well supported, 9p isn't exactly fast. virtiofs is the new fast option for this and LXD is now exposing any attached drive through both 9p and virtiofs with the LXD agent using whichever is available inside the instance.

stgraber@castiana:~$ lxc init images:ubuntu/20.04/cloud vm1 --vm
Creating vm1
stgraber@castiana:~$ lxc config device add vm1 home disk source=/home/stgraber path=/mnt/virtiofs
Device home added to vm1
stgraber@castiana:~$ lxc start vm1
stgraber@castiana:~$ lxc exec vm1 bash
root@vm1:~# mkdir /mnt/9p
root@vm1:~# mount -t 9p lxd_home /mnt/9p/
root@vm1:~# dd if=/dev/zero of=/mnt/9p/test.img bs=4M count=100 conv=fdatasync
100+0 records in
100+0 records out
419430400 bytes (419 MB, 400 MiB) copied, 5.19642 s, 80.7 MB/s
root@vm1:~# dd if=/dev/zero of=/mnt/virtiofs/test.img bs=4M count=100 conv=fdatasync
100+0 records in
100+0 records out
419430400 bytes (419 MB, 400 MiB) copied, 0.831076 s, 505 MB/s
root@vm1:~#

Full CGroup2 support

LXD has been functional on hybrid and full cgroup2 systems for quite some time but not all limits were necessarily applied when run under it. In fact most controllers would be reported as limited or unsupported on startup.

We have now improved this significantly by adding cgroup2 support for every one of the limits supported in LXD with the exception of:

  • swap priority and swap disabling (requires swappiness control)
  • network priority (requires net_prio controller)

As those two currently do not have a cgroup2 equivalent available in the latest Linux kernel. Once an equivalent solution is implemented, we'll be sure to use it.

We've also added daily tests on cgroup1, cgroup1 with swapaccount and cgroup2 to confirm that all our limits behave as expected: https://jenkins.linuxcontainers.org/job/lxd-test-cgroup/

rebase mode for zfs.clone_copy

This new option for ZFS storage pools tells LXD to track down the image the source instance was created from and use that as the origin of the new instance.

This means a larger disk usage as a result of the copy since it's effectively duplicating the on-disk delta that the source instance has with its image, however it also avoids tying the new instance with its source. This then allows deleting the source instance and reclaiming its disk usage rather than LXD having to keep the deleted dataset around because of the copy.

stgraber@castiana:~$ lxc launch images:ubuntu/20.04/cloud u1
Creating u1
Starting u1
stgraber@castiana:~$ sudo zfs list -t all -o name,origin castiana/lxd/containers/u1
NAME                        ORIGIN
castiana/lxd/containers/u1  castiana/lxd/images/0d8a2b851ecb4a2dfc6313cb8bae203f15c5ca51c3c80bc65b573224e7f59f59@readonly

stgraber@castiana:~$ lxc copy u1 u2
stgraber@castiana:~$ sudo zfs list -t all -o name,origin castiana/lxd/containers/u2
NAME                        ORIGIN
castiana/lxd/containers/u2  castiana/lxd/containers/u1@copy-e51ca348-32b5-4101-ac05-c656bf7c2a1e

stgraber@castiana:~$ lxc storage set default zfs.clone_copy false
stgraber@castiana:~$ lxc copy u1 u3
stgraber@castiana:~$ sudo zfs list -t all -o name,origin castiana/lxd/containers/u3
NAME                        ORIGIN
castiana/lxd/containers/u3  -

stgraber@castiana:~$ lxc storage set default zfs.clone_copy rebase
stgraber@castiana:~$ lxc copy u1 u4
stgraber@castiana:~$ sudo zfs list -t all -o name,origin castiana/lxd/containers/u4
NAME                        ORIGIN
castiana/lxd/containers/u4  castiana/lxd/images/0d8a2b851ecb4a2dfc6313cb8bae203f15c5ca51c3c80bc65b573224e7f59f59@readonly

In this example:

  • u1 is a normal container created as a copy from an image
  • u2 is a normal copy made from a snapshot of its source
  • u3 is a standalone copy, duplicating the entire data of u1 and the image
  • u4 is a rebased copy, duplicating the delta u1 has with the image

--reuse option in lxc snapshot and lxc storage volume snapshot

It's now possible to have lxc snapshot or lxc storage volume snapshot delete a pre-existing snapshot before creating a new snapshot with the same name.

stgraber@castiana:~$ lxc snapshot u1 foo
stgraber@castiana:~$ lxc snapshot u1 foo
Error: Add snapshot info to the database: This instance_snapshot already exists
stgraber@castiana:~$ lxc snapshot u1 foo --reuse
stgraber@castiana:~$

restarted lifecycle event

LXD logs lifecycle events as an easy way to track important state changes. Up until now, an instance being restarted or getting restarted from within would log a stopped event followed by a started event.

This has now been replaced by a single restarted event, more accurately describing what's happened.

stgraber@castiana:~$ lxc monitor --type=lifecycle
location: none
metadata:
  action: virtual-machine-restarted
  source: /1.0/virtual-machines/u2
timestamp: "2020-11-12T17:47:50.559795164-05:00"
type: lifecycle

Improved logging of user requests

LXD has been recording the requestor for all API calls in its log messages and in internal context data. However this was a bit limited due to not logging what protocol was used (unix, candid, tls) or being able to log the username when a request came over the unix socket.

This has now been fixed and a basic query will now log something like this:

  • DBUG[11-12|18:26:10] Handling method=GET url=/1.0 ip=@ protocol=unix username=stgraber
  • DBUG[11-12|23:26:59] Handling method=GET url=/1.0 ip=[2001:470:b0f8:1000:223:a4ff:fe01:16f]:48334 protocol=candid username=stgraber@stgraber.net
  • DBUG[11-12|18:28:23] Handling method=GET url=/1.0 ip=127.0.0.1:47508 protocol=tls username=390fdd27ed5dc2408edc11fe602eafceb6c025ddbad9341dfdcb1056a8dd98b1

Complete changelog

Here is a complete list of all changes in this release:

  • lxd/device/usb: Fix check for required USB device
  • seccomp: switch back to pread()
  • nsexec: simplify userns attach
  • forksyscall: preserve root and cwd fds for shifted mount emulation
  • lxc/init.go: remove for-loop in create()
  • lxd/device/nic/ovn: Improved error messages
  • lxd/network/driver/ovn: Generates static EUI64 IPv6 address for instance switch ports in instanceDevicePortAdd
  • lxd/network/openvswitch/ovn: Adds LogicalSwitchPortGetDNS to return switch port DNS info
  • lxd/network/openvswitch/ovn: Updates LogicalSwitchPortDeleteDNS to only accept DNS UUID rather than port name
  • lxd/network/openvswitch/ovn: Updates LogicalSwitchPortSetDNS to return the DNS UUID record ID
  • lxc/network/driver/ovn: Adds validateExternalSubnet function
  • lxd/network/driver/ovn: Updates Validate to ensure ipv4.address and ipv6.address are allowed external subnets
  • lxd/network/driver/ovn: Adds support for publishing instance port IPs to uplink network
  • revert/revert.go: remove a for-loop from Clone()
  • doc/networks: Adds ipv4.nat and ipv6.nat to ovn network
  • lxc/copy.go: Remove unneeded for-loop in c.Run()
  • lxd/db/networks: Fix NULL description
  • lxd/network/driver/ovn: Allows "none" as value for ipv4.address and ipv6.address
  • lxd/network/driver/ovn: Re-run validation of auto generated address used in FillConfig
  • lxd/network/driver/ovn: Modify setup() to support optional IP addresses
  • lxd/network/driver/ovn: Updates instanceDevicePortAdd to support optional IP addresses
  • lxd/network/driver/ovn: Only call Validate in FillConfig if state is set
  • lxd/db/projects: Adds GetProject function
  • lxd/network/driver/ovn: Converts instance port functions to exported
  • lxd/network/driver/ovn: Removes ipv4.routes.external and ipv6.routes.external
  • lxc/network/driver/ovn: Adds projectRestrictedSubnets and uplinkRoutes functions
  • lxd/network/driver/ovn: Simplifies Validate by using separate data loader functions
  • lxd/network/driver/ovn: Passes project into allowedUplinkNetworks
  • lxd/network/driver/ovn: Passes project into validateUplinkNetwork
  • lxd/network/driver/ovn: Load project in setup() to pass to n.validateUplinkNetwork()
  • lxd/network/driver/ovn: Adds InstanceDevicePortValidateExternalRoutes function
  • lxd/network/network/utils/ovn: Remvoes unused functions
  • lxd/device/nic/ovn: Adds ovnNet interface and use OVN instance port functions directly from network
  • lxd/device/nic/ovn: Removes validation of external routes against network's external routes
  • lxd/device/nic/ovn: Validate NICs external routes using d.network.InstanceDevicePortValidateExternalRoutes
  • doc/networks: Removes ipv4.routes.external and ipv6.routes.external from ovn network
  • lxd/patches: Adds patch for removing ipv4.routes.external and ipv6.routes.external from ovn networks
  • api: Adds network_ovn_external_routes_remove extension
  • lxd/network/driver/ovn: Fix project restricted subnets check in validateExternalSubnet
  • lxd/images: Fixes ineffectual assign warning
  • lxd/resources/usb: Fixes ineffectual assign warning
  • lxd/storage/drivers/driver/lvm/volumes: Fixes ineffectual assign warning
  • lxd/instance: Use project aware inst.LogPath() function when clearing log dir in instanceCreateInternal
  • lxd/instance/drivers/driver/lxc: Project aware rename of log path in Rename()
  • lxd/instance/drivers/driver/qemu: Project aware rename of log path in Rename()
  • lxd/instance/drivers/driver/lxc: Makes collectCRIULogFile project log path aware
  • lxd/instance/logs: Makes containerLogsGet project aware
  • lxd/main/init/interactive: Clarifies question about using an existing empty disk
  • lxd/network/driver/bridge: Sets ipv4.nat=true when adding a new fan network with fan.underlay_subnet=auto
  • lxd/patches: Adds patchNetworkFANEnableNAT to set ipv4.nat=true for fan networks missing the setting
  • doc/networks: Clarifies comment defaults for bridge ipv4.nat when not specified during creation
  • lxd/seccomp: Fix go vet
  • lxd/instance: Add Architecture to common
  • lxd/devices: Disable USB on s390x
  • add new "restarted" event to reboot section of onStop in both lxc and qemu
  • tests: Fix missing clustering cleanup
  • lxd/storage/zfs: Properly recurse delete volumes
  • tests: Fix cleanup in backup
  • lxd/storage/backend/lxd: b.driver.UnmountVolume usage
  • lxd/instance/drivers/driver/lxc: Moves log rotate and mount before devices start in startCommon
  • lxd/storage/drivers/interface: Adds keepBlockDev arg to UnmountVolume
  • lxf/storage/drivers/volume: v.driver.UnmountVolume usage
  • lxd/storage/drivers/volume: Adds keepBlockDev arg to UnmountTask
  • lxd/storage/drivers/utils: Passes true for keepBlockDev arg to UnmounTask in shrinkFileSystem
  • lxd/storage/drivers/generic/vfs: d.UnmountVolume usage
  • lxd/storage/drivers/drivers/mock: Adds keepBlockDev arg to UnmountVolume
  • lxd/storage/drivers/driver/btrfs/volumes: Adds keepBlockDev arg to UnmountVolume
  • lxd/storage/drivers/driver/dir/volumes: Adds keepBlockDev arg to UnmountVolume
  • lxd/storage/drivers/driver/cephfs/volumes: Adds keepBlockDev arg to UnmountVolume
  • lxd/storage/drivers/driver/lvm/volumes: UnmountVolume usage
  • lxd/storage/drivers/driver/lvm/volumes: Adds keepBlockDev arg to UnmountVolume
  • lxd/storage/drivers/driver/lvm/volumes: UnmountTask usage
  • lxd/storage/drivers/driver/ceph/volumes: d.UnmountVolume usage
  • lxd/storage/drivers/driver/ceph/volumes: Adds keepBlockDev arg to UnmountVolume
  • lxd/storage/drivers/driver/zfs/volumes: Adds keepBlockDev arg to UnmountVolume
  • lxd/storage/drivers/driver/zfs/volumes: d.UnmountVolume usage
  • lxd/device/config/devices/sort: Sort disks between nics and other types of devices
  • lxd/device/config/devices/sort: Comment improvement
  • lxd/instance/drivers: Device lifecycle logging improvements
  • lxd/instance/drivers: Stop devices in reverse order to how they were started
  • lxd/instance/drivers/driver/lxc: Only use postStartHooks var where actually needed
  • lxd/instance/drivers/driver/qemu: Adds log rotation to Start
  • lxd/storage/zfs: Fix argument ordering
  • lxd/device/config: Add TPMDevice to RunConfig
  • lxd/cluster/connect: Renames project arg to projectName in ConnectIfInstanceIsRemote
  • lxd/cluster/connect: Adds projectName arg to ConnectIfVolumeIsRemote
  • lxd/response: Adds projectName argument to forwardedResponseIfVolumeIsRemote
  • lxd/storage/volumes: forwardedResponseIfVolumeIsRemote projectName argument usage
  • lxd/db/storage/volumes: Corrects mispelled argument name in GetStorageVolumeNodeAddresses
  • lxc/move: Bypass security.protection.delete
  • lxd/device: Add TPM device type
  • lxd/db: Add device type "tpm"
  • lxd/instance/drivers: Support TPM devices in VMs
  • lxd/device: Fix typo
  • api: Add tpm_device_type API extension
  • doc: Add tpm device
  • test: Add TPM device
  • doc/instances: usb and gpu are available in VMs
  • doc/instances: Add missing header in usb device
  • extract restart logic to new instance interface function of lxc and qemu
  • scripts/bash: Fix snap handling
  • extract common restart code to driver_common.go
  • lxd/storage: Rename RunningSnapshotFreeze to RunningCopyFreeze
  • lxd/storage: Ensure source is frozen during copy
  • lxd/instance/drivers: Write out updated backup.yaml after rename
  • lxd: Switch to new candid URL
  • lxd/storage/zfs: No need to remove dashes from UUID
  • shared: Drop GroupId and UserId
  • lxd: Port to os/user
  • lxd/daemon: Log protocol
  • lxd/daemon: Pass writer to Authenticate
  • lxd/daemon: Record username on unix queries
  • lxd/storage: Lock during the whole image replace
  • lxd/db/errors: Adds ErrNoClusterMember var used to indicate no cluster member has been found for a resource
  • lxd/db/storage/volumes: Modifies GetStorageVolumeNodeAddresses to detect volumes that are not bound to a single node
  • lxd/db/storage/volumes: Removes StorageVolumeIsAvailable
  • lxd/response: Updates forwardedResponseIfVolumeIsRemote to accept poolName rather than poolID
  • lxd/storage/volumes: forwardedResponseIfVolumeIsRemote usage
  • lxd/storage/volumes/backup: forwardedResponseIfVolumeIsRemote usage
  • lxd/storage/volumes/snapshot: forwardedResponseIfVolumeIsRemote usage
  • lxd: Replace use of tx.GetProject with cluster.GetProject
  • lxd/project/project: Adds StorageVolumeProjectFromRecord function
  • lxd/db/instances: Renames and reworks instanceListExpanded to InstanceList
  • lxd/db/instances/export/test: Removes unused file
  • lxd/db/instances/test: Renames TestInstanceListExpanded to TestInstanceList
  • lxd/patches: driver.VolumeTypeNameToDBType usage
  • lxd/profiles/utils: Comment on doProfileUpdateContainer for clarity
  • lxd/response: cluster.ConnectIfVolumeIsRemote usage
  • lxd/storage/drivers/driver/types: Adds VolumeMultiNode field to Info
  • lxd/storage/drivers/driver/cephfs: Adds VolumeMultiNode=true to Info struct
  • lxd/storage/utils: Renames VolumeTypeNameToType to VolumeTypeNameToDBType
  • lxd/storage: VolumeTypeNameToDBType usage
  • lxd/storage/utils: Adds VolumeDBTypeToTypeName function
  • lxd/storage/utils: Comment consistency
  • lxd/storage/utils: Renames and reworks VolumeUsedByRunningInstancesWithProfilesGet to VolumeUsedByInstances
  • lxd/storage/utils: Adds VolumeUsedByExclusiveRemoteInstancesWithProfiles function
  • lxd/cluster/connect: Reworks ConnectIfVolumeIsRemote to use storagePools.VolumeUsedByExclusiveRemoteInstancesWithProfiles
  • lxd/device/disk: storagePools.VolumeUsedByExclusiveRemoteInstancesWithProfiles usage
  • lxd/storage/volumes: storagePools.VolumeTypeNameToDBType usage
  • lxd/storage/volumes: Updates storagePoolVolumeTypePost to use updated storagePools.VolumeUsedByInstances
  • lxd/storage/backend/lxd: Updates UpdateCustomVolume to check for online resize support when resizing
  • lxd/storage/backend/lxd: Updates RestoreCustomVolume with VolumeUsedByInstances
  • lxd/storage/utils: Removes VolumeUsedByInstancesGet function as not properly project compliant
  • lxd/storage/volumes/utils: Replaces storagePools.VolumeUsedByInstancesGet usage with storagePools.VolumeUsedByInstances in storagePoolVolumeUsedByGet
  • lxd/device/disk: Replace storagePools.VolumeUsedByInstancesGet usage with storagePools.VolumeUsedByInstances in storagePoolVolumeAttachShift
  • lxd/endpoints: Update error string in test
  • shared/simplestreams: Record variant
  • shared/simplestreams: Fix sorting of images
  • lxd/project/project: Updates StorageVolumeProjectFromRecord to not return error (as never populated)
  • lxd/project/project: Adds NetworkProjectFromRecord function
  • lxd/storage/utils: project.StorageVolumeProjectFromRecord usage
  • lxd/network/driver/ovn: Adds NIC external route overlap validation of other OVN external network subnets and OVN NIC external routes
  • lxd/device/nic/ovn: Updates ovnNet interface's InstanceDevicePortValidateExternalRoutes to add instance argument
  • lxd/device/nic/ovn: d.network.InstanceDevicePortValidateExternalRoutes usage
  • lxd/instance/qmp: Merge Go routines
  • shared/cancel: Close chDone on failure
  • lxd: Only close doneCh on success
  • i18n: Update translations from weblate
  • lxd/network/driver/ovn: Adds ovnProjectNetworksWithUplink function
  • lxd/network/driver/ovn: Updates ovnNetworkExternalSubnets to allow optional filtering of our own network's subnets
  • lxd/network/driver/ovn: Updates ovnNICExternalRoutes to optionally filter our own NIC's external routes
  • lxd/network/driver/ovn: Updates InstanceDevicePortValidateExternalRoutes to use new functions and signatures
  • lxd/network/driver/ovn: Updates Validate to check external subnets dont overlap with other OVN networks or NICs sharing our uplink
  • lxd/network/openvswitch/ovn: Return ErrOVNNoPortIPs in LogicalSwitchPortSetDNS when no port IPs found
  • lxd/network/driver/ovn: Retry LogicalSwitchPortSetDNS up to 5 times to avoid missing dynamic IP allocation by OVN
  • exec: make sure to only use TIOCGPTPEER if available
  • lxd/instance/drivers: Change memory backend
  • lxd/instance/drivers: Add virtio-fs config drive template
  • lxd/instance/drivers: Handle virtio-fs config drive
  • lxd/instance/drivers: Add system unit file for virtio-fs config drive
  • lxd/device/disk: Support virtio-fs
  • lxd/device/disk: Handle alternative virtfs-proxy-helper location
  • lxd-agent: Prefer virtio-fs over 9p
  • lxd/instances: Fix virtiofsd for config drive
  • lxd/instance/drivers: Issue warning if virtiofsd is missing
  • lxd/device: Issue warning if virtiofsd is missing
  • lxd/instance/drivers: Fix lxd-agent systemd unit conditions
  • lxd/storage: Only freeze if not frozen
  • lxd/device/sriov: Harden calls to ip link vf
  • api: Add storage_zfs_clone_copy_rebase extension
  • doc/storage: Allow 'rebase' in zfs.clone_copy
  • lxd/storage: Allow 'rebase' as value for zfs.clone_copy
  • lxd/storage/zfs: Add support for clone_copy rebase
  • lxd/qmp: Ensure checkbuffer is called
  • lxd/network/driver/ovn: Adds support for using uplink bridge using bridge.driver=openvswitch
  • lxd/virtiofs: Fix handling of config drive
  • lxd/storage/lvm: Properly make lvm.thinpool_name node-specific
  • lxd/instance/drivers/driver/qemu: Call MountInstanceSnapshot when mounting vm snapshots
  • lxd/instance/drivers/driver/qemu: Ensure consistent mount state when restoring snapshot irrespective of whether instance was running
  • lxd/instance/drivers/driver/lxc: Ensure consistent mount state when restoring snapshot irrespective of whether instance was running
  • lxd/storage/drivers/volume: Comment clarification
  • lxd/storage/drivers/driver/zfs/volumes: Only resurrect deleted image volume if same size in CreateVolume
  • lxd/storage/drivers/driver/zfs/volumes: Improved logging
  • lxd/storage/drivers/driver/zfs/volumes: Return ErrNotSupported in SetVolumeQuota when trying to resize an image block volume
  • lxd/storage/drivers/driver/ceph/volumes: Only resurrect deleted image volume if same size in CreateVolume
  • lxd/storage/drivers/driver/ceph/volumes: Improves logging in CreateVolume
  • lxd/storage/drivers/driver/ceph/volumes: Don't allow image volume size in SetVolumeQuota
  • lxd/storage/backend/lxd: Adds size to logging in SetInstanceQuota
  • lxd/storage/backend/lxd: Update EnsureImage to resize/regenerate optimized image volumes if existing volume is different size than pool's volume.size setting
  • lxd/storage/backend/lxd: Updates CreateInstanceFromImage to detect ErrCannotBeShrunk and create one-off non-optimized volume for instance
  • lxd/storage/drivers/driver/ceph/utils: Updates getRBDMappedDevPath to allow control of mapping
  • lxd/storage/drivers/driver/ceph/utils: d.rbdUnmapVolumeSnapshot on one line
  • lxd/storage/drivers/driver/ceph/volumes: d.getRBDMappedDevPath usage
  • lxd/storage/utils: Makes InstanceDiskBlockSize snapshot aware
  • lxd/storage/drivers/driver/ceph/volumes: Removes extraneous comment
  • lxd/storage/drivers/driver/ceph/volumes: Activate volume before genericVFSMigrateVolume in MigrateVolume
  • lxd/storage/pool/interface: Adds MountInfo struct
  • lxd/storage/pool/interface: Return MountInfo from MountInstance and MountInstanceSnapshot
  • lxd/storage/backend/lxd: Populate MountInfo with OurMount and DiskPath in MountInstance
  • lxd/storage/backend/lxd: Unexports getInstanceDisk
  • lxd/storage/backend/lxd: Populates OurMount and DiskPath in MountInstanceSnapshot
  • lxd/storage/utils: Updates InstanceDiskBlockSize to use MountInfo
  • lxd/storage/backend/mock: Interface changes
  • lxd/instance: Updates instanceCreateAsSnapshot to use MountInfo
  • lxd/patches: Updates to use MountInfo
  • lxd/instance/drivers/driver/lxc: Updates mount to return MountInfo and usage
  • lxd/instance/drivers/driver/qemu: Updates mount to return MountInfo and usage
  • lxd/storage/drivers/generic/vfs: Adds genericVolumeDiskFile constant for excluding generic disk block files
  • lxd/storage/drivers/generic/vfs: Avoid using d.GetVolumeDiskPath in genericVFSMigrateVolume
  • lxd/storage/drivers/generic/vfs: Use genericVolumeDiskFile in genericVFSGetVolumeDiskPath
  • lxd/storage/drivers/driver/ceph/utils: Add logging to rbdMapVolume and rbdUnmapVolume
  • lxd/storage/drivers/driver/ceph/utils: Updates getRBDMappedDevPath to support snapshots
  • lxd/storage/drivers/driver/ceph/volumes: Updates MountVolume to return ourMount for block volumes
  • lxd/storage/drivers/driver/ceph/volumes: Updates UnmountVolumeSnapshot to handle block volumes
  • lxd/storage/drivers/driver/ceph/volumes: Renames RBDDevPath to devPath
  • lxd/storage/utils: Improves logging and uses size value from vol.ConfigSizeFromSource in ImageUnpack
  • lxd/storage/backend/lxd: Improves logging in CreateInstanceFromImage
  • lxd/storage/backend/lxd: Improves logging and uses imgVol.ConfigSizeFromSource in EnsureImage
  • doc/instances: Rephrase limits.memory.swap
  • doc/instances: Typo fix
  • lxd/storage: Use same defaults as "lxd init"
  • lxd/instance/drivers/driver/qemu: Converts all supplied memory byte values to mebibytes for comparison
  • lxd/rbac: Fix URL encoding
  • lxd/cgroup: Fix V2 detection/handling
  • lxd/cgroup: Add file read/writer
  • lxd/cgroup: Fix controller detection
  • lxd/cgroup: Add cpuset functions
  • lxd/cgroup: Fix warning wording
  • lxd/devices: Drop old workaround
  • lxd/devices: Port to cgroup package
  • lxd/instance: Replace CGroupGet/CGroupSet
  • lxd/devices: Update to use cgroup abstraction
  • lxd/cgroup: Implement proper typing
  • lxd/cgroup: Change ParseCPU to return int64
  • lxd/instance/lxc: Update for cgroup function changes
  • lxd/cgroup: Improve naming
  • lxd/instance: Update for new naming
  • lxd/cgroup: Add V2 for GetBlkioWeight and SetBlkioWeight
  • lxd/device: Move disk priority back to lxc
  • lxd/cgroup: Fix get blkio weight
  • lxd/cgroup: Add abstraction for SetBlkioLimit
  • lxd/device: Port disk limits to abstraction
  • lxd/db/storage/volumes: Adds workaround for old remote volume schema in GetStorageVolumeNodeAddresses
  • lxd/db/storage/volumes: Renames GetStorageVolumeNodeAddresses to GetStorageVolumeNodes
  • lxd/cluster/connect: Updates ConnectIfVolumeIsRemote to use tx.GetStorageVolumeNodes
  • lxd/db/storage/volumes/test: Updates test for TestGetStorageVolumeNodes
  • lxd/storage/utils: Updates VolumeUsedByInstances to accept an api.StorageVolume arg
  • lxd/storage/utils: Updates VolumeUsedByExclusiveRemoteInstancesWithProfiles to use an api.StorageVolume arg
  • lxd/storage/volumes/utils: Updates storagePoolVolumeUsedByGet to accept an api.StorageVolume arg
  • lxd/cluster/connect: Updates ConnectIfVolumeIsRemote to use VolumeUsedByExclusiveRemoteInstancesWithProfiles with vol arg
  • lxd/device/disk: Updates validateConfig to use storagePools.VolumeUsedByExclusiveRemoteInstancesWithProfiles with vol arg
  • lxd/device/disk: Updates storagePoolVolumeAttachShift to use storagePools.VolumeUsedByInstances with vol arg
  • lxd/storage/backend/lxd: Updates UpdateCustomVolume to use VolumeUsedByInstances with vol arg
  • lxd/storage/backend/lxd: Updates RestoreCustomVolume to use VolumeUsedByInstances with vol arg
  • lxd/storage/volumes: storagePoolVolumeUsedByGet usage
  • lxd/storage/volumes: Updates storagePoolVolumeTypePost to use storagePools.VolumeUsedByInstances with a vol arg
  • lxd/storage/volumes: Use db.StoragePoolVolumeTypeName constants
  • lxd/storage/volumes: Updates storagePoolVolumeTypeGet to use storagePoolVolumeUsedByGet with a vol arg
  • lxd/storage/volumes: Updates storagePoolVolumeTypeDelete to use storagePoolVolumeUsedByGet with a vol arg
  • lxd/storage/volumes/snapshots: storagePoolVolumeUsedByGet usage
  • lxd/storage/volumes/utils: Removes storagePoolVolumeAPI constants and converter functions
  • lxd/patches: Recreates patchStoragePoolVolumeAPI constants and function for historical patches
  • lxd/storage/volumes: Simplifies volume type in URL in storagePoolVolumes routes
  • lxd/storage/volumes/snapshot: Simplifies volume type in URL generation
  • lxd/storage/volumes: Updates storagePoolVolumeTypePostRename args
  • lxd/storage/volumes: Removes unnecessary var init in storagePoolVolumeTypePostMove
  • lxd/storage/drivers/driver/ceph/volumes: Fix rbd device leak in RenameVolume
  • lxd/storage/drivers/generic/vfs: Use revert package in genericVFSRenameVolume
  • lxd/storage/utils: Adds matching of instances on same node as local volume in VolumeUsedByInstances
  • lxd/storage/volume: Removes need for loading storage volume when doing lxc storage volume attach
  • lxd/device/disk: Reject path property for block disk devices
  • lxd/storage/utils: Renames VolumeUsedByInstanceDevices and passes usedByDevices into callback function
  • lxd/device/disk: storagePools.VolumeUsedByInstanceDevices usage
  • lxd/storage/backend/lxd: VolumeUsedByInstanceDevices usage
  • lxd/storage/utils: VolumeUsedByInstanceDevices usage
  • lxd/storage/volumes/utils: storagePools.VolumeUsedByInstanceDevices usage
  • lxd/storage/volumes: storagePools.VolumeUsedByInstanceDevices usage
  • lxd/storage/volumes: Updates storagePoolVolumeTypePost to use updated storagePoolVolumeTypePostRename and storagePoolVolumeTypePostMove
  • lxd/storage/volumes: Updates storagePoolVolumeTypePostRename to use updated storagePoolVolumeUpdateUsers
  • lxd/storage/volumes: Updates storagePoolVolumeTypePostMove to use updated storagePoolVolumeUpdateUsers
  • lxd/instance/drivers/driver/lxc: Removes common function LocalDevices implemented in LXC driver
  • lxd/db/instances: Better errors in InstanceList
  • lxd/storage/utils: Adds VolumeUsedByProfileDevices function
  • lxd/storage/utils: Removes unused volume name matching logic in VolumeUsedByInstanceDevices
  • lxd/storage/volumes/utils: Updates storagePoolVolumeUpdateUsers to use storagePools.VolumeUsedByProfileDevices and storagePools.VolumeUsedByInstanceDevices
  • lxd/storage/volumes/utils: Updates storagePoolVolumeUsedByGet to use storagePools.VolumeUsedByProfileDevices
  • lxd/storage/volumes/utils: Golint suggestions in storagePoolVolumeUsedByGet
  • lxd/cluster/connect: Removes CLI command flag in error response in ConnectIfVolumeIsRemote
  • lxd/db/storage/pools/test: Initialise db.StorageRemoteDriverNames in db_test package
  • lxd/db: Removes duplicated db.StorageRemoteDriverNames init from tests
  • lxd/locking/lock: Adds UnlockFunc type and updates Lock() signature
  • lxd/storage/drivers/utils: Extends OperationLockName to take into account content type.
  • lxd/storage/drivers/volume: Adds MountLock function
  • lxd/storage/drivers/driver/lvm/utils: drivers.OperationLockName usage
  • lxd/storage/backend/lxd: drivers.OperationLockName usage
  • lxd/storage/drivers: Adds mount and unmount locking
  • lxd/storage/drivers/volume: Removes locking from MountTask and UnmountTask
  • lxd/instance/drivers/driver/lxc: Stop devices in two phases
  • lxd/device/disk: Removes workaround for ceph disks now that disks are stopped after instance is stopped
  • doc/rest-api: auth property is never set to guest
  • lxd/apparmor: Workaround socket handling
  • lxd/storage: Expand local config
  • lxd/cgroup: Fix swap limits
  • lxd/instance/lxc: Fix crash in cgroup function
  • lxc/snapshot: Add reuse option
  • lxc/storage: Add reuse option to snapshot
  • i18n: Update translation templates
  • lxd/instance: Removes instanceConfigureInternal
  • lxd/instance: Replace instanceConfigureInternal usage with update backup file which was only relevant part
  • lxd/storage/backend/lxd: Adds log to CreateInstanceFromMigration showing if migration volume size header not sent
  • lxd/cgroup: Support SetCPUShare on V2
  • lxd/cgroup: Implement SetCPUCfsLimit for V2
  • lxd/instance/lxc: Port to SetCPUCfsLimit
  • lxd/cgroup: Support CGroup V2 in ParseCPU
  • lxd-agent: Don't allow connections when rebooting
  • i18n: Update translations from weblate

Try it for yourself

This new LXD release is already available for you to try on our demo service.

Downloads

The release tarballs can be found on our download page.

Binary builds are also available for:

  • Linux: snap install lxd
  • MacOS: brew install lxc
  • Windows: choco install lxc

LXD 4.0.4 LTS has been released

22nd of October 2020

Introduction

The LXD team is pleased to announce the release of LXD 4.0.4!

This is the fourth bugfix release for LXD 4.0 which is supported until June 2025.

Bugfixes and improvements

This release includes a couple of months worth of bugfixes and minor improvements from the development branch.

Some of the highlights include:

  • pidfds are now used whenever possible for sub-processes
  • remote-viewer is now supported on Windows (for lxc console --type=vga)
  • AppArmor profile for proxy devices
  • AppArmor profile for qemu processes
  • Memory shrink/re-grow in virtual machines (limits.memory live changes)
  • Add rsync.compression key in storage pools (to disable transport compression)
  • USB device support for virtual machines (including remote ports in remote-viewer)

The full list of commits is available below:

  • main_checkfeature: remove logging failed shiftfs mounts
  • seccomp: log errors to convert unix connection to file
  • unixfd: improve SCM_RIGHTs file descriptor retrieval
  • seccomp: simplify the seccomp message retrieval
  • lxd/apparmor: Disable cgroup2 on legacy hosts
  • lxc/manpage: Fix behavior in snap
  • shared/subprocess: Add StartWithFiles
  • lxd/forkproxy: Switch to using subprocess
  • daemon: check namespace management support through pidfds
  • nsexec: remove unused dosetns() function
  • nsexec: add new change_namespace() helper
  • forksyscall: use pidfds to attach to namespaces
  • forknet: use pidfds to attach to namespaces
  • forkmount: use pidfds to attach to namespaces
  • forkproxy: use pidfds to attach to namespaces
  • forkfile: use pidfds to attach to namespaces
  • nsexec: remove unused setnsat()
  • lxd/db/networks: Separates network type and status conversion into separate functions
  • lxd/db/networks: Adds ClusterTx.GetNonPendingNetworks function
  • lxd/db/networks: Adds ClusterTx.UpdateNetwork function
  • lxd/db/networks: Populates network nodes in ClusterTx.GetNonPendingNetworks
  • lxd/db/networks: Populate description col with empty string in CreatePendingNetwork
  • shared/validate: Adds IsNetworkMTU function
  • lxd/network/driver: validates mtu using IsNetworkMTU
  • lxd/device/nic: Validates mtu using IsNetworkMTU
  • lxd/network/driver/common: Moves notifier for delete into common
  • lxd/networks: Moves cluster notification and storage clean up for networkDelete into common
  • shared/validate: Use consistent quoting for outputting input value when there is an error
  • lxc: Bundle sortorder
  • lxd/network/network/utils: Adds pingIP function
  • lxd/storage/drivers/utils: Fixes shrinkFileSystem to detect e2fsck filesystem modifications
  • lxd/db/instances: Ensure correct pool name is returned in GetInstancePool
  • shared/cert: Fix on Windows
  • lxc/console: Support remote-viewer on Windows
  • lxc/export: Use HostPathFollow
  • lxd/cluster: Re-try listening for a minute
  • lxd/init: Don't fail on existing address
  • lxd/storage/zfs: Fix bad transfer logic on block
  • lxd/storage/zfs: Always discard mountpoint on recv
  • lxd/db/projects: go imports order
  • lxd/db/projects: Removes unnecessary whitespace
  • lxd/storage/zfs: Don't filter mountpoint on block
  • lxd/db/instances: Removes instancePoolSnapshot function
  • lxc/network: Fix usage
  • i18n: Update translation templates
  • lxd/apparmor/dnsmasq: drop dup rule, /snap/lxd/*/ includes /snap/lxd/current/
  • lxd/apparmor/forkdns: drop dup rule, /snap/lxd/*/ includes /snap/lxd/current/
  • lxd/instance: Always put snapshots on same pool as parent
  • doc/security: Adds note about non-IP ethernet frame filtering to stop VLAN QinQ bypass
  • shared/util: Converts DefaultPort from string to int
  • lxd/util/net: Updates CanonicalNetworkAddress to use net.JoinHostPort rather than manual fmt.Sprintf
  • lxd/util/net: Adds CanonicalNetworkAddressFromAddressAndPort function
  • lxd/device/device/utils/proxy: Use net.JoinHostPort rather than manual fmt.Sprintf
  • lxd/main/init/interactive: Error wrapping
  • lxd/main/init/interactive: Use canonical address after port has been added for comparison
  • lxd/main/init/auto: util.CanonicalNetworkAddressFromAddressAndPort usage
  • lxc/remote: shared.DefaultPort usage
  • lxd-agent/main/agent: shared.DefaultPort usage
  • lxd-p2c/utils: shared.DefaultPort usage
  • lxd/vsock: shared.DefaultPort usage
  • lxd/util/http: shared.DefaultPort usage
  • lxd/main/init: shared.DefaultPort usage
  • lxd/storage: Refuse BLOCK_AND_RSYNC with running instance
  • lxd/apparmor: Simplify profile name generation
  • lxd/device: Export Name and Config
  • lxd/apparmor: Shrink instance interface
  • lxd/apparmor/forkdns: Alignment
  • lxd/apparmor/forkdns: Support LD_LIBRARY_PATH
  • lxd/api/cluster: Makes ServerAddress field required for clusterPutJoin
  • lxd/init: Updates initDataNodeApply to use revert package and to revert itself on error
  • lxd/cluster/connect: Adds UserAgentNotifier constant
  • lxd/cluster/connect: Adds UserAgentJoiner constant
  • lxd/cluster/connect: Adds ClientType type and UserAgentClientType function
  • lxd/api: Updates isClusterNotification to use cluster.UserAgentNotifier
  • lxd/api/cluster: clusterInitMember comments
  • lxd/api/cluster: initDataNodeApply usage
  • lxd/main/init: initDataNodeApply usage
  • lxd/api/cluster: Updates clusterPutJoin to use cluster.UserAgentJoiner when sending requests to local node
  • lxd/network/network/interfaces: Replaces clusterNotification bool with cluster.ClientType
  • lxd/network/driver/common: cluster.ClientType usage
  • lxd/networks: cluster.ClientType usage
  • lxd/apparmor/dnsmasq: Add /proc/self/fd
  • lxd/apparmor/forkdns: Allow reading/mapping the binary
  • lxd/apparmor: Add forkproxy
  • lxd/device/forkproxy: Add apparmor
  • lxd/instance/instance/interface: Moves Project() function into ConfigReader interface
  • lxd/instance/drivers/driver/common: Adds Project function
  • lxd/instance/drivers/driver/lxc: Updates lxc to use common fields
  • lxd/instance/drivers/driver/lxc: Removes driver specific Project function
  • lxd/instance/drivers/driver/qemu: Removes driver specific Project function
  • lxd/network/network/utils: Improves UpdateDNSMasqStatic error message
  • lxd/storage/drivers/load: Cache supported drivers
  • lxd/storage/drivers/load: Remove references to "support" in AllDriverNames
  • lxd/apparmor/forkproxy: Fix running on i386
  • lxd/storage/drivers/interface: Adds isRemote function
  • lxd/storage/drivers/driver/common: Adds isRemote() function that returns false
  • lxd/storage/drivers/driver: Updates driver's Info() function to call d.isRemote()
  • lxd/storage/drivers/ceph: Implements isRemote function for ceph and cephfs
  • lxd/storage/drivers/load: Removes SupportedDrivers caching and updates comment
  • lxd/network/driver: cluster.ClientType usage
  • lxd/storage/drivers/load: Remove references to "support" in AllDriverNames
  • lxd/storage/drivers/load: Simplifies RemoteDriverNames to use the isRemote function
  • lxd/network: Add missing import
  • shared/log15: Fix due to recent unix change
  • Handle signals in non-interactive sessions.
  • Fix hang when control is not provided in non-interactive mode.
  • lxd/storage/volumes: Only apply config changes when restoring snapshot if non-nil config is supplied
  • lxd/network/driver/bridge: Exclude /32 underlay addresses from overlay address generation
  • lxd/device/device/utils/network: Removes networkRandomDevName
  • lxd/network/network/utils: Adds RandomDevName function
  • lxd/device: network.RandomDevName usage
  • lxd/network: Adds Description function
  • doc/api: Removes underscore escaping when used inside backticks
  • lxd/instance/drivers: Fixes crash when removing device that cant be loaded
  • lxc/storage_volume: Fix usage string
  • po: Update translations
  • lxd/drivers/qemu: Use gic-version=max on aarch64
  • lxc/config: Update wording for profile/config
  • lxc/export: Support writing to stdout
  • i18n: Update translation templates
  • Drop custom SQLite and libco
  • validate: Consider + as unsafe in URL
  • lxd/instance/snapshots: Restrict naming
  • lxd/storage/drivers/utils: Corrects argument order of mkfs in makeFSType for wider compatibility
  • lxd/api/cluster: Start networks after cluster join
  • lxd/networks: Only call n.Start() during doNetworksCreate if client type isn't joiner
  • lxd/network/network/utils: Adds UsedBy function and unexports related functions not used elsewhere
  • lxd/network/driver/common: Updates IsUsed to use UsedBy
  • lxd/network/driver/bridge: Adds existing interface check as Create function
  • lxd/network/driver/bridge: Push down interface name conflict check to Rename
  • lxd/profiles/utils: Renames project arg to projectName in doProfileUpdate
  • lxd/profiles: Updates usage of ValidDevices in profilesPost
  • lxd/networks: Updates networkPost validation
  • lxd/networks/utils: Removes networkGetInterfaces function
  • lxd/instance/instance/utils: Project name is needed to validate instance devices
  • lxd/instance: instance.ValidDevices project argument usage
  • lxd/instance/drivers/driver/lxc: instance.ValidDevices project usage
  • lxd/instance/drivers/driver/lxc: Error quoting
  • lxd/instance/drivers/driver/qemu: instance.ValidDevices project usage
  • lxd/instance/drivers/load: Adds project support to validDevices
  • lxd/device/device/load: Adds project support to load function
  • lxd/networks: Updates doNetworkGet to support projects and to use network.UsedBy
  • lxd/networks: Drop networkGetInterfaces
  • shift_linux: tweak ACL handling
  • tar_write: switch to PAXRecords to preserve ACLs too
  • shift_linux: handle ACL unshifting correctly
  • shift_linux: handle capability unshifting correctly
  • shift_linux: converty to CBytes not to CString
  • lxc/utils: Add usage function
  • lxc: Drop command name from translation
  • i18n: Update translation template
  • lxd/init: Updates initDataNodeApply to return a revert function
  • lxd/main/init: Updates Run to use revert
  • lxd/api/cluster: Updates clusterPutJoin to use revert
  • lxd/api/cluster: Updates clusterInitMember to return a revert function
  • lxd/api/cluster: Logging quoting
  • lxd/network: Adds Info struct and function
  • shared/subprocess: Set err on non-zero
  • lxd/instances/qemu: Use subprocess
  • lxd/instance: Add DevPaths
  • lxd/apparmor: Fix unload/delete
  • lxd/apparmor/instance: Sort context
  • lxd/apparmor: Prepare for qemu
  • lxd/apparmor: Add qemu profile
  • lxd/instance/drivers/driver/qemu: Switch to threads locking mode and writeback cache mode for BTRFS
  • doc/instance: raw.apparmor now implemented for VM
  • lxd/apparmor: Tweak qemu profile for non-snap
  • shared/idmap/shift/linux: Handle nil IdmapSet in UnshiftACL and UnshiftCaps
  • shared/instancewriter/instance/tar/writer: Handle nil idmapSet and log shifting errors in WriteFile
  • lxc: Better handle arguments
  • lxc: Unbundle sortorder
  • lxd/util/sys: Fixes GetExecPath when lxd binary has been removed/changed
  • lxd/db/images: Error message uppercase first letter
  • lxd/instance: Adds instanceImageTransfer and updates instanceCreateFromImage to use it
  • lxd/daemon/images: Error quoting
  • lxd/daemon/image: Adds logic to download image from another cluster node into ImageDownload
  • lxd/db/images/test: Fixes tests for LocateImage
  • test/suites/clustering: Adds test for image transfer between cluster nodes
  • bash-completion: use "list --format=csv" consistently
  • bash-completion: use regex grouping for lxc start
  • lxd/instance/qemu: Fix mem device naming
  • proxy bind= should accept host|instance as the doc says
  • Valid proxy type= values are all lower case so fix doc
  • s/descriptros/descriptors/
  • Revert "lxd/network/driver/bridge: Exclude /32 underlay addresses from overlay address generation"
  • lxd/network/driver/bridge: Skip lo interface when generating fan overlay address in addressForSubnet
  • lxd/apparmor: Allow unix sockets binding
  • doc/server: Sort config keys
  • lxd: Ensure all use of db.InstanceFilter defines instance type
  • lxd/project/permissions: Fixes AllowInstanceCreation tests
  • lxd/project/permissions: Error quoting
  • doc/storage: no need to escape underscore in bash examples
  • shared/validate: Use ParseUint in IsNetworkMTU
  • lxd/device/device/utils/network: Change argument for NetworkSetDevMTU to uint32
  • lxd/device/device/utils/network: NetworkSetDevMTU usage
  • lxd/network/network/utils: Changes GetDevMTU to return uint32
  • doc/projects: Sort config keys
  • lxd/project/permissions: Typo
  • lxd/storage/cephfs: Fix quota on new volumes
  • lxc/remote: Add project selection logic
  • i18n: Update translation templates
  • lxd/backup: Adds WorkingDirPrefix constant
  • lxd: backup.WorkingDirPrefix usage
  • lxd/backup: Rename comment ending
  • lxd/backup: DoBackupDelete comment ending
  • lxd/network/network/interface: Adds Type interface and moves non-DB depedent functions into it
  • lxd/network/network/load: Adds LoadByType function and removes ValidateNameAndProject function
  • lxd/main/init/interactive: netType.ValidateName usage
  • lxd/networks: Switch to network type validation in networksPost
  • lxd/networks: Use ValidateName function on loaded DB network in networkPost
  • lxd/network/network/interface: Exports FillConfig
  • lxd/network/network/load: Removes FillConfig function
  • lxd/networks: netType.FillConfig usage
  • lxd/network/driver/common: Exports FillConfig
  • lxd/network/driver/bridge: FillConfig usage
  • lxd/network/driver/common: Removes common Type() and netType
  • lxd/network: Adds Type() to each driver
  • lxd/db/errors: Updates ErrAlreadyDefined text to be generic
  • lxd/network/network/interface: Adds DBType function
  • lxd/network/driver: Implements DBType()
  • lxd/network/driver: Adds NodeSpecificConfig Info var
  • lxd/instances: Fix ceph cluster target move
  • lxd/cgroup: Fix memory.swappiness detection
  • lxd/db: Adds boolean support to doDbQueryScan
  • lxd/sys/fs: initDirs comment
  • lxd/sys/fs: initDirs error quoting
  • lxd/sys/fs: Adds initStorageDirs to be called after storage pools and daemon volumes are mounted
  • lxd/sys/os: Adds InitStorage
  • lxd/daemon: Call d.os.InitStorage after daemon storage volumes are mounted
  • lxd/backup/instance/config: Renames InstanceConfig to Config
  • lxd/backup/backup/config: Makes Config fields omitempty so custom volume's encoded yaml doesn't contain instance fields
  • lxd/backup/backup/config: Adds comment to Container field explaining that VM backups use this too
  • lxd/storage/pool/interface: backup.Config usage
  • lxd/api/internal: backup.ParseConfigYamlFile usage
  • lxd/storage/backend: backup.Config usage
  • lxd/backup: Moves Instance interface into own file
  • lxd/backup: Moves Info struct and GetInfo function into own file
  • lxd/backup: Renames backup to backup_common
  • lxd/rbac: Avoid tight retry loop
  • lxd/rbac: Directly handle re-tries on 504
  • lxd/networks: netType.DBType usage in networksPost
  • lxd/networks: Create pending network node entries when network driver doesn't support per node config in networksPost
  • lxd/networks: Comments in networksPostCluster
  • lxd/networks: Comments in networkGet
  • lxd/network: Only adding pseudo pending node records when in cluster in networksPost
  • lxd/networks: Updates doNetworkUpdate to use n.Validate so that project is available to validator
  • lxd/network/network/load: Removes unused Validate
  • lxd/networks: Fix build
  • lxd/backup/backup/common: Renames Backup to BackupCommon
  • lxd/backup/backup/instance: Adds InstanceBackup using CommonBackup as basis
  • lxd/backup: Changes pruneExpiredContainerBackups to use InstanceBackup.Delete() function
  • lxd/instance/instance/utils: backup.InstanceBackup usage
  • lxd/instance/instance/interface: backup.InstanceBackup usage
  • lxd/instance/drivers: backup.InstanceBackup usage
  • lxd/backup/backup/utils: Adds TarReader function
  • lxd/backup/backup/info: Changes Type field from api.InstanceType to Type
  • lxd/backup/backup/info: Updates GetInfo to use TarReader
  • lxc/backup: Updates backupWriteIndex to use backup.Type
  • lxd/backup/backup/info: GetInfo consistent comment endings
  • lxd/backup/backup/info: Updates GetInfo to support backup.Type
  • lxd/db/backups: InstanceBackup comment
  • lxd/db/backups: projectName argument renaming
  • lxd/db/storage/volumes: Set Snapshot: true in StorageVolumeArgs returned from GetLocalStoragePoolVolumeSnapshotsWithType
  • lxd/instance: Spacing
  • lxd/storage/drivers/driver/btrfs/utils: Switches to backup.TarReader
  • lxd/storage/drivers/driver/btrfs: Consistent comment ending
  • lxd/storage/drivers/driver/zfs/volumes: consistent comment ending
  • lxd/storage/drivers/generic/vfs: Consistent comment ending
  • lxd/backup/backup/info: Adds note about legacy container.bin optimized type check
  • lxd/backup/backup/instance: Fix old parent directory removal in InstanceBackup.Rename()
  • lxd/backup: Backtrack path changes
  • lxd/backup/backup/config: Adds VolumeSnapshots to Config struct
  • lxd/backup/backup/info: Adds Config field to Info struct
  • client/interfaces: Add custom volume backup functions
  • client/interfaces: Adds StoragePoolVolumeBackupArgs struct
  • client/lxd/storage/volumes: Add custom volume backup functions
  • lxd/db/storage/volume/snapshots: Adds GetStorageVolumeSnapshotsNames function
  • lxd/storage/drivers/driver/btrfs/volumes: Adds support for optimized custom volume backups
  • lxd/storage/drivers/driver/dir/volumes: Adds support for custom volume backups nil post hooks
  • lxd/storage/drivers/driver/zfs/volumes: Adds support for optimized custom volume backups
  • lxd/storage/drivers/driver/zfs/volumes: Adds support for custom volume backups nil post hooks
  • lxd/storage/drivers/generic/vfs: Adds support for custom volume backups to genericVFSBackupVolume
  • lxd/storage/drivers/generic/vfs: Adds support for custom volume backups to genericVFSBackupUnpack
  • shared/api/storage/pool/volume: Adds custom volume backup structs
  • lxd/storage/drivers: Support block volumes
  • lxd/cluster: Changing "no heartbeat" language in membership.go "no heartbeat since " changed to "no heartbeat for "
  • lxc: Always use HostPathFollow
  • lxd/storage/drivers/generic/vfs: Fixes custom volume root dir ownership issue in genericVFSBackupUnpack
  • test/suites/backup: Use project argument in test_backup_import_with_project
  • test/suites/backup: Use project argument in test_backup_export_with_project
  • test/suites/backup: Adds test for backup import into different project in test_backup_import_with_project
  • lxd/api: Restrict access to daemon config
  • lxd/storage: Allow ceph/cephfs for images/backups
  • client/interfaces: Adds Name field to InstanceBackupArgs
  • client/lxd/instances: Adds custom name restore support to CreateInstanceFromBackup
  • lxd/instance/drivers/qmp/monitor: Adds GetBalloonSizeBytes and SetBalloonSizeBytes
  • lxd/instance/drivers/driver/qemu: Adds live shrinking of memory
  • lxd/devices/config/devices/utils: Adds doc block for deviceEquals and deviceEqualsDiffKeys
  • lxd/device/config/devices: Comment clean up
  • lxd/device/config/devices: Improves comments and variable naming in Update
  • lxd/device/config/devices: Fixes bug in Update where allChangedKeys only contains changed keys from last device
  • lxd/device/config/devices: Handles nil updateFields function in Update
  • lxd/instances/post: Adds custom name support for backup import to createFromBackup
  • lxd/instances/post: createFromBackup usage
  • lxd/instance/drivers/driver/lxc: Whitespace
  • lxd/instance/drivers/driver/qemu: Removes logic duplication in live update
  • lxd/api/internal: Adds AllowNameOverride to internalImportPost
  • lxd/api/internal: Override instance name in internalImport when AllowNameOverride is set
  • client/interfaces: Adds Name field to StoragePoolVolumeBackupArgs to bring in line with InstanceBackupArgs
  • client/lxd/storage/volumes: Updates CreateStoragePoolVolumeFromBackup to accept volume name override via X-LXD-name header
  • shared/api: Not all disks have a device path
  • lxd/resources: Ignore rbd devices
  • lxd/device/device/interface: Adds NICState interface for getting NIC state
  • lxd/device/nic/bridged: Implements NICState interface by adding State function
  • lxd/instance/drivers/driver/qemu: Refactors RenderState to support multiple NIC types in the future
  • lxd/instance/drivers/qmp/monitor: Renames GetMemoryBalloonSizeBytes
  • lxd/instance/drivers/qmp/monitor: Renames SetMemoryBalloonSizeBytes
  • lxd/instance/drivers/qmp/monitor: Adds GetMemorySizeBytes function
  • lxd/instance/drivers/driver/qemu: Adds qemuDefaultMemSize constant
  • lxd/instance/drivers/driver/qemu: Updates updateMemoryLimit to allow memory resize back to boot time size
  • lxd/instance/drivers/driver/qemu: Updates IsRunning to not check for BROKEN state
  • lxd/instance/drivers/driver/qemu: Updates statusCode() to detect if monitor failure with running VM
  • lxd/apparmor: Allow access to zoneinfo files
  • lxd/apparmor: Add /etc/localtime to the list
  • lxd/project: Always allow cloud-init:config drives
  • doc/image-handling: Cover publishing
  • lxd/network/network/utils: Adds GetNeighbourIPs function
  • lxd/network/network/utils: Updates GetLeaseAddresses to return only net.IP list
  • lxd/device/nic/bridged: Updates State() to return partial data
  • lxd/device/nic: Fix build on stable
  • shared/simplestreams: Fix stream's index download url
  • refuse empty passwords
  • lxd/storage: Adds rsync.compression config key
  • doc: Adds rsync.compression
  • api: storage_rsync_compression
  • tests: Valid rsync.compression
  • doc/index: Add libsqlite3-dev back to dependencies
  • lxd/firewall/drivers/driver/nftables: Updates nft parser to handle nft sets with composite type field
  • shared/validate/validate: Increases max MTU to 16384 to support super jumbo packets
  • lxd/apparmor/forkproxy: Fix bad profile name
  • lxd/apparmor/forkproxy: Allow writing to log path
  • lxc: Better handle copy/move between projects
  • lxd/apparmor: Fix version parsing
  • lxd/dnsmasq: Switch to Parse for version parsing
  • lxd/firewall/drivers: Fix to Parse for version parsing
  • lxd/rsync: Switch to Parse for version parsing
  • shared/version: Make patch optional
  • lxd/networks: Log error in doNetworksCreate after failed create if cleanup fails too
  • lxd/network/network/utils: Moves bridge related functions into own file
  • static_analysis: exclude vendored headers from spell checking
  • static_analysis: exclude .git
  • shift_linux: vendor posix_acl_xattr.h
  • shares/validate: Whitespace
  • lxd/apparmor/forkproxy: Socket path fixes
  • lxd/images: Fix crash when no "info" struct
  • lxd/util/net: Updates SysctlSet to support setting multiple keys
  • shared/validate: Adds IsNetworkAddressList function
  • lxd/network/network/utils: Adds VLANInterfaceCreate function
  • lxd/device/device/utils/network: network.VLANInterfaceCreate usage
  • lxd/device/device/utils/network: Removes NetworkRemoveInterface function
  • lxd/network/network/utils: Adds InterfaceRemove and InterfaceExists functions
  • lxd/network/network/utils: InterfaceExists usage
  • lxd/device/device/utils/network: network.InterfaceRemove usage
  • lxd/device/nic: network.InterfaceRemove usage
  • lxd/network/driver/bridge: InterfaceExists usage
  • lxd/network/network/utils: Adds InterfaceSetMTU function
  • lxd/device: network.InterfaceSetMTU usage
  • lxd/storage/pools: Gives clear error message when trying to create duplicate storage pool in single node
  • lxd/network/driver: Improves comments
  • lxd/device/sriov: Fix build
  • lxd/events: Validate type
  • lxd/events: Prevent logging access to non-admin
  • lxd/daemon: Clean shutdown on SIGPWR/SIGTERM
  • lxd/operations: Don't directly trigger shutdown
  • lxd: Prevent internal cluster migration of instances with backups
  • lxd/instance/drivers: Enable USB for VMs
  • lxd/instance/drivers: Add USB controller to QEMU config
  • lxd/apparmor: Fix devPaths in QEMU profile
  • db: Retry transient errors for longer
  • db: Always retry driver.ErrBusy, regardless of the error message
  • db: Retry failed rollbacks if they are due to transient errors
  • db: Explicitly rollback leftover transactions when a new one can't be started
  • db: Retry to begin a new transaction after an explicit rollback attempt
  • lxd/operations: Fix timeout
  • lxd/daemon: Allow more operations during shutdown
  • lxd/include: Relocate ifndef for NEWCGROUP
  • doc: Remove stray _ escapes in security.md
  • lxc-to-lxd: Handle snap better
  • lxd/events: Handle default permissiosn in projects
  • lxd/dnsmasq: Adds 100ms sleep to successful Kill() to allow sockets to be released by OS
  • lxd/instance/drivers/driver/qemu: Restores ability to resize VM disks
  • lxd/device/disk: Adds comment about VM instances depending on CanHotPlug fields for stopped disk resize
  • lxd/instance/qemu: Fix bad event name
  • lxd/storage: Check base image is available locally
  • lxd/instance: Fix building on 4.0
  • lxd/device/usb: Allow USB devices for VMs
  • lxd/device: Add bus and dev number to USBEvent
  • lxd/apparmor: Allow USB specific paths
  • lxd/device/config: Add USBDevice to RunConfig
  • lxd/storage/drivers/driver/lvm: Don't remove empty thinpool and volume group if lvm.vg.force_reuse enabled
  • shared/validate/validate: Removes inaccurate comments about optional values
  • shared/validate/validate: Adds IsNetwork and IsNetworkList functions
  • shared/validate/validate: Re-orders IP validation functions
  • lxd/network/driver/common: Ban : char from network names in ValidateName()
  • lxd/device: Handle USB devices for VMs
  • lxd/instance/drivers: Add qemuUSBDev template
  • lxd/instance/drivers: Add USB devices to qemu config
  • Revert "lxd/instance/drivers: Enable USB for VMs"
  • lxd/driver/qemu: Add spice usb ports
  • forksyscall: use correct function
  • lxd-agent: Fix defer in for loop
  • shared/util.go: use string method with stdout and stderr
  • simplestreams.go: remove unneeded fmt.Sprintf and simplify getImages()
  • lxd/instance/drivers: Updates templateApplyNow to close files at end of each iteration
  • lxd/network/network/utils: Adds SubnetContains function
  • lxd/network/network/utils: Adds SubnetIterate function
  • lxd/network/network/utils: Adds SubnetParseAppend function
  • lxd/api/project: Moves projectConfigKeys inside projectValidateConfig and adds state
  • lxd/api/project: projectValidateConfig usage
  • forkmount: improve
  • seccomp: improve logging for the seccomp notifier
  • seccomp: make sure that insertMountLXD() doesn't call into LXC
  • lxd/network/driver/bridge: Fixes inconsistency between normal bridge and fan bridge default ipv4.nat value
  • lxd/device/usb: Fix check for required USB device
  • seccomp: switch back to pread()
  • nsexec: simplify userns attach
  • forksyscall: preserve root and cwd fds for shifted mount emulation
  • lxc/init.go: remove for-loop in create()
  • revert/revert.go: remove a for-loop from Clone()
  • lxc/copy.go: Remove unneeded for-loop in c.Run()
  • lxd/db/projects: Adds GetProject function
  • lxd/db/networks: Fix NULL description
  • doc/instances: Re-organises NIC device type docs introducing section about network property
  • lxd/images: Fixes ineffectual assign warning
  • lxd/resources/usb: Fixes ineffectual assign warning
  • lxd/storage/drivers/driver/lvm/volumes: Fixes ineffectual assign warning
  • lxd/instance: Use project aware inst.LogPath() function when clearing log dir in instanceCreateInternal
  • lxd/instance/drivers/driver/lxc: Project aware rename of log path in Rename()
  • lxd/instance/drivers/driver/qemu: Project aware rename of log path in Rename()
  • lxd/instance/drivers/driver/lxc: Makes collectCRIULogFile project log path aware
  • lxd/instance/logs: Makes containerLogsGet project aware
  • lxd/main/init/interactive: Clarifies question about using an existing empty disk
  • lxd/network/driver/bridge: Sets ipv4.nat=true when adding a new fan network with fan.underlay_subnet=auto
  • lxd/patches: Adds patchNetworkFANEnableNAT to set ipv4.nat=true for fan networks missing the setting
  • doc/networks: Clarifies comment defaults for bridge ipv4.nat when not specified during creation
  • lxd/seccomp: Fix go vet
  • lxd/instance: Add Architecture to common
  • lxd/devices: Disable USB on s390x
  • add new "restarted" event to reboot section of onStop in both lxc and qemu
  • tests: Fix missing clustering cleanup
  • lxd/storage/zfs: Properly recurse delete volumes
  • lxd/storage/backend/lxd: b.driver.UnmountVolume usage
  • lxd/instance/drivers/driver/lxc: Moves log rotate and mount before devices start in startCommon
  • lxd/storage/drivers/interface: Adds keepBlockDev arg to UnmountVolume
  • lxf/storage/drivers/volume: v.driver.UnmountVolume usage
  • lxd/storage/drivers/volume: Adds keepBlockDev arg to UnmountTask
  • lxd/storage/drivers/utils: Passes true for keepBlockDev arg to UnmounTask in shrinkFileSystem
  • lxd/storage/drivers/generic/vfs: d.UnmountVolume usage
  • lxd/storage/drivers/drivers/mock: Adds keepBlockDev arg to UnmountVolume
  • lxd/storage/drivers/driver/btrfs/volumes: Adds keepBlockDev arg to UnmountVolume
  • lxd/storage/drivers/driver/dir/volumes: Adds keepBlockDev arg to UnmountVolume
  • lxd/storage/drivers/driver/cephfs/volumes: Adds keepBlockDev arg to UnmountVolume
  • lxd/storage/drivers/driver/lvm/volumes: UnmountVolume usage
  • lxd/storage/drivers/driver/lvm/volumes: Adds keepBlockDev arg to UnmountVolume
  • lxd/storage/drivers/driver/lvm/volumes: UnmountTask usage
  • lxd/storage/drivers/driver/ceph/volumes: d.UnmountVolume usage
  • lxd/storage/drivers/driver/ceph/volumes: Adds keepBlockDev arg to UnmountVolume
  • lxd/storage/drivers/driver/zfs/volumes: Adds keepBlockDev arg to UnmountVolume
  • lxd/storage/drivers/driver/zfs/volumes: d.UnmountVolume usage
  • lxd/device/config/devices/sort: Sort disks between nics and other types of devices
  • lxd/device/config/devices/sort: Comment improvement
  • lxd/instance/drivers: Device lifecycle logging improvements
  • lxd/instance/drivers: Stop devices in reverse order to how they were started
  • lxd/instance/drivers/driver/lxc: Only use postStartHooks var where actually needed
  • lxd/instance/drivers/driver/qemu: Adds log rotation to Start
  • lxd/storage/zfs: Fix argument ordering
  • lxd/patches: Fix for stable-4.0
  • lxd/cluster/connect: Renames project arg to projectName in ConnectIfInstanceIsRemote
  • lxd/cluster/connect: Adds projectName arg to ConnectIfVolumeIsRemote
  • lxd/response: Adds projectName argument to forwardedResponseIfVolumeIsRemote
  • lxd/db/storage/volumes: Corrects mispelled argument name in GetStorageVolumeNodeAddresses
  • lxc/move: Bypass security.protection.delete
  • lxd/device: Fix typo
  • doc/instances: usb and gpu are available in VMs
  • doc/instances: Add missing header in usb device
  • lxd/storage/volumes: forwardedResponseIfVolumeIsRemote projectName argument usage

Try it for yourself

This new LXD release is already available for you to try on our demo service.

Downloads

The release tarballs can be found on our download page.

Binary builds are also available for:

  • Linux: snap install lxd
  • MacOS: brew install lxc
  • Windows: choco install lxc

LXD 4.7 has been released

16th of October 2020

Introduction

The LXD team is very excited to announce the release of LXD 4.7!

This one comes with some very welcome VM improvements (USB and live memory updates), more backup features and a number of improvements on top of our OVN virtual network story.

Enjoy!

New features and highlights

Backup (export/import) of custom storage volumes

A new backup API for custom volumes has been added which now allows for lxc storage volume export and lxc storage volume import in the CLI.

stgraber@castiana:~$ lxc storage volume create default foo
Storage volume foo created
stgraber@castiana:~$ lxc storage volume export default foo
Backup exported successfully!
stgraber@castiana:~$ lxc storage volume delete default foo
Storage volume foo deleted
stgraber@castiana:~$ lxc storage volume import default backup.tar.gz
stgraber@castiana:~$ lxc storage volume list default
+----------------------------+------------------------------------------------------------------+-------------+--------------+---------+
|            TYPE            |                               NAME                               | DESCRIPTION | CONTENT TYPE | USED BY |
+----------------------------+------------------------------------------------------------------+-------------+--------------+---------+
| container                  | lxd-build                                                        |             | filesystem   | 1       |
+----------------------------+------------------------------------------------------------------+-------------+--------------+---------+
| container                  | lxd-build-focal                                                  |             | filesystem   | 1       |
+----------------------------+------------------------------------------------------------------+-------------+--------------+---------+
| container                  | steam                                                            |             | filesystem   | 1       |
+----------------------------+------------------------------------------------------------------+-------------+--------------+---------+
| custom                     | backups                                                          |             | filesystem   | 1       |
+----------------------------+------------------------------------------------------------------+-------------+--------------+---------+
| custom                     | foo                                                              |             | filesystem   | 0       |
+----------------------------+------------------------------------------------------------------+-------------+--------------+---------+
| custom                     | images                                                           |             | filesystem   | 1       |
+----------------------------+------------------------------------------------------------------+-------------+--------------+---------+

Import of instances with alternative name

It's finally possible to import an instance backup under an alternative name!

stgraber@castiana:~$ lxc init images:alpine/edge a1
Creating a1
stgraber@castiana:~$ lxc export a1
Backup exported successfully!
stgraber@castiana:~$ lxc import backup.tar.gz a2
stgraber@castiana:~$ lxc list a
+------+---------+------+------+-----------+-----------+
| NAME |  STATE  | IPV4 | IPV6 |   TYPE    | SNAPSHOTS |
+------+---------+------+------+-----------+-----------+
| a1   | STOPPED |      |      | CONTAINER | 0         |
+------+---------+------+------+-----------+-----------+
| a2   | STOPPED |      |      | CONTAINER | 0         |
+------+---------+------+------+-----------+-----------+

Virtual machine memory shrinking (and re-grow)

It's now posible to control the balloon device inside the virtual machines, making it possible to shrink the memory and then grow it back up to the previous limit (adding more memory requires a reboot).

stgraber@castiana:~$ lxc config show ubuntu-desktop | grep memory
  limits.memory: 2GiB
stgraber@castiana:~$ lxc exec ubuntu-desktop -- free -m
              total        used        free      shared  buff/cache   available
Mem:           1983         437         822           7         722        1386
Swap:           448           0         448
stgraber@castiana:~$ lxc config set ubuntu-desktop limits.memory 1500MiB
stgraber@castiana:~$ lxc exec ubuntu-desktop -- free -m
              total        used        free      shared  buff/cache   available
Mem:           1435         436         276           7         722         840
Swap:           448           0         448
stgraber@castiana:~$ lxc config set ubuntu-desktop limits.memory 2GiB
stgraber@castiana:~$ lxc exec ubuntu-desktop -- free -m
              total        used        free      shared  buff/cache   available
Mem:           1983         437         822           7         722        1387
Swap:           448           0         448
stgraber@castiana:~$

USB device passthrough for virtual machines

The usb device type is now supported with virtual machines. It works the exact same way as containers except that a reboot is required to add a new device.

Additionally, 3 virtual ports are also connected to LXD VMs which can be used through lxc console --type=vga for remote redirection of USB devices.

Configurable rsync compression in migration

A new rsync.compression boolean option is now present on storage pools.

This allows disabling rsync compression during migration operation for cases where the network is fast enough to not be a bottleneck and where the CPU usage that comes from compression can become an issue.

When using LXD projects with the network (OVN) feature enabled, it's now possible to restrict what uplink networks may be used by virtual networks.

If only one uplink network is available, LXD will also automatically use it without the user having to specify it.

This is done with a new restricted.networks.uplinks key on projects.

Add new physical managed network type

A new physical network type now exists. This can currently only be used as the uplink for an OVN network. The configuration includes a usable set of IP addresses for used by the OVN networks as well as the gateway and DNS servers.

stgraber@castiana:~$ lxc network create external parent=eth0 ipv4.gateway=172.17.0.1/24 ipv4.ovn.ranges=172.17.0.100-172.17.0.150 dns.nameservers=1.1.1.1 --type=physical
Network external created
stgraber@castiana:~$ lxc network list
+----------+----------+---------+----------------+---------------------------+-------------+---------+
|   NAME   |   TYPE   | MANAGED |      IPV4      |           IPV6            | DESCRIPTION | USED BY |
+----------+----------+---------+----------------+---------------------------+-------------+---------+
| eth1     | physical | NO      |                |                           |             | 0       |
+----------+----------+---------+----------------+---------------------------+-------------+---------+
| external | physical | YES     |                |                           |             | 0       |
+----------+----------+---------+----------------+---------------------------+-------------+---------+
| lxdbr0   | bridge   | YES     | 10.166.11.1/24 | fd42:4c81:5770:1eaf::1/64 |             | 15      |
+----------+----------+---------+----------------+---------------------------+-------------+---------+
| virbr0   | bridge   | NO      |                |                           |             | 0       |
+----------+----------+---------+----------------+---------------------------+-------------+---------+
| wlan0    | physical | NO      |                |                           |             | 0       |
+----------+----------+---------+----------------+---------------------------+-------------+---------+

Support for external routed addresses/subnets on OVN

New configuration keys ipv4.routes.external and ipv6.routes.external can be used to route external IP addresses or subnets to instances running on an OVN network.

This can be used together with a new restricted.networks.subnets key in project configuration to first delegate a set of external IPv4/IPv6 subnets to a particular project and then within that project, route those addresses to instances.

Complete changelog

Here is a complete list of all changes in this release:

  • lxd/cluster: Changing "no heartbeat" language in membership.go "no heartbeat since " changed to "no heartbeat for "
  • lxd/apparmor: Allow unix sockets binding
  • doc/server: Fix escaping
  • doc/server: Sort config keys
  • lxd/backup: Adds WorkingDirPrefix constant
  • lxd: backup.WorkingDirPrefix usage
  • lxd/backup: Updates backupCreate to store backups in backups/instances
  • lxd/backup: Updates Rename to support new backup location
  • lxd/backup: Rename comment ending
  • lxd/backup: Updates DoBackupDelete to handle new backup location
  • lxd/backup: DoBackupDelete comment ending
  • lxd/instance/backup: Updates containerBackupExportGet to support new backup location
  • lxd/patches: Adds patchMoveBackupsInstances to move backups into backups/instances dir
  • lxd/sys/fs: Adds backups/custom and backups/instances to initDirs()
  • lxd/network/driver/ovn: Improve error message when parent 'network' option not specified
  • lxd/network/network/interface: Adds Type interface and moves non-DB depedent functions into it
  • lxd/network/network/load: Adds LoadByType function and removes ValidateNameAndProject function
  • lxd/main/init/interactive: netType.ValidateName usage
  • lxd/networks: Switch to network type validation in networksPost
  • lxd/networks: Use ValidateName function on loaded DB network in networkPost
  • lxd/network/network/interface: Exports FillConfig
  • lxd/network/network/load: Removes FillConfig function
  • lxd/networks: netType.FillConfig usage
  • lxd/network/driver/common: Exports FillConfig
  • lxd/network/driver/bridge: FillConfig usage
  • lxd/network/driver/ovn: FillConfig usage
  • lxd/network/driver/common: Removes common Type() and netType
  • lxd/network: Adds Type() to each driver
  • lxd/db/errors: Updates ErrAlreadyDefined text to be generic
  • lxd/network/network/interface: Adds DBType function
  • lxd/network/driver: Implements DBType()
  • lxd/network/driver: Adds NodeSpecificConfig Info var
  • lxd/networks: netType.DBType usage in networksPost
  • lxd/networks: Create pending network node entries when network driver doesn't support per node config in networksPost
  • lxd/networks: Comments in networksPostCluster
  • lxd/networks: Comments in networkGet
  • lxd/networks: Start parent networks before dependents in networkStartup
  • lxd: Ensure all use of db.InstanceFilter defines instance type
  • lxd/project/permissions: Fixes AllowInstanceCreation tests
  • lxd/project/permissions: Error quoting
  • api: Add projects_networks
  • doc/storage: no need to escape underscore in bash examples
  • seccomp: fix bpf support detection
  • seccomp: improve bpf support detection
  • shared/validate: Use ParseUint in IsNetworkMTU
  • lxd/device/device/utils/network: Change argument for NetworkSetDevMTU to uint32
  • lxd/device/device/utils/network: NetworkSetDevMTU usage
  • lxd/network/network/utils: Changes GetDevMTU to return uint32
  • lxd/network/openvswitch/ovs: Adds OVNEncapIP function
  • lxd/network/driver/ovn: Removes ovnGeneveTunnelMTU constant
  • lxd/network/network/utils/ovn: Removes OVNInstanceDeviceMTU function
  • lxd/network/driver/ovn: Updates getBridgeMTU() to not depend on ovnGeneveTunnelMTU
  • lxd/network/driver/ovn: Adds getOptimalBridgeMTU and getUnderlayInfo functions
  • lxd/network/driver/ovn: Updates setup to generate an optimal bridge.mtu setting if not specified manually
  • lxd/device/nic/ovn: Read mtu directly from parent network config bridge.mtu setting
  • doc/projects: Sort config keys
  • lxd/networks: Enforces manage-networks RBAC permission for managing networks
  • lxd/network: Only adding pseudo pending node records when in cluster in networksPost
  • lxd/project/permissions: Typo
  • lxd/db/cluster/open: Adds features.networks to default project on new database
  • lxd/storage/cephfs: Fix quota on new volumes
  • lxd/networks: Allow network deletion in projects
  • lxc/remote: Add project selection logic
  • i18n: Update translation templates
  • lxd/network: Removes client side default network type when creating network
  • lxd/networks: Default to ovn network type when creating non-default network project
  • lxd/network: Removes client side default network type when creating network
  • lxd/networks: Default to ovn network type when creating non-default network project
  • api: Adds projects_networks_restricted_uplinks extension
  • doc/projects: Adds restricted.networks.uplinks
  • lxd/networks: Updates doNetworkUpdate to use n.Validate so that project is available to validator
  • lxd/network/network/load: Removes unused Validate
  • lxd/network/network/load: Renames project arg to projectName for clarity
  • lxd/api/project: Adds restricted.networks.uplinks to validation
  • lxd/network/driver/ovn: Adds allowedUplinkNetworks function
  • lxd/network/driver/ovn: Enforce project restricted.networks.uplinks setting
  • lxd/instances: Fix ceph cluster target move
  • lxd/cgroup: Fix memory.swappiness detection
  • lxd/db: Adds boolean support to doDbQueryScan
  • lxd/sys/fs: initDirs comment
  • lxd/sys/fs: Removes backups/instances and backups/custom from pre-storage mount setup
  • lxd/sys/fs: initDirs error quoting
  • lxd/sys/fs: Adds initStorageDirs to be called after storage pools and daemon volumes are mounted
  • lxd/sys/os: Adds InitStorage
  • lxd/daemon: Call d.os.InitStorage after daemon storage volumes are mounted
  • lxd/backup/instance/config: Renames InstanceConfig to Config
  • lxd/backup/backup/config: Makes Config fields omitempty so custom volume's encoded yaml doesn't contain instance fields
  • lxd/backup/backup/config: Adds comment to Container field explaining that VM backups use this too
  • lxd/storage/pool/interface: backup.Config usage
  • lxd/api/internal: backup.ParseConfigYamlFile usage
  • lxd/storage/backend: backup.Config usage
  • lxd/backup: Moves Instance interface into own file
  • lxd/backup: Moves Info struct and GetInfo function into own file
  • lxd/backup: Renames backup to backup_common
  • lxd/backup/backup/common: Renames Backup to BackupCommon
  • lxd/backup/backup/instance: Adds InstanceBackup using CommonBackup as basis
  • lxd/backup: Changes pruneExpiredContainerBackups to use InstanceBackup.Delete() function
  • lxd/instance/instance/utils: backup.InstanceBackup usage
  • lxd/instance/instance/interface: backup.InstanceBackup usage
  • lxd/instance/drivers: backup.InstanceBackup usage
  • lxd/rbac: Avoid tight retry loop
  • lxd/rbac: Directly handle re-tries on 504
  • lxd/backup/backup/utils: Adds TarReader function
  • lxd/backup/backup/info: Changes Type field from api.InstanceType to Type
  • lxd/backup/backup/info: Updates GetInfo to use TarReader
  • lxc/backup: Updates backupWriteIndex to use backup.Type
  • lxd/backup/backup/info: GetInfo consistent comment endings
  • lxd/backup/backup/info: Updates GetInfo to support backup.Type
  • lxd/db/backups: InstanceBackup comment
  • lxd/db/backups: projectName argument renaming
  • lxd/db/storage/volumes: Set Snapshot: true in StorageVolumeArgs returned from GetLocalStoragePoolVolumeSnapshotsWithType
  • lxd/instance: Spacing
  • lxd/storage/drivers/driver/btrfs/utils: Switches to backup.TarReader
  • lxd/storage/drivers/driver/btrfs: Consistent comment ending
  • lxd/storage/drivers/driver/zfs/volumes: consistent comment ending
  • lxd/storage/drivers/generic/vfs: Consistent comment ending
  • lxd/backup/backup/info: Adds note about legacy container.bin optimized type check
  • lxd/backup/backup/instance: Fix old parent directory removal in InstanceBackup.Rename()
  • lxd/backup/backup/config: Adds VolumeSnapshots to Config struct
  • lxd/backup/backup/info: Adds Config field to Info struct
  • lxd/backup/backup/info: Adds TypeCustom backup type for custom volumes
  • lxd/backup/backup/volume: Adds custom volume type
  • lxd/storage/volumes/backup: Adds custom volume backup route handlers
  • client/interfaces: Add custom volume backup functions
  • client/interfaces: Adds StoragePoolVolumeBackupArgs struct
  • client/lxd/storage/volumes: Add custom volume backup functions
  • api: Adds custom_volume_backup extension
  • doc/rest-api: Documents custom volume backup routes
  • lxc/storage/volumes: Add import and export for custom volumes
  • lxd/backup: Adds volumeBackupCreate and volumeBackupWriteIndex functions
  • lxd/api/1/0: Registers custom volume backup route handlers
  • lxd/db/backups: Adds StoragePoolVolumeBackup type
  • lxd/db/backups: Adds custom volume backup lifecycle functions
  • lxd/db/cluster: Adds storage_volumes_backups table
  • lxd/db/operations/types: Adds custom volume backup operations types
  • lxd/db/storage/volume/snapshots: Adds GetStorageVolumeSnapshotsNames function
  • lxd/storage/backend: Adds BackupCustomVolume and CreateCustomVolumeFromBackup functions
  • lxd/storage/backend/lxd: Renames custom volume backups in RenameCustomVolume
  • lxd/storage/backend/lxd: Deletes custom volume backups in DeleteCustomVolume
  • lxd/storage/drivers/driver/btrfs/volumes: Adds support for optimized custom volume backups
  • lxd/storage/drivers/driver/dir/volumes: Adds support for custom volume backups nil post hooks
  • lxd/storage/drivers/driver/zfs/volumes: Adds support for optimized custom volume backups
  • lxd/storage/drivers/driver/zfs/volumes: Adds support for custom volume backups nil post hooks
  • lxd/storage/drivers/generic/vfs: Adds support for custom volume backups to genericVFSBackupVolume
  • lxd/storage/drivers/generic/vfs: Adds support for custom volume backups to genericVFSBackupUnpack
  • lxd/storage/pool/interface: Adds BackupCustomVolume and CreateCustomVolumeFromBackup
  • lxd/storage/volume: Adds createStoragePoolVolumeFromBackup and hook in storagePoolVolumesTypePost
  • lxd/storage/volumes/utils: Adds storagePoolVolumeBackupLoadByName function
  • shared/api/storage/pool/volume: Adds custom volume backup structs
  • test/suites/backup: Adds tests for custom volume backups
  • i18n: Update translation template
  • i18n: Update translations from weblate
  • lxc: Always use HostPathFollow
  • lxd/storage/drivers/generic/vfs: Fixes custom volume root dir ownership issue in genericVFSBackupUnpack
  • test/suites/backup: Use project argument in test_backup_import_with_project
  • test/suites/backup: Use project argument in test_backup_export_with_project
  • test/suites/backup: Use project argument in test_backup_volume_export_with_project
  • test/suites/backup: Adds test for backup import into different project in test_backup_import_with_project
  • test/suites/backup: Comment consistency
  • test/suites/backup: Add test for custom volume import
  • test/suites/backup: Add test for importing custom volume into other project
  • lxd/api: Restrict access to daemon config
  • lxd/storage: Allow ceph/cephfs for images/backups
  • client/interfaces: Adds Name field to InstanceBackupArgs
  • client/lxd/instances: Adds custom name restore support to CreateInstanceFromBackup
  • lxd/instance/drivers/qmp/monitor: Adds GetBalloonSizeBytes and SetBalloonSizeBytes
  • lxd/instance/drivers/driver/qemu: Adds live shrinking of memory
  • lxd/devices/config/devices/utils: Adds doc block for deviceEquals and deviceEqualsDiffKeys
  • lxd/device/config/devices: Comment clean up
  • lxd/device/config/devices: Improves comments and variable naming in Update
  • lxd/device/config/devices: Fixes bug in Update where allChangedKeys only contains changed keys from last device
  • lxd/instance/drivers/driver/lxc: Whitespace
  • lxd/device/config/devices: Handles nil updateFields function in Update
  • lxd/instance/drivers/driver/qemu: Removes logic duplication in live update
  • lxc/import: Adds optional instance name argument to lxc import command
  • lxd/instances/post: Adds custom name support for backup import to createFromBackup
  • lxd/instances/post: createFromBackup usage in containersPost for custom backup name restore
  • lxd/api/internal: Adds AllowNameOverride to internalImportPost
  • lxd/api/internal: Override instance name in internalImport when AllowNameOverride is set
  • client/interfaces: Adds Name field to StoragePoolVolumeBackupArgs to bring in line with InstanceBackupArgs
  • client/lxd/storage/volumes: Updates CreateStoragePoolVolumeFromBackup to accept volume name override via X-LXD-name header
  • lxc/storage/volume: Adds optional volume name argument to lxc storage volume import
  • lxd/storage/volumes: Adds volName arg to createStoragePoolVolumeFromBackup
  • lxd/storage/volumes: createStoragePoolVolumeFromBackup usage in storagePoolVolumesTypePost
  • lxd/storage/backend/lxd: Updates CreateCustomVolumeFromBackup to support custom volume import name
  • api: Adds backup_override_name extension
  • test/suites/backup: Adds tests for custom volume import name override
  • test/suites/backup: Adds instance import name override tests
  • i18n: Update translation template
  • doc/networks: Simplifies OVN single node setup instructions
  • lxd/device/nic/ovn: Improves error message in Start
  • lxd/network/driver/ovn: Implements DHCPv4Subnet and DHCPv6Subnet to allow static IPs to be set
  • lxd/network/openvswitch/ovn: Fix spelling of OVNIPv6AddressModeDHCPStateful and OVNIPv6AddressModeDHCPStateless values
  • lxd/network/driver/ovn: Adds support for ipv6.dhcp.stateful
  • doc/networks: Documents ipv6.dhcp.stateful option for OVN networks
  • shared/api: Not all disks have a device path
  • lxd/resources: Ignore rbd devices
  • shared/simplestreams: Fix stream's index download url
  • lxd/device/device/interface: Adds NICState interface for getting NIC state
  • lxd/device/nic/bridged: Implements NICState interface by adding State function
  • lxd/instance/drivers/driver/qemu: Refactors RenderState to support multiple NIC types in the future
  • lxd/network/openvswitch/ovn: Adds LogicalSwitchPortDynamicIPs function
  • lxd/network/openvswitch/ovn: Updates LogicalSwitchPortSetDNS to use LogicalSwitchPortDynamicIPs
  • lxd/network/driver/ovn: Adds instanceDevicePortDynamicIPs function
  • lxd/network/network/utils/ovn: Adds OVNInstanceDevicePortDynamicIPs function
  • lxd/device/nic/ovn: Implements NICState interface by adding State function
  • lxd/instance/drivers/qmp/monitor: Renames GetMemoryBalloonSizeBytes
  • lxd/instance/drivers/qmp/monitor: Renames SetMemoryBalloonSizeBytes
  • lxd/instance/drivers/qmp/monitor: Adds GetMemorySizeBytes function
  • lxd/instance/drivers/driver/qemu: Adds qemuDefaultMemSize constant
  • lxd/instance/drivers/driver/qemu: Updates updateMemoryLimit to allow memory resize back to boot time size
  • lxd/instance/drivers/driver/qemu: Updates IsRunning to not check for BROKEN state
  • lxd/instance/drivers/driver/qemu: Updates statusCode() to detect if monitor failure with running VM
  • lxd/apparmor: Allow access to zoneinfo files
  • lxd/apparmor: Add /etc/localtime to the list
  • lxd/project: Always allow cloud-init:config drives
  • doc/image-handling: Cover publishing
  • lxd/network/network/utils: Adds GetNeighbourIPs function
  • lxd/network/network/utils: Updates GetLeaseAddresses to return only net.IP list
  • lxd/device/nic/bridged: Updates State() to return partial data
  • refuse empty passwords
  • lxd/storage: Adds rsync.compression config key
  • doc: Adds rsync.compression
  • api: storage_rsync_compression
  • tests: Valid rsync.compression
  • doc/index: Add libsqlite3-dev back to dependencies
  • lxd/firewall/drivers/driver/nftables: Updates nft parser to handle nft sets with composite type field
  • shared/validate/validate: Increases max MTU to 16384 to support super jumbo packets
  • lxd/apparmor/forkproxy: Fix bad profile name
  • lxd/apparmor/forkproxy: Allow writing to log path
  • lxc: Better handle copy/move between projects
  • lxd/apparmor: Fix version parsing
  • lxd/dnsmasq: Switch to Parse for version parsing
  • lxd/firewall/drivers: Fix to Parse for version parsing
  • lxd/rsync: Switch to Parse for version parsing
  • shared/version: Make patch optional
  • lxd/networks: Log error in doNetworksCreate after failed create if cleanup fails too
  • lxd/network/driver: Improve missing parent network error message
  • lxd/network/driver/ovn: Moves uplink type agnostic parent port allocation logic into allocateParentPortIPs()
  • lxd/network/driver/ovn: Better error messages
  • lxd/network/driver/ovn: Moves parent port lock into deleteParentPort
  • lxd/network/driver/ovn: Moves parent port lock into startParentPort
  • lxd/network/driver/ovn: deleteParentPortBridge comments
  • lxd/network/driver/ovn: Don't setup SNAT if no external uplink IPs
  • lxd/network/driver/ovn: Makes setting up external router port and switch conditional on having external IPs
  • lxd/network/driver/ovn: Removes old comment
  • lxd/network/driver/ovn: Fix sentence in startParentPortBridge error
  • lxd/network/driver/ovn: Fixes error message in setupParentPortBridge
  • lxd/network/network/utils: Moves bridge related functions into own file
  • static_analysis: exclude vendored headers from spell checking
  • static_analysis: exclude .git
  • shift_linux: vendor posix_acl_xattr.h
  • seccomp: vendor bpf headers
  • shares/validate: Whitespace
  • lxd/network/openvswitch/ovn: Updates RecursiveDNSServer to be list of IPs
  • lxd/network/driver/ovn: Updates allocateParentPortIPs to detect the parent network IP address and DNS settings
  • lxd/network/driver/ovn: Updates n.allocateParentPortIPs usage
  • lxd/network/driver/ovn: Updates setup IPv6 RDNSS setting
  • lxd/apparmor/forkproxy: Socket path fixes
  • lxd/images: Fix crash when no "info" struct
  • doc/networks: Clarifies use of ovn ranges settings in bridge network
  • lxd/util/net: Updates SysctlSet to support setting multiple keys
  • shared/validate: Adds IsNetworkAddressList function
  • lxd/network/network/utils: Adds VLANInterfaceCreate function
  • lxd/device/device/utils/network: network.VLANInterfaceCreate usage
  • lxd/device/device/utils/network: Removes NetworkRemoveInterface function
  • lxd/network/network/utils: Adds InterfaceRemove and InterfaceExists functions
  • lxd/network/network/utils: InterfaceExists usage
  • lxd/device/device/utils/network: network.InterfaceRemove usage
  • lxd/device/nic: network.InterfaceRemove usage
  • lxd/network/driver/bridge: InterfaceExists usage
  • lxd/network/driver/ovn: InterfaceExists usage
  • lxd/network/network/utils: Adds InterfaceSetMTU function
  • lxd/device: network.InterfaceSetMTU usage
  • lxd/network/driver/ovn: Inherit MTU from uplink bridge for OVS bridge and connecting veth pair
  • lxd/network/driver/ovn: Remove dependency on sysctl command and use util.SysctlSet instead
  • lxd/network/driver: Improves comments
  • api: Adds network_type_physical extension
  • doc/networks: Adds docs for physical network type
  • lxd/db/networks: Adds physical network type constant
  • lxd/network/driver/physical: Adds physical driver
  • lxd/network/driver/ovn: Adds support for physical network as uplink
  • lxd/network/driver/physical: Change checkParentUse to return a bool if in use
  • lxd/network/driver/ovn: Changes uplink network in use check to look at LXD DB
  • lxd/network/driver/ovn: Handle uplink network changing
  • lxd/network/driver/ovn: Comment clarity
  • lxd/storage/pools: Gives clear error message when trying to create duplicate storage pool in single node
  • lxd/events: Validate type
  • lxd/events: Prevent logging access to non-admin
  • lxd/daemon: Clean shutdown on SIGPWR/SIGTERM
  • lxd/operations: Don't directly trigger shutdown
  • lxd: Prevent internal cluster migration of instances with backups
  • lxd/instance/drivers: Enable USB for VMs
  • lxd/instance/drivers: Add USB controller to QEMU config
  • lxd/apparmor: Fix devPaths in QEMU profile
  • db: Retry transient errors for longer
  • db: Always retry driver.ErrBusy, regardless of the error message
  • db: Retry failed rollbacks if they are due to transient errors
  • db: Explicitly rollback leftover transactions when a new one can't be started
  • db: Retry to begin a new transaction after an explicit rollback attempt
  • lxd/operations: Fix timeout
  • lxd/daemon: Allow more operations during shutdown
  • lxd/include: Relocate ifndef for NEWCGROUP
  • doc: Remove stray _ escapes in security.md
  • lxc-to-lxd: Handle snap better
  • lxd/device/usb: Allow USB devices for VMs
  • lxd/device: Add bus and dev number to USBEvent
  • lxd/apparmor: Allow USB specific paths
  • lxd/device/config: Add USBDevice to RunConfig
  • lxd/events: Handle default permissiosn in projects
  • lxd/dnsmasq: Adds 100ms sleep to successful Kill() to allow sockets to be released by OS
  • lxd/instance/drivers/driver/qemu: Restores ability to resize VM disks
  • lxd/device/disk: Adds comment about VM instances depending on CanHotPlug fields for stopped disk resize
  • lxd/instance/qemu: Fix bad event name
  • lxd/storage: Check base image is available locally
  • lxd/storage/drivers/driver/lvm: Don't remove empty thinpool and volume group if lvm.vg.force_reuse enabled
  • shared/validate/validate: Removes inaccurate comments about optional values
  • shared/validate/validate: Adds IsNetwork and IsNetworkList functions
  • shared/validate/validate: Re-orders IP validation functions
  • lxd/device/nic/ovn: Comment
  • doc/api-extensions: Removes mention of "parent" from projects_networks_restricted_uplinks feature
  • doc/networks: Switch to "uplink" terminology for external OVN network access
  • lxd/network/driver/ovn: Replace parent terminology with uplink
  • lxd/network/driver/common: Ban : char from network names in ValidateName()
  • lxd/device: Handle USB devices for VMs
  • lxd/instance/drivers: Add qemuUSBDev template
  • lxd/instance/drivers: Add USB devices to qemu config
  • Revert "lxd/instance/drivers: Enable USB for VMs"
  • lxd/driver/qemu: Add spice usb ports
  • lxd-agent: Fix defer in for loop
  • forksyscall: use correct function
  • shared/util.go: use string method with stdout and stderr
  • simplestreams.go: remove unneeded fmt.Sprintf and simplify getImages()
  • lxd/instance/drivers: Updates templateApplyNow to close files at end of each iteration
  • lxd/network/network/utils: Adds SubnetContains function
  • lxd/network/network/utils: Adds SubnetIterate function
  • lxd/network/network/utils: Adds SubnetParseAppend function
  • api: Adds network_ovn_external_subnets extension
  • doc/networks: Adds ipv4.routes and ipv6.routes settings to physical network
  • lxd/network/driver/physical: Adds ipv4.routes and ipv6.routes config keys
  • doc/projects: Removes trailing full stop
  • doc/projects: Adds restricted.networks.subnets
  • lxd/api/project: Adds restricted.networks.subnets config key
  • lxd/api/project: Moves projectConfigKeys inside projectValidateConfig and adds state
  • lxd/api/project: projectValidateConfig usage
  • lxd/api/project: Adds projectValidateRestrictedSubnets function
  • lxd/api/project: Adds restricted.networks.subnets validation to projectValidateConfig
  • doc/networks: Adds ipv4.routes.external and ipv6.routes.external to ovn networks
  • lxd/network/openvswitch/ovn: Adds LogicalRouterRouteDelete function
  • lxd/network/openvswitch/ovn: Updates LogicalSwitchPortSetDNS to return IPs used for DNS records
  • lxd/network/openvswitch/ovn: Adds LogicalRouterDNATSNATAdd function
  • lxd/network/openvswitch/ovn: Adds LogicalRouterDNATSNATDelete function
  • lxd/network/openvswitch/ovn: Updates LogicalRouterRouteAdd to support mayExist argument
  • lxd/network/network/utils/ovn: Updates OVNInstanceDevicePortAdd to take an externalRoutes argument
  • lxd/network/network/utils/ovn: Updates OVNInstanceDevicePortDelete to accept an externalRoutes argument
  • lxd/network/driver/ovn: Moves uplink network validation into validateUplinkNetwork function
  • lxd/network/driver/ovn: Updates Validate to check network exists and checks external IP routes
  • lxd/network/driver/ovn: Adds DNS revert to instanceDevicePortAdd
  • lxd/network/driver/ovn: client.LogicalRouterRouteAdd usage
  • lxd/network/driver/ovn: Adds externalRoutes support to instanceDevicePortAdd
  • lxd/network/driver/ovn: Delete externalRoutes in instanceDevicePortDelete
  • forkmount: improve
  • seccomp: improve logging for the seccomp notifier
  • seccomp: make sure that insertMountLXD() doesn't call into LXC
  • lxd/device/nic: Adds ipv4.routes.external and ipv6.routes.external to nicValidationRules
  • lxd/device/nic/ovn: Adds support for ipv4.routes.external and ipv6.routes.external
  • doc/instances: Adds ovn NIC documentation
  • doc/instances: Re-works NIC device docs to explain nictype and network fields
  • lxd/network/driver/ovn: Adds support for OVN NIC internal routes
  • lxd/network/network/utils/ovn: Adds OVN NIC internal route support to OVNInstanceDevicePortAdd and OVNInstanceDevicePortDelete
  • lxd/device/nic/ovn: Adds ipv4.routes and ipv6.routes settings for internal route support
  • lxd/network/driver/bridge: Fixes inconsistency between normal bridge and fan bridge default ipv4.nat value
  • api: Adds network_ovn_nat extension
  • doc/networks: Adds ipv4.nat and ipv6.nat to OVN networks
  • lxd/network/driver/ovn: Adds ipv4.nat and ipv6.nat support
  • lxd/patches: Adds patchNetworkOVNEnableNAT patch to enable NAT on OVN networks
  • i18n: Update translations from weblate

Try it for yourself

This new LXD release is already available for you to try on our demo service.

Downloads

The release tarballs can be found on our download page.

Binary builds are also available for:

  • Linux: snap install lxd
  • MacOS: brew install lxc
  • Windows: choco install lxc

LXD 4.6 has been released

18th of September 2020

Introduction

The LXD team is very excited to announce the release of LXD 4.6!

This was a shorter development cycle for us but still a pretty busy release.

The highlight is no doubt the ability to put networks in LXD projects, allowing for self-served network creation in shared LXD environments.

Enjoy!

New features and highlights

Networks in projects

Building on all the work that's happened around OVN networks, it's now possible to enable a new features.networks flag on a project. With that done, the project can then have its own networks invisible to other projects and based on OVN.

stgraber@castiana:~$ lxc network list
+---------+------+---------+-----------------+---------------------------+-------------------------------------+---------+---------+
|  NAME   | TYPE | MANAGED |      IPV4       |           IPV6            |             DESCRIPTION             | USED BY |  STATE  |
+---------+------+---------+-----------------+---------------------------+-------------------------------------+---------+---------+
| default | ovn  | YES     | 10.187.181.1/24 | fd42:bb2b:e7d1:f3ba::1/64 | Default OVN network for the project | 3       | CREATED |
+---------+------+---------+-----------------+---------------------------+-------------------------------------+---------+---------+

With that feature enabled, host interfaces and non-OVN networks all disappear, leaving only those networks owned directly by the project.

AppArmor profiles for qemu

Building onto the work done in past releases around AppArmor profile generation for a variety of our sub-processes, this release now introduces confinement for qemu as used by LXD virtual machines.

This also introduces raw.apparmor to virtual-machines. This should only really be relevant if used in conjunction with raw.qemu as all normal LXD configuration options should be handled by our generated profile (or else, it's a bug).

Dqlite changes

Shortly after LXD 4.5 was released, a major change was made to upstream dqlite.

Rather than relying on our fork of sqlite3 which was adding some hooks used to intercept filesystem writes and replicating to other nodes, we are now using a different approach to get VFS access from a standard sqlite3.

While invisible to users, this should help packagers a fair bit by removing two custom dependencies of LXD, that custom sqlite3 and libco.

LXD with dqlite can now use any standard sqlite3 of version 3.25 or higher.

Complete changelog

Here is a complete list of all changes in this release:

  • shared/log15: Fix due to recent unix change
  • Handle signals in non-interactive sessions.
  • Fix hang when control is not provided in non-interactive mode.
  • lxd/db/cluster: Fix incorrect storage volume node IDs
  • lxd/db/cluster: Fix node id nil values
  • lxd/storage/volumes: Only apply config changes when restoring snapshot if non-nil config is supplied
  • lxd/network/driver/bridge: Exclude /32 underlay addresses from overlay address generation
  • lxd/network/driver/ovn: Removes unnecessary dnsmasq logic in deleteParentPortBridge
  • lxd/device/device/utils/network: Removes networkRandomDevName
  • lxd/network/network/utils: Adds RandomDevName function
  • lxd/device: network.RandomDevName usage
  • lxd/network: Adds Description function
  • api: Adds network_bridge_ovn_bridge API extension
  • lxd/network/driver/ovn: Updates parentPortBridgeVars to use ovn.ovs_bridge from parent network
  • lxd/network/driver/bridge: Adds ovn.ovs_bridge config key for OVN networks using bridge as parent
  • doc/api: Removes underscore escaping when used inside backticks
  • doc/networks: Adds ovn.ovs_bridge key to bridge networks
  • lxd/instance/drivers: Fixes crash when removing device that cant be loaded
  • lxd/db/cluster: Adds networks to project usage view
  • lxc/storage_volume: Fix usage string
  • po: Update translations
  • lxd/network/driver/ovn: Add and delete local chassis ID to HA chassis group on start/stop
  • lxd/network/openvswitch/ovn: Adds ChassisGroupChassisDelete function
  • lxd/network/driver/ovn: Adds ovn.name setting to store OVN logical network name
  • doc/networks: Adds ovn.name to OVN network doc
  • api: Adds network_ovn_name API extension
  • lxd/drivers/qemu: Use gic-version=max on aarch64
  • seccomp: fix compilation on kernels without proper bpf.h
  • lxc/config: Update wording for profile/config
  • i18n: Update translation templates
  • lxc/export: Support writing to stdout
  • Drop custom SQLite and libco
  • validate: Consider + as unsafe in URL
  • lxd/instance/snapshots: Restrict naming
  • db: Handle NULL storage_volume description column in patch 34
  • lxd/storage/drivers/utils: Corrects argument order of mkfs in makeFSType for wider compatibility
  • Revert "api: Adds network_ovn_name API extension"
  • Revert "doc/networks: Adds ovn.name to OVN network doc"
  • Revert "lxd/network/driver/ovn: Adds ovn.name setting to store OVN logical network name"
  • Revert "doc/networks: Adds ovn.ovs_bridge key to bridge networks"
  • Revert "lxd/network/driver/bridge: Adds ovn.ovs_bridge config key for OVN networks using bridge as parent"
  • Revert "lxd/network/driver/ovn: Updates parentPortBridgeVars to use ovn.ovs_bridge from parent network"
  • lxd/network/driver/ovn: Removes unused import
  • lxd/network/driver/ovn: Removes unnecessary network ID lookup
  • lxd/api/cluster: Start networks after cluster join
  • lxd/networks: Only call n.Start() during doNetworksCreate if client type isn't joiner
  • lxd/network/driver/ovn: Adds pause between chassis group entry deletion and uplink port removal
  • lxd/network/driver/ovn: parentPortBridgeVars whitespace
  • Revert "api: Adds network_bridge_ovn_bridge API extension"
  • lxd/db/cluster/update: Adds features.networks to default project
  • lxd/project: Adds NetworkProject function
  • lxd/db/networks: Updates networkState and usage to support projects
  • lxd/db/networks: Updates getNetwork and usage to support projects
  • lxd/network/network/utils: Updates IsInUseByInstance to translate instance's project to a network project
  • lxd/network/network/utils: Updates isInUseByDevices to support projects
  • lxd/network/network/utils: Updates IsInUseByProfile to accept a db.Profile rather than api.Profile
  • lxd/network/network/utils: Updates UpdateDNSMasqStatic to use default project
  • lxd/network/network/utils: Updates GetLeaseAddresses to use default project
  • lxd/network/network/utils: Adds UsedBy function and unexports related functions not used elsewhere
  • lxd/db/networks: Updates GetNonPendingNetworks to return a map of project networks
  • lxd/network/driver/ovn: Updates parentAllAllocatedIPs to use update GetNonPendingNetworks
  • lxd/network/network/utils: Adds network usage by other networks detection in UsedBy
  • lxd/network/driver/common: Updates IsUsed to use UsedBy
  • lxd/network/driver/bridge: Adds existing interface check as Create function
  • lxd/network/driver/bridge: Push down interface name conflict check to Rename
  • lxd/network/driver: Removes duplicated "in use" check that is now done at top level
  • lxd/profiles/utils: Renames project arg to projectName in doProfileUpdate
  • lxd/profiles: Updates usage of ValidDevices in profilesPost
  • lxd/patches: Updates to support network projects
  • lxd/networks/utils: Removes networkGetInterfaces function
  • lxd/networks/utils: Updates networkUpdateForkdnsServersTask to support projects
  • lxd/networks: Updates networkPost validation
  • lxd/networks: Updates networksGet to support projects
  • lxd/networks: Updates networksPost to support projects
  • lxd/networks: Updates networksPostCluster to support projects
  • lxd/networks: Updates doNetworksCreate to support projects
  • lxd/networks: Updates networkGet to support projects
  • lxd/networks: Updates doNetworkGet to support projects and to use network.UsedBy
  • lxd/networks: Updates networkDelete to support projects
  • lxd/networks: Updates networkPost to support projects
  • lxc/networks: Updates networkPut to support projects
  • lxd/networks: Updates doNetworkUpdate to support projects
  • lxd/networks: Updates networkLeasesGet to support network projects
  • lxd/networks: Updates networkStartup and networkShutdown to load networks from all projects
  • lxd/network/network/load: Updates load functions to support projects
  • lxd/network/network/interface: Adds project name to init function
  • lxd/network/driver/common: Adds project support
  • lxd/network/driver/ovn: Load parent network from default project
  • lxd/device/nictype: Adds conversion of device project to network project for NICType validation
  • lxd/instance/instance/utils: Project name is needed to validate instance devices
  • lxd/instance: instance.ValidDevices project argument usage
  • lxd/instance/drivers/driver/lxc: instance.ValidDevices project usage
  • lxd/instance/drivers/driver/lxc: Error quoting
  • lxc/instance/drivers/driver/lxc: nictype.NICType project usage
  • lxd/instance/drivers/driver/qemu: instance.ValidDevices project usage
  • lxd/instance/drivers/driver/qemu: nictype.NICType project usage
  • lxd/instance/drivers/load: Adds project support to validDevices
  • lxd/device/device/load: Adds project support to load function
  • lxd/device/device/utils/network: Use default project for veth route functions
  • lxd/device/nic/bridged: Use default project for bridge networks
  • lxd/device/nic/macvlan: Use default project for macvlan networks
  • lxd/device/nic/ovn: Load parent network's project from instance's project
  • lxd/device/nic/sriov: Use default project for parent network
  • lxd/device/proxy: NICType project usage
  • lxd/network/driver/common: Send project when notifying nodes of network changes
  • lxd/networks: Send project when creating network on remote node
  • lxd/db/migration/test: Add network project support
  • lxd/cluster/membership/test: Add network project support
  • lxd/api/cluster: Uses default project for networks during cluster join
  • lxd/networks: Updates networksPostCluster to use tx.GetNetworkID with project
  • lxd/db/networks: Adds project support to CreatePendingNetwork
  • lxd/db/networks: Adds project support to GetNetworkID
  • lxd/db/networks/test: Updates GetNetworkID usage with project
  • shift_linux: tweak ACL handling
  • tar_write: switch to PAXRecords to preserve ACLs too
  • doc/projects: Adds features.networks
  • lxc/project: Adds features.networks to project list output
  • lxd/api/project: Adds features.networks support but does not enable by default
  • lxd/init: Updates initDataNodeApply to return a revert function
  • lxd/main/init: Updates Run to use revert
  • lxd/api/cluster: Adds project support for networks
  • lxd/api/cluster: Updates clusterPutJoin to use revert
  • lxd/api/cluster: Updates clusterInitMember to return a revert function
  • lxd/api/cluster: Logging quoting
  • lxd/api/cluster: clusterPutJoin project support
  • lxd/api/cluster: clusterInitMember project support
  • lxd/api/cluster: Adds NetworksPost to internalClusterPostNetwork
  • lxd/api/cluster: Checks network types match in clusterCheckNetworksMatch
  • lxd/init: Adds internalClusterPostNetwork to initDataNode
  • lxd/init: initDataNodeApply project support
  • lxd/init: initDataNodeApply comment consistency
  • lxd/main/init/auto: Updates RunAuto to send internalClusterPostNetwork
  • lxd/main/init/dump: Updates RunDump to use internalClusterPostNetwork
  • lxd/main/init/interactive: Updates RunInteractive to use internalClusterPostNetwork
  • lxd/main/init/interactive: Updates askNetworking to use internalClusterPostNetwork
  • lxd/network: Adds Info struct and function
  • lxd/network/network/load: Renames ValidateName to ValidateNameAndProject
  • lxd/network/driver/ovn: Adds Info function
  • lxd: network.ValidateNameAndProject usage
  • lxd/network/driver/ovn: deleteParentPort fixed to allow deletion of network with no parent
  • lxd/project: Updates NetworkProject to return project config
  • doc/project: Adds limits.networks setting
  • lxd/api/project: Adds limits.networks setting
  • lxd/networks: Enforces limits.networks in networksPost
  • lxd: project.NetworkProject usage
  • lxd/networks: Don't allow non-default network projects to access info about the physical interfaces in doNetworkGet
  • lxd/api/cluster: Create or update local node projects to sync with cluster in clusterInitMember
  • i18n: Update translation templates
  • shift_linux: handle ACL unshifting correctly
  • shift_linux: handle capability unshifting correctly
  • shift_linux: converty to CBytes not to CString
  • lxc/utils: Add usage function
  • lxc: Drop command name from translation
  • i18n: Update translation template
  • shared/subprocess: Set err on non-zero
  • lxd/instances/qemu: Use subprocess
  • lxd/instance: Add DevPaths
  • lxd/apparmor: Fix unload/delete
  • lxd/apparmor/instance: Sort context
  • lxd/apparmor: Prepare for qemu
  • lxd/apparmor: Add qemu profile
  • lxd/instance/drivers/driver/qemu: Switch to threads locking mode and writeback cache mode for BTRFS
  • doc/instance: raw.apparmor now implemented for VM
  • lxd/apparmor: Tweak qemu profile for non-snap
  • shared/idmap/shift/linux: Handle nil IdmapSet in UnshiftACL and UnshiftCaps
  • shared/instancewriter/instance/tar/writer: Handle nil idmapSet and log shifting errors in WriteFile
  • lxc: Better handle arguments
  • lxc: Unbundle sortorder
  • lxd/util/sys: Fixes GetExecPath when lxd binary has been removed/changed
  • lxd/db/images: Error message uppercase first letter
  • i18n: Update translations from weblate
  • lxd/instance: Adds instanceImageTransfer and updates instanceCreateFromImage to use it
  • lxd/daemon/images: Error quoting
  • lxd/daemon/image: Adds logic to download image from another cluster node into ImageDownload
  • lxd/db/images/test: Fixes tests for LocateImage
  • test/suites/clustering: Adds test for image transfer between cluster nodes
  • bash-completion: use "list --format=csv" consistently
  • bash-completion: use regex grouping for lxc start
  • lxd/instance/qemu: Fix mem device naming
  • proxy bind= should accept host|instance as the doc says
  • Valid proxy type= values are all lower case so fix doc
  • s/descriptros/descriptors/
  • Revert "lxd/network/driver/bridge: Exclude /32 underlay addresses from overlay address generation"
  • lxd/network/driver/bridge: Skip lo interface when generating fan overlay address in addressForSubnet

Try it for yourself

This new LXD release is already available for you to try on our demo service.

Downloads

The release tarballs can be found on our download page.

Binary builds are also available for:

  • Linux: snap install lxd
  • MacOS: brew install lxc
  • Windows: choco install lxc

LXD 4.5 has been released

29th of August 2020

Introduction

The LXD team is very excited to announce the release of LXD 4.5!

This is another pretty busy release for LXD with the main highlight no doubt being the addition of OVN to our networking options.

On top of that, we have some welcome improvements to our container support with both the bpf syscall interception and the new allocation logic for pts devices.

And lastly, good improvements to clustering and to security with the improved remote storage work and the new AppArmor profiles.

Enjoy!

New features and highlights

Initial support for OVN virtual networks

LXD 4.5 includes the support for OVN virtual networks.

Those can be defined as a regular LXD managed network, very similar to a traditional bridge, except that those can cross cluster nodes and can have overlapping/conflicting subnets.

This is done through OVN and will be the basis for networks inside of LXD projects in the next LXD release. OVN networks in LXD must have a parent managed network, currently only managed bridges are supported (SR-IOV and macvlan coming in 4.6).

For now, provided you have OVN and OpenVswitch setup on your host, you can have LXD create virtual networks and attach instances to them in much the same way you would a normal bridge.

(Example done on Ubuntu 20.04 LTS with the 4.5 snap)

root@nuc01:~# apt install ovn-host ovn-central --yes
[snip]

root@nuc01:~# snap install lxd --channel=latest/candidate
lxd (candidate) 4.5 from Canonical✓ installed
root@nuc01:~# ovs-vsctl set open_vswitch . \
>   external_ids:ovn-remote=unix:/var/run/ovn/ovnsb_db.sock \
>   external_ids:ovn-encap-type=geneve \
>   external_ids:ovn-encap-ip=172.17.16.139
root@nuc01:~# lxd init --auto
root@nuc01:~# lxc network list
+--------+----------+---------+----------------+---------------------------+-------------+---------+
|  NAME  |   TYPE   | MANAGED |      IPV4      |           IPV6            | DESCRIPTION | USED BY |
+--------+----------+---------+----------------+---------------------------+-------------+---------+
| br0    | bridge   | NO      |                |                           |             | 0       |
+--------+----------+---------+----------------+---------------------------+-------------+---------+
| br-int | bridge   | NO      |                |                           |             | 0       |
+--------+----------+---------+----------------+---------------------------+-------------+---------+
| eno1   | physical | NO      |                |                           |             | 0       |
+--------+----------+---------+----------------+---------------------------+-------------+---------+
| lxdbr0 | bridge   | YES     | 10.19.114.1/24 | fd42:56de:74c7:40f5::1/64 |             | 1       |
+--------+----------+---------+----------------+---------------------------+-------------+---------+
root@nuc01:~# lxc network set lxdbr0 ipv4.dhcp.ranges=10.19.114.2-10.19.114.199
root@nuc01:~# lxc network set lxdbr0 ipv4.ovn.ranges=10.19.114.200-10.19.114.254
root@nuc01:~# lxc network set lxdbr0 ipv6.ovn.ranges=fd42:56de:74c7:40f5::200-fd42:56de:74c7:40f5::254
root@nuc01:~# lxc network create my-virtual-01 network=lxdbr0 --type=ovn
Network my-virtual-01 created
root@nuc01:~# lxc network create my-virtual-02 network=lxdbr0 --type=ovn
Network my-virtual-02 created
root@nuc01:~# lxc network list
+---------------+----------+---------+-----------------+---------------------------+-------------+---------+
|     NAME      |   TYPE   | MANAGED |      IPV4       |           IPV6            | DESCRIPTION | USED BY |
+---------------+----------+---------+-----------------+---------------------------+-------------+---------+
| br0           | bridge   | NO      |                 |                           |             | 0       |
+---------------+----------+---------+-----------------+---------------------------+-------------+---------+
| br-int        | bridge   | NO      |                 |                           |             | 0       |
+---------------+----------+---------+-----------------+---------------------------+-------------+---------+
| eno1          | physical | NO      |                 |                           |             | 0       |
+---------------+----------+---------+-----------------+---------------------------+-------------+---------+
| lxdbr0        | bridge   | YES     | 10.19.114.1/24  | fd42:56de:74c7:40f5::1/64 |             | 1       |
+---------------+----------+---------+-----------------+---------------------------+-------------+---------+
| lxdovn1       | bridge   | NO      |                 |                           |             | 0       |
+---------------+----------+---------+-----------------+---------------------------+-------------+---------+
| my-virtual-01 | ovn      | YES     | 10.178.251.1/24 | fd42:39c7:797c:7977::1/64 |             | 0       |
+---------------+----------+---------+-----------------+---------------------------+-------------+---------+
| my-virtual-02 | ovn      | YES     | 10.82.211.1/24  | fd42:5045:b316:b251::1/64 |             | 0       |
+---------------+----------+---------+-----------------+---------------------------+-------------+---------+
root@nuc01:~# lxc network create my-virtual-03 network=lxdbr0 ipv4.address=10.82.211.1/24 ipv6.address=fd42:5045:b316:b251::1/64 --type=ovn
Network my-virtual-03 created
root@nuc01:~# lxc network list
+---------------+----------+---------+-----------------+---------------------------+-------------+---------+
|     NAME      |   TYPE   | MANAGED |      IPV4       |           IPV6            | DESCRIPTION | USED BY |
+---------------+----------+---------+-----------------+---------------------------+-------------+---------+
| br0           | bridge   | NO      |                 |                           |             | 0       |
+---------------+----------+---------+-----------------+---------------------------+-------------+---------+
| br-int        | bridge   | NO      |                 |                           |             | 0       |
+---------------+----------+---------+-----------------+---------------------------+-------------+---------+
| eno1          | physical | NO      |                 |                           |             | 0       |
+---------------+----------+---------+-----------------+---------------------------+-------------+---------+
| lxdbr0        | bridge   | YES     | 10.19.114.1/24  | fd42:56de:74c7:40f5::1/64 |             | 1       |
+---------------+----------+---------+-----------------+---------------------------+-------------+---------+
| lxdovn1       | bridge   | NO      |                 |                           |             | 0       |
+---------------+----------+---------+-----------------+---------------------------+-------------+---------+
| my-virtual-01 | ovn      | YES     | 10.178.251.1/24 | fd42:39c7:797c:7977::1/64 |             | 0       |
+---------------+----------+---------+-----------------+---------------------------+-------------+---------+
| my-virtual-02 | ovn      | YES     | 10.82.211.1/24  | fd42:5045:b316:b251::1/64 |             | 0       |
+---------------+----------+---------+-----------------+---------------------------+-------------+---------+
| my-virtual-03 | ovn      | YES     | 10.82.211.1/24  | fd42:5045:b316:b251::1/64 |             | 0       |
+---------------+----------+---------+-----------------+---------------------------+-------------+---------+

With this setup, we now have 3 OVN networks, 2 of which are purposefuly sharing the exact same IPv4/IPv6 subnets so we can show the isolation.

root@nuc01:~# lxc init images:ubuntu/20.04 u1
Creating u1
root@nuc01:~# lxc init images:ubuntu/20.04 u2
Creating u2
root@nuc01:~# lxc init images:ubuntu/20.04 u3
Creating u3
root@nuc01:~# lxc config device add u1 eth0 nic name=eth0 network=my-virtual-01
Device eth0 added to u1
root@nuc01:~# lxc config device add u2 eth0 nic name=eth0 network=my-virtual-02
Device eth0 added to u2
root@nuc01:~# lxc config device add u3 eth0 nic name=eth0 network=my-virtual-03
Device eth0 added to u3
root@nuc01:~# lxc start u1 u2 u3
root@nuc01:~# lxc list         
+------+---------+---------------------+-----------------------------------------------+-----------+-----------+
| NAME |  STATE  |        IPV4         |                     IPV6                      |   TYPE    | SNAPSHOTS |
+------+---------+---------------------+-----------------------------------------------+-----------+-----------+
| u1   | RUNNING | 10.178.251.2 (eth0) | fd42:39c7:797c:7977:216:3eff:fe3a:6498 (eth0) | CONTAINER | 0         |
+------+---------+---------------------+-----------------------------------------------+-----------+-----------+
| u2   | RUNNING | 10.82.211.2 (eth0)  | fd42:5045:b316:b251:216:3eff:fe7d:7826 (eth0) | CONTAINER | 0         |
+------+---------+---------------------+-----------------------------------------------+-----------+-----------+
| u3   | RUNNING | 10.82.211.2 (eth0)  | fd42:5045:b316:b251:216:3eff:fe9d:52af (eth0) | CONTAINER | 0         |
+------+---------+---------------------+-----------------------------------------------+-----------+-----------+

Initial bpf syscall interception

It is now possible to enable system call interception for the bpf syscall. This is controlled through security.syscalls.intercept.bpf on containers.

Once that's enabled, a particular type of bpf program must be enabled. Currently we only support security.syscalls.intercept.bpf.devices which allows for bpf programs tied to device cgroups to be loaded from within the container.

WARNING: The only validation done on the actual program is a simple size check to avoid obvious DoS of the host. A container with that option enabled will be able to load pretty complex bpf programs which may pull information that's outside of the container's scope. This should not be allowed on untrusted containers.

Support for native terminal device allocation

Up until now, device allocation for operations such as lxc exec was done through the host system's devpts. This was done as a security measure to avoid touching the container's filesystem and possibly having the user mask /dev/pts in the container with something malicious. This approach however has issues as the controlling device as seen inside the container cannot be resolved (as it belongs to the outside).

Kernel and LXC work now allows for safely keeping track of the devpts instance that we first mount on container startup and be able to allocate devices from it without ever interacting with the current mount table in the container.

The visible effect of all this will range from AppArmor policies getting less confused when redirecting something on stdin/stdout/stderr and a variety of other software doing is-a-tty type checks now behaving in a much more usual way.

VGA console now working on Windows

Windows users can now install virt-viewer through Chocolatey or the manual installer, once done, LXD will automatically detect it and use it when running lxc console --type=VGA on a virtual machine.

Improved handling of remote storage pools

Until now, the way custom volumes in remote storage pools was handled was by having one record for every cluster member, leading to a lot of duplicated data, especially when factoring in snapshots.

On the subject of snapshots, because of that volume duplication, automated snapshots were happening on every single cluster member, leading to a lot more snapshots than intended and more load overall.

This is all resolved now with a new database design where a single volume entry is kept and is marked as being clustered. So it no longer is tied to any one cluster member and scheduled snapshots are now distributed across the cluster using a stable hash mechanism to determine what currently online cluster member will handle them.

forkdns and forkproxy now running under AppArmor confinement

Following on the dnsmasq confinement in LXD 4.4, LXD 4.5 now also confines forkdns. That's the process used when running a Fan based network on a LXD cluster. As the name implies, it handles DNS by effectively replicating the queries against all cluster members. This confinement will prevent any potential attack against it from accessing critical data.

Similarly, forkproxy which is used for every non-NAT proxy device also got its own AppArmor profile, this will restrict it to just the sockets it's supposed to access and the bits of kernel infrastructure needed for the proxying to happen.

lxc move now let's you select a cluster target too

When moving an instance from outside of a cluster into a cluster, it is now possible to pass --target to specify what cluster member should be hosting the instance.

Complete changelog

Here is a complete list of all changes in this release:

  • lxc/move: Allow --target with cluster destination
  • i18n: Update translation templates
  • lxd/networks: Validate network config before starting networks on startup
  • lxd/network/driver/common: Call init() in update() to consistency apply new internal state
  • lxd/device/device/utils/network: Removes networkDHCPValidIP
  • lxd/dnsmasq/dhcpalloc: Adds static DHCP allocation package for dnsmasq
  • lxd/dnsmasq: Renames DHCPStaticIPs to DHCPStaticAllocation
  • lxd/dnsmasq: Renames DHCPAllocatedIPs to DHCPAllAllocations
  • lxd/network/network/utils: Removes GetIP
  • lxd/network/network/utils: dhcpalloc.GetIP usage
  • lxd/network/network/utils: dnsmasq.DHCPStaticAllocation usage
  • lxd/network/network/interface: Changes of functions to accomodate dhcpalloc package
  • lxd/network/driver/common: Implements default no-op function for non-dhcp enabled networks
  • lxd/network/driver/common: dhcpalloc.DHCPRange usage
  • lxd/network/driver/bridge: dhcpalloc package function usage
  • lxd/network/driver/bridge: DHCPv4Subnet and DHCPv6Subnet implementations
  • lxd/device/nic/bridged: Comment correction
  • lxd/device/nic/bridged: n.DHCPv4Subnet and n.DHCPv6Subnet usage
  • lxd/device/nic/bridged: dnsmasq.DHCPStaticAllocation usage
  • lxd/device/nic/bridged: dhcpalloc.DHCPValidIP usage
  • lxd/device/nic/bridged: Switches static DHCP allocation for IP filtering to dnsmasq/dhcpalloc
  • lxd/main_activateifneeded: Clarify 'No DB' debug statements
  • lxd/cluster: Fix failure domain updates
  • tests: Fix failure domain test
  • doc: s/container/instance/g
  • doc/backup: Add note about the snap mntns
  • lxd/apparmor: Don't fail on missing apparmor
  • shared/validate: Makes IsUint32 non-optional
  • lxd: Wraps validate.IsUint32 in validate.Optional
  • shared/instance: Wraps validate.IsUint32 in validate.Optional
  • shared/validate: Makes IsUint8 non-optional
  • lxd/network/driver/bridge: Wraps validate.IsUint8 in validate.Optional
  • shared/validate: Makes IsPriority non-optional
  • shared/instance: Wraps validate.IsPriority in validate.Optional
  • shared/validate: Makes IsBool non-optional
  • lxd: Wraps validate.IsBool in validate.Optional
  • shared/instance: Wraps validate.IsBool in validate.Optional
  • shared/validate: Makes IsSize non-optional
  • lxd: Wraps validate.IsSize in validate.Optional
  • shared/instance: Wraps validate.IsSize in validate.Optional
  • shared/validate: Makes IsNetworkAddress non-optional
  • lxd: Wraps validate.IsNetworkAddress in validate.Optional
  • shared/validate: Makes IsNetworkV4 non-optional
  • lxd/network/driver/bridge: Wraps validate.IsNetworkV4 in shared.Optional
  • shared/validate: Makes IsNetworkAddressV4 non-optional
  • lxd/device/nic: Wraps validate.IsNetworkAddressV4 in validate.Optional
  • lxd/device/nic/ipvlan: Wraps validate.IsNetworkAddressV4 in validate.Optional
  • lxd/device/nic/ipvlan: Fixes incorrect IPv4 address check in IPv6 context
  • lxd/network/driver/bridge: Wraps validate.IsNetworkAddressV4 in validate.Optional
  • shared/validate: Makes IsNetworkAddressCIDRV4 non-optional
  • lxd: Wraps validate.IsNetworkAddressCIDRV4 in validate.Optional
  • shared/validate: Makes IsDeviceID non-optional
  • lxd/device: Wraps validate.IsDeviceID in validate.Optional
  • shared/validate: Makes IsNetworkV6 non-optional
  • shared/validate: Makes IsNetworkAddressCIDRV6 non-optional
  • lxd: Wraps validate.IsNetworkAddressCIDRV6 in validate.Optional
  • shared/validate: Makes IsNetworkAddressV6 non-optional
  • lxd: Wraps validate.IsNetworkAddressV6 in validate.Optional
  • lxd/device/nic/ipvlan: validate.IsNetworkAddressVX tweaks
  • lxd/device/nic/routed: Wraps validate.IsNetworkAddressV4List in validate.Optional
  • lxd: Wraps validate.IsNetworkV4List and validate.IsNetworkV6List in validate.Optional
  • shared/validate: Tweaks IsNetworkVLAN error message ordering
  • shared/validate: comment spacing
  • daemon: check whether shiftfs is useable
  • lxd/network/network/utils: Renames ValidNetworkName to validInterfaceName
  • lxd/network/network/utils: Adds validVirtualNetworkName
  • lxd/network/network/interfaces: Adds ValidateName
  • lxd/network/driver/bridge: Implements ValidateName
  • lxd/network/driver/macvlan: Implements ValidateName
  • lxd/network/driver/sriov: Implements ValidateName
  • lxd/network/network/load: Adds ValidateName helper function
  • lxd/main/init/interactive: Switches to network.ValidateName for bridge validation
  • lxd/networks: Switches to network.ValidateName
  • lxd/storage/utils: Simplifies error message from ValidName
  • doc/networks: Fixes typo in bridge docs
  • lxd/cluster/config: Fix import ordering of external package
  • lxd/network/openvswitch: Name functions consistently using ObjectAction format
  • lxd/network/driver/bridge: OVS function naming usage
  • lxd/network/network/utils: OVS function naming usage
  • lxd/device/nic/bridged: OVS function naming usage
  • lxd/storage/locking: Moves package to lxd/locking
  • lxd/locking: Renames variables to make them generic
  • lxd/storage/drivers/utils: Adds OperationLockName function
  • lxd/network/network/interface: Adds ID() function
  • lxd/network/driver/common: Implements ID() function
  • lxd/storage: locking.Lock usage with OperationLockName wrapper
  • lxd/resources: Fix total memory for per NUMA node
  • lxd: enable safe native container terminal allocation
  • lxd/rsync: Don't pass --bwlimit when no limits set
  • exec: fix OpenPtyInDevpts()
  • test/suites/storage: LVM size tweaks
  • lxd/instance/drivers/driver/lxc: Adds nil check in getLxcState
  • client/operations: Fixes race conditions
  • lxd/operations: Fixes race conditions
  • client: More races fixed
  • Makefile: Adds race target for enabling race detector
  • Makefile: Correctly builds lxd-p2c and lxd-agent in debug and nocache targets
  • client/operations: Race fix
  • lxd/db: Adds mutex to fix races
  • lxd/operations: Fixes races
  • shared/validate: Adds IsURLSegmentSafe function
  • lxd/network/driver/common: Adds common ValidateName function
  • lxd/network/driver/bridge: Changes ValidateName to use common validation too
  • lxd/network/driver: Removes ValidateName from sriov and macvlan
  • lxd/network/network/load: Adds field name context to name validation errors
  • lxd/network/network/utils: Removes validVirtualNetworkName
  • lxd/networks: Returns network context on network startup failure
  • shared/validate: Adds Required() and makes Optional() accept multiple validators
  • lxd/network/driver/bridge: Don't allow stable volatile MAC with fan network
  • lxd/network/driver/bridge: Don't allow hwaddr to be set in fan mode
  • seccomp: update comment about blocking the new mount api
  • syscall_numbers: fix pidfd_open() definition
  • lxd_seccomp: add SECCOMP_IOCTL_NOTIF_ADDFD definitions and types
  • checkfeature: check for seccomp notify fd injection feature
  • syscall_numbers: add pidfd_getfd()
  • syscall_numbers: add bpf()
  • seccomp: report helpful errors when determining support for features
  • seccomp: handle liblxc sending the notify fd as part of the seccomp message
  • seccomp: enable bpf in unprivileged containers
  • doc: add security.syscalls.intercept.bpf and security.syscalls.intercept.bpf.prog.devices
  • api: add container_syscall_intercept_bpf_devices extension
  • lxd-client: add security.syscalls.intercept.bpf security.syscalls.intercept.bpf.devices to completion
  • production-setup: mention bpf-specific memlock settings
  • seccomp: check the return value of pwrite()
  • syscall_numbers: add close_range()
  • exec: switch to close_range() syscall
  • process_utils: remove faulty license
  • lxd/apparmor/dnsmasq: Add binary for nesting
  • lxd/storage/drivers/ceph: Fix volume deletion
  • lxd/instance/drivers/driver/qemu: Fix race in onStop getting operation
  • lxd/db: Fix premature failure when listing cluster volumes
  • lxd/db/storage_volumes: Add comments regarding behaviour
  • doc/production-setup: Fix escaping
  • doc/production-setup: Update introduction
  • lxd: Fix automatic storage volume snapshots
  • cluster: Don't upgrade nodes without raft role concurrently
  • lxd/network/network/load: Moves fillAuto logic into per-driver fillConfig function
  • lxd/network/utils: Moves fillAuto into bridge's fillConfig function
  • lxd/network/network/utils: Adds randomHwaddr function
  • lxd/patches: Adds patch to remove volatile.bridge.hwaddr network key
  • lxd/network/bridge/driver: Removes volatile.bridge.hwaddr and adds stable MAC generation
  • shared/usbid: Don't auto-load
  • lxd/resources: Load USB database
  • lxd/apparmor: Move dnsmasq functions
  • lxd/apparmor: forkdns profile
  • lxd/sys: Add unpriv uid/group
  • lxd/instances: Update for OS type change
  • shared/subprocess: s/Pid/PID/
  • shared/subprocess: Add credentials
  • lxd/network: forkdns and creds drop for forkdns
  • lxd/network: Run dnsmasq as unpriv group
  • lxd/device/device/common: Adds common contextual logger
  • doc/networks: dns.search clarification
  • lxd/network/driver/bridge: Validates bridge.external_interfaces using validate.Optional() helper
  • shared/validate: Adds network IP range validators
  • lxd/network/driver/bridge: Adds DHCP IP range validation
  • shared/network/ip: Defines IPRange struct
  • lxd/dnsmasq/dhcpalloc: Removes DHCPRange and switches to shared.IPRange
  • lxd/network: Replaces dhcpalloc.DHCPRange with shared.IPRange
  • lxd/storage: Fix delete of remote pools
  • lxd/storage/ceph: Allow for small size variation
  • seccomp: cap instruction limit and log buffer to reasonable sizes
  • seccomp: initialize almost everything
  • main_checkfeature: remove logging failed shiftfs mounts
  • seccomp: log errors to convert unix connection to file
  • unixfd: improve SCM_RIGHTs file descriptor retrieval
  • seccomp: simplify the seccomp message retrieval
  • api: Adds API extension network_type_ovn
  • doc/server: Documents global OVN networking config keys
  • lxd/cluster/config: Adds OVN networking global config keys
  • lxd/network/network/utils: Updates isInUseByDevices to support ovn
  • lxd/db/networks: Adds OVN network type
  • lxd/network/network/load: Adds ovn network type to loader
  • lxd/networks: Adds ovn network type
  • lxd/device/device/load: Adds OVN nic type support
  • lxd/device/nictype: Adds ovn support
  • lxd/network/network/utils: Adds OVN instance device port helpers
  • lxd/network/openvswitch/ovs: Adds InterfaceAssociateOVNSwitchPort
  • lxd/network/openvswitch/ovs: Adds ChassisID function
  • lxd/network/openvswitch/ovs: Adds OVN bridge mapping functions
  • lxd/network/openvswitch/ovs: Adds BridgePortList function
  • lxd/network/openvswitch/ovs: Adds OVNBridgeMappingDelete function
  • lxd/network/openvswitch/ovn: Adds OVN command wrapper
  • lxd/network/network/utils: Adds parseIPRange functions
  • lxd/network/driver/bridge: Adds OVN ranges keys
  • lxd/network/driver/ovn: Adds OVN network driver
  • lxd/device/nic/ovn: Adds OVN nic type
  • doc/networks: Adds initial OVN doc
  • doc/networks: Add OVN range keys
  • doc/networks: Fix key ordering
  • bash: Update completion profile
  • lxd/apparmor: Disable cgroup2 on legacy hosts
  • lxc/manpage: Fix behavior in snap
  • shared/subprocess: Add StartWithFiles
  • lxd/forkproxy: Switch to using subprocess
  • daemon: check namespace management support through pidfds
  • nsexec: remove unused dosetns() function
  • nsexec: add new change_namespace() helper
  • forksyscall: use pidfds to attach to namespaces
  • forknet: use pidfds to attach to namespaces
  • forkmount: use pidfds to attach to namespaces
  • forkproxy: use pidfds to attach to namespaces
  • forkfile: use pidfds to attach to namespaces
  • nsexec: remove unused setnsat()
  • lxd/db/networks: Separates network type and status conversion into separate functions
  • lxd/db/networks: Adds ClusterTx.GetNonPendingNetworks function
  • lxd/db/networks: Adds ClusterTx.UpdateNetwork function
  • lxd/network/driver/ovn: Use DB transactions to safely allocate OVN external IPs on parent network
  • lxd/network/driver/ovn: Include last IP in OVN range for allocatable IPs
  • lxd/db/networks: Populates network nodes in ClusterTx.GetNonPendingNetworks
  • lxd/db/networks: Populate description col with empty string in CreatePendingNetwork
  • shared/validate: Adds IsNetworkMTU function
  • lxd/network/driver: validates mtu using IsNetworkMTU
  • lxd/device/nic: Validates mtu using IsNetworkMTU
  • lxd/network/network/utils: Removes OVN specific helper functions
  • lxd/network/network/utils/ovn: Adds OVNInstanceDeviceMTU function
  • lxd/network/openvwitch/ovn: Adds MTU support for DHCP and IPv6 RA
  • lxd/network/driver/ovn: Adds bridge.mtu config option and passes to DHCP/RA setup
  • lxd/device/nic/ovn: Use parent network's bridge.mtu setting for setting device MTU
  • lxd/network/driver/common: Moves notifier for delete into common
  • lxd/networks: Moves cluster notification and storage clean up for networkDelete into common
  • shared/validate: Use consistent quoting for outputting input value when there is an error
  • lxc: Bundle sortorder
  • lxd/network/ovn: Use snap path
  • doc/networks: Adds link to OVN network
  • lxd/network/network/utils: Adds pingIP function
  • lxd/network/driver/ovn: Pings OVN external IPv6 router IP on bridge port start
  • lxd/network/openvswitch/dns: Adds LogicalSwitchPortSetDNS and LogicalSwitchPortDeleteDNS functions
  • lxd/network/openvswitch/ovn: Updates LogicalSwitchDelete to clear any remaining DNS records
  • lxd/network/network/utils/ovn: Updates OVNInstanceDevicePortAdd to take instanceName for DNS records
  • lxd/network/driver/ovn: Updates instance port functions to setup and remove DNS records
  • lxd/device/nic/ovn: Updates usage of network.OVNInstanceDevicePortAdd to supply instance name for DNS records
  • lxd/storage/drivers/utils: Fixes shrinkFileSystem to detect e2fsck filesystem modifications
  • lxd/db/instances: Ensure correct pool name is returned in GetInstancePool
  • shared/cert: Fix on Windows
  • lxc/console: Support remote-viewer on Windows
  • lxc/export: Use HostPathFollow
  • lxd/cluster: Re-try listening for a minute
  • lxd/init: Don't fail on existing address
  • lxd/storage/zfs: Fix bad transfer logic on block
  • lxd/storage/zfs: Always discard mountpoint on recv
  • lxd/db/projects: go imports order
  • lxd/db/projects: Removes unnecessary whitespace
  • lxd/db/cluster: Adds patch for adding project_id to networks table
  • lxd/db/networks: Adds project support to CreatePendingNetwork
  • lxd/db/networks: Adds project support to CreateNetwork
  • lxd/networks: Pass project.Default when creating networks
  • lxd/instance/test: Updates tests to use project.Default for new networks
  • lxd/db/networks/test: Updates tests to use project.Default for new networks
  • lxd/storage/zfs: Don't filter mountpoint on block
  • lxd/db/instances: Removes instancePoolSnapshot function
  • lxc/network: Fix usage
  • i18n: Update translation templates
  • lxd/apparmor/dnsmasq: drop dup rule, /snap/lxd/*/ includes /snap/lxd/current/
  • lxd/apparmor/forkdns: drop dup rule, /snap/lxd/*/ includes /snap/lxd/current/
  • lxd/instance: Always put snapshots on same pool as parent
  • doc/security: Adds note about non-IP ethernet frame filtering to stop VLAN QinQ bypass
  • lxd/db/cluster: Update tables to allow null value for node ID
  • shared/util: Converts DefaultPort from string to int
  • lxd/util/net: Updates CanonicalNetworkAddress to use net.JoinHostPort rather than manual fmt.Sprintf
  • lxd/util/net: Adds CanonicalNetworkAddressFromAddressAndPort function
  • lxd/device/device/utils/proxy: Use net.JoinHostPort rather than manual fmt.Sprintf
  • lxd/main/init/interactive: Error wrapping
  • lxd/main/init/interactive: Use canonical address after port has been added for comparison
  • lxd/main/init/auto: util.CanonicalNetworkAddressFromAddressAndPort usage
  • lxc/remote: shared.DefaultPort usage
  • lxd-agent/main/agent: shared.DefaultPort usage
  • lxd-p2c/utils: shared.DefaultPort usage
  • lxd/vsock: shared.DefaultPort usage
  • lxd/util/http: shared.DefaultPort usage
  • lxd/main/init: shared.DefaultPort usage
  • lxd/db: Handle null value for nodeID
  • lxd/daemon: Make db aware of remote storage drivers
  • lxd/daemon: Perform automatic snapshots on random node
  • lxd/storage: Refuse BLOCK_AND_RSYNC with running instance
  • lxd/apparmor: Simplify profile name generation
  • lxd/device: Export Name and Config
  • lxd/apparmor: Shrink instance interface
  • lxd/apparmor/forkdns: Alignment
  • lxd/apparmor/forkdns: Support LD_LIBRARY_PATH
  • lxd/api/cluster: Makes ServerAddress field required for clusterPutJoin
  • lxd/network/driver/ovn: Makes ping test in startParentPortBridge async
  • lxd/init: Updates initDataNodeApply to use revert package and to revert itself on error
  • lxd/cluster/connect: Adds UserAgentNotifier constant
  • lxd/cluster/connect: Adds UserAgentJoiner constant
  • lxd/cluster/connect: Adds ClientType type and UserAgentClientType function
  • lxd/api: Updates isClusterNotification to use cluster.UserAgentNotifier
  • lxd/api/cluster: clusterInitMember comments
  • lxd/api/cluster: initDataNodeApply usage
  • lxd/main/init: initDataNodeApply usage
  • lxd/api/cluster: Updates clusterPutJoin to use cluster.UserAgentJoiner when sending requests to local node
  • lxd/network/network/interfaces: Replaces clusterNotification bool with cluster.ClientType
  • lxd/network/driver/common: cluster.ClientType usage
  • lxd/network/driver: cluster.ClientType usage
  • lxd/network/driver/ovn: cluster.ClientType usage
  • lxd/networks: cluster.ClientType usage
  • lxd/apparmor/dnsmasq: Add /proc/self/fd
  • lxd/apparmor/forkdns: Allow reading/mapping the binary
  • lxd/apparmor: Add forkproxy
  • lxd/device/forkproxy: Add apparmor
  • lxd/instance/instance/interface: Moves Project() function into ConfigReader interface
  • lxd/instance/drivers/driver/common: Adds Project function
  • lxd/instance/drivers/driver/lxc: Updates lxc to use common fields
  • lxd/instance/drivers/driver/lxc: Removes driver specific Project function
  • lxd/instance/drivers/driver/qemu: Removes driver specific Project function
  • lxd/network/network/utils: Improves UpdateDNSMasqStatic error message
  • lxd/daemon: db.StorageRemoteDriverNames usage
  • lxd/db: StorageRemoteDriverNames usage
  • lxd/db/storage/pools: Renames GetRemoteDrivers to StorageRemoteDriverNames for clarity
  • lxd/storage/drivers/load: Cache supported drivers
  • lxd/storage/drivers/load: Remove references to "support" in AllDriverNames
  • lxd/apparmor/forkproxy: Fix running on i386
  • lxd/storage/drivers/interface: Adds isRemote function
  • lxd/storage/drivers/driver/common: Adds isRemote() function that returns false
  • lxd/storage/drivers/driver: Updates driver's Info() function to call d.isRemote()
  • lxd/storage/drivers/ceph: Implements isRemote function for ceph and cephfs
  • lxd/storage/drivers/load: Removes SupportedDrivers caching and updates comment
  • lxd/storage/drivers/load: Simplifies RemoteDriverNames to use the isRemote function
  • lxd/daemon: storageDrivers.RemoteDriverNames usage simplifcation
  • doc/networks: Rename OVN parent to network
  • lxd/networks/ovn: Rename parent to network
  • scripts/bash: Add network config key
  • i18n: Update translations from weblate

Try it for yourself

This new LXD release is already available for you to try on our demo service.

Downloads

The release tarballs can be found on our download page.

Binary builds are also available for:

  • Linux: snap install lxd
  • MacOS: brew install lxc
  • Windows: choco install lxc

LXD 2.0.12 has been released

14th of August 2020

Introduction

The LXD team is pleased to announce the release of LXD 2.0.12!

This is the twelfth bugfix release for LXD 2.0 which is supported until June 2021.

Bugfixes and improvements

As our oldest LTS, LXD 2.0 has not seen a release since 2.0.11 in October 2017.

This LTS branch is very much in security-only mode and this release only includes some older bugfixes that missed 2.0.11 and then fixes to keep this branch of LXD buildable.

As part of this, some of our dependencies no longer build on old Go versions, LXD 2.0.11 was confirmed to build and run with Go 1.13, 1.14 and 1.15 and was confirmed not to be buildable on 1.11 at least.

With no critical fix or security issues in there, distributions requiring an older Go version should stay on 2.0.11.

And lastly, we urge any user who's still using LXD 2.0 LTS to upgrade to something more modern as this branch only gets critical security updates and will reach its end of life in less than a year. Upgrades from 2.0 LTS directly to 4.0 LTS are supported.

The full list of commits is available below:

  • Fix file transfers to/from stdin/stdout in snap
  • If running as root in the snap, use /proc/1/root
  • Fix failure due to bind-mount through /proc
  • all: move to bakery.v2
  • Update the "lxc list" help to match stable-2.0
  • tests: Don't use godeps for import check
  • Make current gofmt happy
  • Make current gofmt happy (stable-2.0 specific)
  • liblxc: detect version at runtime
  • Update for newer ZFS releases
  • zfs: try pool import
  • Revert most of the macaroon support in client
  • client: Add GetOperationUUIDs and GetOperations
  • lxd/logs: Don't allow removing lxc.conf or lxc.log
  • shared/api: Add API extension label to AuthMethods
  • Drop logging setup in Daemon.Init()
  • Add helper to redirect the global logger to the testing logger
  • Add a shared.KeyPairAndCA function to get coventionally named certs
  • Add new debug sub-package with support for memory profiling
  • Add lxd/task sub-package for running functions periodically
  • Fix output of --print-goroutines-every
  • Add cpu profiling and goroutines printing to the debug sub-package
  • Move execPath global variable to sys.OS.ExecPath
  • Move global aaAvailable global variable to sys.OS
  • Move global aaStacking global variable to sys.OS
  • Move global runningInUserns global variable to sys.OS
  • Move global aaAdmin global variable to sys.OS
  • Move global aaConfined global variable to sys.OS
  • Move global cgBlkioController global variable to sys.OS
  • Move global cgCpuController global variable to sys.OS
  • Move remaining global cgXXX global variables to sys.OS
  • Move directory initialization to sys.OS.
  • Drop unnecessary checks on MockMode
  • Vendor a copy of log15 in shared/log15
  • Revert "Temporary workaround for log15 API breakage"
  • Switch to the built-in log15
  • Add a endpoints.Endpoints class for managing HTTP endpoints
  • Wire endpoints.Endpoints into Daemon
  • lxd/daemon: Fix unsetting https address
  • Move optional Daemon config values to DaemonConfig
  • Don't skip Daemon.Ready() in tests, it can be run unconditionally
  • Wire debug utilities into main_daemon.go
  • Track the lifecycle of the goroutine performing log expiration
  • Streamline Daemon init and shutdownn
  • Control all goroutines spawned in Daemon.Ready() using task.Task
  • Don't use global path variables in sys.OS
  • Switch to the built-in log15
  • Return the initial schema version in Schema.Ensure()
  • Add a Schema.Fresh() method to set a "bootstrap" SQL statement
  • Complete moving schema creation logic to schema.Schema
  • Rename Daemon.db to Daemon.nodeDB
  • Convert a few call sites of sql.DB.Begin to db.DB.Begin
  • Rename State.DB to State.NodeDB
  • Convert remaining call sites of the low-level db.Begin function
  • Rename db.QueryScan to db.queryScan, making it unexported
  • Remove direct use of the low-level db.Exec() func outside of lxd/db/
  • Rename db.Exec to db.exec, making it unexported
  • Move certificate db APIs to the db.Node facade
  • Move container db APIs to the db.Node facade
  • zfs: Fix slowdown because of mountpoint check
  • tests: Deal with missing ttyS0/ttyS1 (on s390x)
  • Move profile db APIs to the db.Node facade
  • Move patches db APIs to the db.Node facade
  • Move image db APIs to the db.Node facade
  • Move devices db APIs to the db.Node facade
  • Drop all references to Daemon.nodeDB
  • Use instance-level cache dir variable instead of the environment one
  • Use instance-level log dir variable instead of the environment one
  • Use instance-level var dir variable instead of the environment one
  • Add initial Go-level daemon integration-like test
  • Add lxd/config sub-package implementing structured config maps
  • Rename db_test.go to db_internal_test.go, since it's white box
  • Add db.NewTestNode helper for database-related unit tests
  • Add a db.NodeTx structure to abstract away low-level transactions
  • Add low-level query helpers for changing config tables
  • Add db APIs for fetching and changing node-local config values
  • Add node.Config high-level API for modifying node-level config
  • Cleanup test state at every test, to improve isolation.
  • Move node-level schema updates to their own db/local/ sub-package.
  • Add Schema.ExerciseUpdate() for testing a individual update
  • Fix spurious tx.Exec argument in lxd/db/schema/query.go
  • Extract the APIExtensions list from api10Get
  • Add error messages to lxdTestSuite setup and teardown
  • Add query.Count utility
  • Switch to the built-in log15
  • Setup mock storage driver
  • Extract initialization of the REST and /dev/lxd http Server
  • Add support for gracefully aborting schema.Ensure
  • Drop the containerLXC.OS() convenience
  • Rename container.StateObject() to container.DaemonObject()
  • Drop the storageShared.OS() convenience
  • Move util.AppArmorCanStack to a private appArmorCanStack in lxd/sys
  • Drop trailing slash from cgroup paths definitions
  • Drop pointless comments about function calls being no-op
  • Rename variable "code" to "kind" for consistency
  • Drop logging message when retrying to listen to a network port
  • Fixed typos in the task sub-package
  • Fix docstring in shared.KeyPairAndCA
  • Drop unused import in lxd/db/certificates.go
  • Rename Cert to Certificate in API names of lxd/db/certificates.go
  • Fix import formatting in lxd/db/patches.go
  • Split version declarations in shared/version into several files
  • shared/logging: Add freebsd build conditional to log_posix.go
  • Switch to the built-in log15
  • Gracefully cancel tasks on daemon shutdown
  • Fixed wording in comment
  • Tweak schedule function for pruning images
  • Expose task.Task instead of returning an integer handle
  • client: Name all the return values in interfaces
  • Fix some typos
  • Fix some typos
  • tests: Check for typos
  • tests: Add test for unused variables
  • api: add console structs
  • client: add client API ConsoleContainer()
  • container_lxc: add lxcParseRawLXC()
  • client: add client API GetContainerConsoleLog()
  • client: add client API DeleteContainerConsoleLog()
  • container_exec: check for OpenPty() error
  • client: add "ConsoleDisconnect" argument
  • shared/idmap: Fix handling of hardlinks
  • lxd/containers: Skip sockets in tarballs
  • lxd/dameon: Add LXD_EXEC_PATH to override execPath
  • Fix a number of unchecked variables
  • lxd/containers: Only init the config if needed
  • lxc/file: Log downloads/uploads
  • lxd/init: Re-add missing ZFS pool name question
  • lxd/init: Fix bad handling of dir backend
  • Added documentation about shell env to lxc exec
  • lxd-benchmark: Change the default count of containers from 100 to 1
  • shared/util: add EscapePathFstab()
  • devlxd: Properly lock the internal struct
  • migrate.proto: silence protobuf compiler warning
  • migrate: older than lxc 2.0.4 will fail
  • Makefile: Better detect sqlite3.h
  • client: URL escape all user input
  • devlxd: Cleanup in preparation for events
  • lxd/certificates: Add missing name value
  • Makefile: Don't hardcode gcc
  • container_lxc: actually return an error
  • i18n: Update translation templates
  • travis: Bump Go versions
  • shared/utils: deal with symlinks
  • travis: Limit to just Go 1.9
  • Update LVM documentation
  • zfs: fix argument order of zfs get commands.
  • network: fix insertNetworkDevice()
  • container_lxc: escape paths fstab style
  • migrate: prepare for pre-copy migration
  • Fixed typo in comment about SubCommands in lxd/main.go KishanRPatel katiewasnothere dinopanda jialin-li kianaalcala
  • lxd/containers: Fix race condition in shutdown
  • lxd/containers: Log auto-start errors
  • lxc/exec: Fix typo
  • lxd/containers: Fix tc egress rules
  • lxd/events: Cleanup event listener setup
  • Update issue template
  • doc: Add /images//secret to API list
  • lxd/containers: No slahses in snapshot names
  • lxd/init: Strip leading and trailing spaces
  • change “your first time using LXD” to something less confusing
  • doc/README: Update source build instructions
  • doc/containers: Document CPU limits
  • i18n: Update translation template
  • scripts/vagrant: The LXD PPA is gone
  • allow arbitrary users to read idmaps
  • drop \n from IdmapSet's ToLxcString
  • lxd/containers: Fix container shutdown on exit
  • lxd/main: Don't mention --preseed on 2.0
  • i18n: Fix bad japanese translation
  • fix parsing for container name tab-completion
  • lxc/file: Fix edit in a snap environment
  • shared/idmap:DefaultIdmapSet(): take a user argument
  • *: move download function to shared
  • shared/hostpath: Also check SNAP_NAME
  • shared/hostpath: Properly handle prefix check
  • termios: Workaround vet on go tip
  • test: fix shellcheck complaints
  • lxd,shared: move archive functions to shared
  • containers: Default to pids cgroup for fork bomb mitigation
  • tests: Check for mixed tabs/spaces and trailing whitespaces
  • tests: Fix mixed tabs/spaces
  • api: Include message format for events
  • events: Use api message type
  • api: Add NetworkLease struct
  • client: Add network leases handling
  • lxc: Properly handle the --version flag
  • lxd-benchmark: Fix new go vet warnings
  • lxc: Make the / syntax work
  • i18n: Update translation templates
  • Make the test suite use lxc.apparmor.profile instead of lxc.aa_profile
  • Check for LXC version to decide which apparmor profile config key to use
  • setup-lvm: Fix pyflakes warnings
  • shared/cancel: Properly lock map
  • shared/cancel: Make the cancel code golint clean
  • lxd: Rework listening logic
  • lxd-benchmark: Fix golint
  • lxd/types: Make golint clean
  • client: Check API extension for storage
  • client: Check API extension for network
  • shared/api: add local storage volume {copy,move}
  • client: add {Copy,Move}StoragePoolVolume()
  • api: Add description field on operation
  • shared/eagain: Make our EAGAIN code a new package
  • lxd/netcat: Port to using shared/eagain
  • lxd/daemon: Cleanup startup code a bit
  • tests: Wait up to 20s for image to expire
  • tests: Consistency
  • fuidshift: Drop specific Makefile
  • shared/version: Include storage backends in agent
  • lxc: Fix golint
  • lxd/util: Fix golint
  • tests: Update list of golint clean packages
  • i18n: Look at all lxc files
  • lxc: Introduce a new utils package
  • lxd: Move migration code to own package
  • shared: Remove dead code
  • lxd: Restrict pongo2 file functions
  • tests: Fix recent Go test breakages
  • lxc/utils: Sync stringList with master
  • scripts/bash: tweak complete line for snaps
  • Add some missing "Return:" headings to make sample return values formatting right
  • container_lxc: keep full capability set
  • Fix version parsing of LXC betas
  • Ignore io.EOF errors when performing PUT /internal/shutdown
  • lxd/shutdown: Fix error string check
  • lxd/shutdown: Fix typo in error handling
  • lxd/init: Prevent non-root execution
  • lxd/init: Don't fail test when non-root
  • memory: fix format string
  • db: Fix bad format string
  • client: Remove debug statements
  • db: Fix more format issues
  • lxd/migration: Update protocol
  • i18n: Update message catalogs and Japanese translation
  • shared/api: Don't re-define fields
  • doc: add the appropriate titles to some documents
  • lxc: Fix manpage subcommand
  • shared/idmap: Workaround Go tip change
  • lxc: Remove dead code
  • Manually release the liblxc structs
  • lxd/containers: Adapt to go-lxc Release
  • tests: Bump LV size to 50MB
  • lxd/util: Fix formatting
  • tests: Tweak fdleak test
  • lxd/util: Add missing import
  • travis: Sync with current
  • Release LXD 2.0.12

Try it for yourself

This new LXD release is already available for you to try on our demo service.

Downloads

The release tarballs can be found on our download page.

Binary builds are also available for:

  • Linux: snap install lxd
  • MacOS: brew install lxc
  • Windows: choco install lxc

LXD 4.0.3 LTS has been released

12th of August 2020

Introduction

The LXD team is pleased to announce the release of LXD 4.0.3!

This is the third bugfix release for LXD 4.0 which is supported until June 2025.

Bugfixes and improvements

This release includes a couple of months worth of bugfixes and minor improvements from the development branch.

In this release, minor improvements was slightly stretched with the inclusion of the VGA console (SPICE in LXD API) and disk limits in projects but we felt this was important (and easy) to backport to close gaps in some of the major features of the 4.0 release.

Neither of those features required database schema updates, they do not prevent downgrades nor alter any on-disk structure so felt safe and important to include.

Some of the highlights include:

  • New --console flag in lxc launch
  • Support for the /dev/lxd API inside of virtual machines
  • Support for GPU mediated devices in /1.0/resources API
  • VGA console for virtual machines with related --console=vga or --type=vga flags in the client
  • Automatically generated AppArmor profiles for dnsmasq and forkdns
  • Disk limits in projects (limits.disk config option)

The full list of commits is available below:

  • lxd/storage: Better handle broken volumes
  • client: Handle unknown image sizes
  • lxd/response: Stream multi-part responses
  • lxd/device/disk: Fixes cloud-init errors for VMs
  • lxc/action: Show usage on missing target
  • lxd/storage: Rely on UsedBy for deletion error
  • lxd/instances/qemu: Use images dir during compression
  • lxd/storage/drivers: Rename fs to filesystem
  • shared/api: Add ContentType to storage volume structs
  • client: Support custom block volumes
  • lxd/util: Detect hugetlbfs mount point
  • lxd/cluster: Always check for dqlite protocol version mismatches
  • lxd/cluster: Don't run unncessary HEAD probe upon dqlite connections
  • forksyscall: use nsids for shiftfs syscall intercepts
  • lxd/db: Drop ClusterRoleDatabase records from the database
  • lxd/cluster: Fetch database role information directly from raft
  • lxd/storage: Fix regression in truncate handling
  • lxd/cluster: Only look up raft_nodes for resolving the address of node 1
  • lxd/cluster: Leverage RolesChanges.Handover() to choose handover target
  • lxd: Increase timeout of go unit tests when ran from Emacs
  • lxd/cluster: Skip unncessary loading of nodes from database in Rebalance()
  • lxd/cluster: Leverage RolesChanges.Adjust() to choose rebalance target
  • lxd/cluster: Increase time budget of client.Assign() when assigning voter role
  • lxd/cluster: When demoting to Spare only transition to StandBy if Voter
  • lxd/project: Add more name checks
  • doc/server: Cover listen + authentication
  • lxd/qemu: Don't do file lock on custom volumes
  • shared/api: Add FailureDomain field to ClusterMemberPut
  • client: Check clustering_failure_domains extension when updating a member
  • instance: update terminology I
  • lxd/network: Validate ipv4/ipv6 routes
  • lxd/proxy: Fix govet
  • lxd/rsync: Add AtLeast
  • lxd/rsync: Filter out security.selinux
  • lxd-p2c: Filter out security.selinux
  • lxc-to-lxd: Filter out security.selinux
  • lxc/launch: Add --console
  • instance: introduce container_syscall_filtering_allow_deny extension
  • tests: remove trailing comma
  • lxd/instance/drivers: Provide instance-data file
  • lxd-agent: Support /dev/lxd
  • lxd/instance/drivers: Allow updating running VMs
  • tests: Fix bad ipv6.routes value
  • lxc/instance/drivers/qemu: Support ephemeral VMs
  • lxd/qemu: Use memory backend ram/file
  • lxc/image: Fix dir handling on snap
  • lxd/qemu: Fix crash on non-pinned VM
  • lxc/image: Fix more dir handling on snap
  • terminals: update terminology again
  • doc/instances: Improves proxy docs
  • lxc/main_alias: Handle leading arguments
  • lxd/storage: Fix block volume migration
  • lxd/rbac: Always allow internal cluster traffic
  • units: handle multiplication integer overflow
  • lxd/rsync: Untangle from daemon package
  • lxd/qemu: Don't use file.locking with rbd
  • lxd/storage/zfs: Use autotrim when available
  • lxd: Add clustering_fix_raft_address_zero patch to fix node with "0" as address
  • Revert "lxd/storage: Fix block volume migration"
  • lxd/resources: Use udev model data if available
  • Decode error
  • doc/api-extensions: Fix escaping
  • share/api: Add GPU mdev
  • lxd/resources: Add GPU mdev
  • api: Add GPU mdev
  • lxd/qemu: Fix unbound hugepages
  • lxd/qemu: Properly connect memory
  • api: console_vga_type
  • doc/rest-api: Add type field to console
  • shared/api: Add Type field to InstanceConsolePost
  • lxd/instance: Add protocol argument to Instance.Console()
  • lxd/instance/drivers: Support VGA output in qemu.Console()
  • lxd: Handle "vga" type in console API handler
  • client: Add ConsoleInstanceDynamic() to support multiple websocket connections
  • lxc: Add --type flag to "lxc console"
  • i18n: Update translation templates
  • lxc/console: Missing error handling
  • lxc/console: Prefer remote-viewer
  • lxc: Populate cmdConsole.flagType also when ran manually
  • lxc/console: Short argument for type
  • lxc: Allow using --console=TYPE
  • lxd/images: Rename imgPostContInfo to imgPostInstanceInfo
  • lxd/instances: Return and set image properties
  • lxd/qemu: Add support for spice agent
  • lxc/console: Disconnect on shutdown
  • lxd/db: Drive-by removal of leftover fmt.Printf's
  • lxd/main_daemon: s/containers/instances/
  • lxd: s/containersShutdown/instancesShutdown/
  • lxd: Add context to daemon
  • lxd/operations: Add db operation type to Operation
  • lxd: Add waitForOperations()
  • lxd: Shut down gracefully
  • lxd/operations/operations: Fix hanging cancelation
  • lxd/instance_post: Pass cancel function to websocket operation
  • client/lxd_instances: Cancel websocket op if needed
  • lxd/daemon: Return 503 when shutting down
  • doc/api-extensions: Fix over-escaping
  • lxd: Add --force flag to lxd shutdown
  • shared/instance: Move network validation functions to shared
  • lxd/db/networks: Adds internal network type constants
  • lxd/db/networks: Updates CreateNetwork to accept a network type
  • lxd/db/networks: Updates CreatePendingNetwork to accept a network type
  • lxd/network/network/interface: Adds network interface
  • lxd/network/network/load: LoadByName to use Network interface, add Validate
  • lxd/network/errors: Adds error constants
  • lxd/network/network/utils: Moved validation functions from main package
  • lxd/network/driver/common: Adds common driver
  • lxd/network/driver/bridge: Renames network to driver_bridge
  • lxd/networks/utils: Remove unused network validation functions in main
  • lxd/device/device/utils/network: Removes unused validation functions
  • lxd/device/device/utils/proxy: shared.IsNetworkAddress usage
  • lxd/device/nic: shared validation function usage
  • lxd/device/nic/bridged: Support Network interface
  • lxd/device/nic/ipvlan: shared validation function usage
  • lxd/device/nic/routed: shared validation function usage
  • lxd/main/init/interactive: Uses network name validation from network package
  • lxd/networks: ValidNetworkName usage in networkPost
  • lxd/networks: Updates doNetworkUpdate to use network package validation
  • lxd/networks: Updates networksPost to support network type
  • lxd/networks: Remove use of network.IsRunning in networkShutdown
  • lxd/networks/config: Removed
  • lxd/networks/utils: Updates usage of n.RefreshForkdnsServerAddresses to generic n.HandleHearbeat
  • lxd: Updates network tests to pass netType
  • lxd/network/network/utils: Unexports usesIPv4Firewall and usesIPv6Firewall
  • lxd/network/driver/bridge: usesIPv4Firewall and usesIPv6Firewall usage
  • lxd/apparmor: Use templating
  • lxd/apparmor: Use proper version parsing
  • lxd/network/driver/common: Adds config diff and db update common functions
  • lxd/network/driver/common: Adds contextual logger
  • lxd/network/driver/common: Removes stuttering on "common" in validation rules function
  • lxd/network/driver/bridge: Updates to use contextual logger
  • lxd/network/driver/bridge: Simplifies Update function to use common update functions
  • lxc/networks: Renames notify to clusterNotification in doNetworkUpdate
  • lxd/network/network/interface: Clarifies Update arguments
  • lxd/network/network/interface: Renames Delete withDatabase arg to clusterNotification
  • lxd/network/driver/common: Adds common delete function
  • lxd/networks: Cleans up networksPost to use clusterNotification argument correctly
  • lxd/networks: Log quoting in networksPostCluster
  • lxd/networks: Cleans up doNetworksCreate to use clusterNotification argument
  • lxd/network/driver/bridge: Updates Delete to use common delete function
  • lxd/network/driver/bridge: Adds logging to Update
  • lxd/networks: Removes bridge specific logic in doNetworkUpdate
  • lxd/network/driver/bridge: Adds fan auto detection logic to Update
  • lxd/network/driver/common: Adds rename common function
  • lxd/network/driver/bridge: Updates Rename to use common rename function
  • lxd/networks: networkPost logging quoting
  • lxc/network/driver/bridge: isRunning comment
  • lxd/network/driver/bridge: Unexports hasIPv4Firewall and hasIPv6Firewall
  • lxd/networks: Detect unknown network type in networksPost, dont assume bridge
  • lxd/networks: comment fix in networksPostCluster
  • lxd/networks: Allow for different managed network types in doNetworkGet
  • lxd/network/network/interface: Adds fillConfig to interface
  • lxd/network/driver/common: Adds default fillConfig function
  • lxd/network/driver/common: Adds default HandleHeartbeat function
  • lxd/network/network/load: Adds per-driver FillConfig wrapper
  • lxd/network/network/utils: Removes generic FillConfig
  • lxd/network/driver/bridge: fillConfig implementation
  • lxd/network/driver/bridge: Exposes error message from ValidNetworkName in Validate
  • shared/version: Add projects_limits_disk extension
  • doc: Document limits.disk project configuration key
  • lxd: Add "limits.disk" to supported project config keys
  • lxd/project: Check that root disk sizes are within limits.disk
  • lxd/project: Add projectInfo struct to hold together project's extra info
  • lxd/db: Add GetCustomVolumesInProject() to fetch custom volumes in a project
  • lxd/project: Fetch the project's custom volumes
  • lxd/project: Consider custom volumes sizes in checkAggregateLimits
  • lxd/project: Add AllowVolumeCreation() to check limits upon volume creation
  • lxd: Call project.AllowVolumeCreation() before creating custom volumes
  • lxd/project: Add AllowVolumeUpdate() to check custom volumes config updates
  • lxd: Call project.AllowVolumeUpdate() before modifying a custom volume
  • shared: Add QuotaWriter
  • lxd/project: Add GetImageSpaceBudget() returning image disk space budget
  • lxd: Possibly limit the disk space that can be used by POST /1.0/images
  • lxd: Check available project budget when publishing an instance as image
  • lxd/project: Fill missing fields when checking instance creation
  • lxd/project: Skip checks when unsetting limits
  • lxd: Honor project disk budget when downloading images
  • test: Add tests for the "limits.disk" project config key
  • lxd/sys: Create apparmor/seccomp paths
  • lxd/apparmor: Split and rename instance functions
  • lxd/resources/storage: Use ID_MODEL_ENC when possible
  • shared: Add InSnap
  • shared/subprocess: Add AppArmor support
  • lxd/apparmor: Rename template
  • lxd/apparmor: Add dnsmasq profile
  • lxd/networks: Use AppArmor when available
  • tests: Delete leftover storage volume
  • lxd/operations/operations: Renames Operations to Clone
  • lxd-agent/operations: operations.Clone() usage
  • lxd: operations.Clone() usage
  • Drop from .travis.yaml Go versions we don't support anymore
  • shared/api/network: Adds network status constants
  • lxd/networks: API constant usage in networkDelete
  • lxd/network/network/load: Adds status
  • lxd/network/network/interface: Adds status function
  • lxd/network/driver/common: Adds status field and function
  • lxd/network/driver/bridge: Don't allow starting a pending network
  • lxd/device/nic/bridged: Usage of d.state.Cluster.GetNetworkInAnyState in rebuildDnsmasqEntry
  • lxd/api/cluster: Usage of api.NetworkStatusPending
  • lxd/db/networks: Usage of api package's NetworkStatus constants in getNetwork
  • lxd/db/networks: Removes unused GetNetwork
  • lxd/db/networks: GetNonPendingNetworks comment
  • lxd/db/networks: Allow pending nodes to be added to errored networks in CreatePendingNetwork
  • lxd/db/networks: CreatePendingNetwork comments and line spacing
  • lxd/networks/utils: Skip network load error in networkUpdateForkdnsServersTask
  • lxd/device/nic/bridged: Validates network is type bridge
  • lxc/device/nic/bridged: Only allow using non-Pending networks
  • lxd/networks: Various comment and error quoting consistency fixes
  • lxd/networks: Validate network name earlier in networksPost
  • lxc/networks: Validate config in doNetworksCreate
  • lxd/db/networks: Ensure that network type matches existing pending network in CreatePendingNetwork
  • lxd/db/networks: Remove errored state on successful update in UpdateNetwork
  • lxd/network/driver/bridge: Adds targetNode arg to Update
  • lxd/network/network/interface: Adds targetNode arg to Update
  • lxd/network/driver/common: Tweaks to update function in cluster environment
  • lxd/networks: networksPost error response tweaks
  • lxd/networks: Updates networksPostCluster
  • lxd/networks: Unifies networkPut and networkPatch
  • lxd/device/nictype: Adds small package to resolve NIC device nictype from network
  • lxd/device/config/devices: Removes NICType
  • lxd/device/config/devices: Improves comment on Update
  • lxd/device/device/load: Removes devTypes map and updates load to use NICType function
  • lxd/device: Removes device load helpers
  • lxd/device/device/utils/network: nictype.NICType usage
  • lxd/device/nic/bridged: Updates usage of functions whos signatures changed due to NICType
  • lxd/device/nic/p2p: Updates usage of functions that changed signature due to NICType
  • lxd/device/proxy: nictype.NICType usage
  • lxd/instance/drivers/driver/lxc: nictype.NICType usage
  • lxd/instance/drivers/driver/qemu: nictype.NICType usage
  • lxd/network/driver/bridge: Usage of functions that changed signature due to NICType
  • lxd/network/driver/common: Updates IsUsed for NICType signature changes and checks for profile usage
  • lxd/network/network/interface: Signature change of IsUsed to accomodate NICType
  • lxd/network/network/utils: Usage of nictype.NICType and signature changes to accomodate it
  • lxd/networks: nictype.NICType usage and comment improvements
  • lxd/networks: Comment ending consistency
  • test: Updates tests to delete profiles before networks
  • lxd/networks: Remove database record on error in networksPost
  • test: sriov NIC comment ending consistency
  • doc/networks: Re-arranges network docs to support different types
  • doc/networks: Fixes typo
  • lxd/network/openvswitch/ovs: Adds OVS wrapper
  • lxd/network/driver/bridge: ovs usage
  • lxd/network/network/utils: ovs usage
  • lxd/networks: ovs.BridgeExists usage
  • tree-wide: add dummy include package for cgo
  • doc/images: Cover the various image servers
  • doc: Typo fix
  • lxd/networks: Fixes bug in doNetworkUpdate that prevents removal of non-node specific keys
  • lxd/network/driver/bridge: Consistent comment ending in setup()
  • lxd/network/network/interface: fillConfig signature
  • lxd/network/driver/common: Updates fillConfig signature
  • lxd/network/driver/bridge: Updates fillConfig signature
  • lxd/network/network/load: Updates FillConfig to use new signature
  • lxd/network/driver/bridge: Fixes Update to regenerate default values if missing
  • test/suites/container/devices/nic/bridged: Fixes DHCP disable by setting IP address none
  • lxd/network/driver/bridge: Dont fail start if cannot restore third party route
  • lxd/migrate: Fix crash in sendControl when no active connection
  • lxd/operations: Fix typo
  • lxc/export: Plug in cancelable wait
  • i18n: Update translation templates
  • lxd/devices/device/utils/network: Removes networkValidMAC
  • shared/instance: Adds IsNetworkMAC for use in network and device packages
  • lxd/device/nic: shared.IsNetworkMAC usage
  • lxd/network/driver/bridge: Adds volatile.bridge.hwaddr key
  • shared/validate: Adds validate helper package
  • lxd: Updates use of validate helper functions now in validate package
  • shared: Removes validate helper functions
  • lxd/device/device/utils/infiniband: Changes infinibandValidMAC to use net.ParseMAC
  • lxd/device/device/utils/infiniband/test: Changes test name for linter
  • lxd/networks: Allow update/removal of node-specific key in non-clustered mode
  • lxd/network/driver/bridge: Adds safety check for volatile MAC address usage
  • lxd/device: fix empty error message when tc fails
  • test: Wait for operations to be removed from the database
  • shared/validate: Adds Optional() validate wrapper
  • shared/validate: Makes IsInt64 non-optional
  • lxd/network/driver/bridge: Add validate.Optional() wrapper for validate.IsInt64 usage
  • lxd/storage/utils: Adds validate.Optional() wrapper for validate.IsInt64 usage
  • shared/instance: Adds validate.Optional() wrapper for validate.IsInt64 usage
  • lxd/device/device/utils/network: Removes networkValidVLAN
  • shared/validate: Adds IsNetworkVLAN
  • lxd/device/nic: validate.IsNetworkVLAN usage
  • seccomp: switch from individual pread() to process_vm_readv()
  • seccomp: fix i386 builds
  • seccomp: ensure that target process is still valid
  • client: Move proxyMigration
  • lxd: Port remaining calls to instance
  • lxd/network/driver/common: Adds Create function no-op
  • lxd/network/network/interface: Adds Create function
  • lxd/networks: Adds call to network Create in doNetworksCreate
  • lxd/device/device/utils/network: Adds networkDHCPValidIP
  • lxd/device/nic/bridged: Removes networkDHCPValidIP
  • lxd/device/device/utils/networks: Splits networkSetupHostVethDevice into multiple functions
  • lxd/device/nic/bridged: networkVethFillFromVolatile usage and other host-veth functions
  • lxd/device/nic/p2p: networkVethFillFromVolatile usage and other host-veth helper functions
  • lxd/device/nic/routed: networkVethFillFromVolatile usage and other host-veth helper functions
  • lxd/network/network/utils: Updates isInUseByDevices to support networks that don't match their physical parent
  • lxd/device: Add missing sriov type
  • lxc/move: Allow --target with cluster destination
  • i18n: Update translation templates
  • lxd/networks: Validate network config before starting networks on startup
  • lxd/network/driver/common: Call init() in update() to consistency apply new internal state
  • lxd/device/device/utils/network: Removes networkDHCPValidIP
  • lxd/dnsmasq/dhcpalloc: Adds static DHCP allocation package for dnsmasq
  • lxd/dnsmasq: Renames DHCPStaticIPs to DHCPStaticAllocation
  • lxd/dnsmasq: Renames DHCPAllocatedIPs to DHCPAllAllocations
  • lxd/network/network/utils: Removes GetIP
  • lxd/network/network/utils: dhcpalloc.GetIP usage
  • lxd/network/network/utils: dnsmasq.DHCPStaticAllocation usage
  • lxd/network/network/interface: Changes of functions to accomodate dhcpalloc package
  • lxd/network/driver/common: Implements default no-op function for non-dhcp enabled networks
  • lxd/network/driver/common: dhcpalloc.DHCPRange usage
  • lxd/network/driver/bridge: dhcpalloc package function usage
  • lxd/network/driver/bridge: DHCPv4Subnet and DHCPv6Subnet implementations
  • lxd/device/nic/bridged: Comment correction
  • lxd/device/nic/bridged: n.DHCPv4Subnet and n.DHCPv6Subnet usage
  • lxd/device/nic/bridged: dnsmasq.DHCPStaticAllocation usage
  • lxd/device/nic/bridged: dhcpalloc.DHCPValidIP usage
  • lxd/device/nic/bridged: Switches static DHCP allocation for IP filtering to dnsmasq/dhcpalloc
  • lxd/main_activateifneeded: Clarify 'No DB' debug statements
  • doc: s/container/instance/g
  • doc/backup: Add note about the snap mntns
  • lxd/apparmor: Don't fail on missing apparmor
  • shared/validate: Makes IsUint32 non-optional
  • lxd: Wraps validate.IsUint32 in validate.Optional
  • shared/instance: Wraps validate.IsUint32 in validate.Optional
  • shared/validate: Makes IsUint8 non-optional
  • lxd/network/driver/bridge: Wraps validate.IsUint8 in validate.Optional
  • shared/validate: Makes IsPriority non-optional
  • shared/instance: Wraps validate.IsPriority in validate.Optional
  • shared/validate: Makes IsBool non-optional
  • lxd: Wraps validate.IsBool in validate.Optional
  • shared/instance: Wraps validate.IsBool in validate.Optional
  • shared/validate: Makes IsSize non-optional
  • lxd: Wraps validate.IsSize in validate.Optional
  • shared/instance: Wraps validate.IsSize in validate.Optional
  • shared/validate: Makes IsNetworkAddress non-optional
  • lxd: Wraps validate.IsNetworkAddress in validate.Optional
  • shared/validate: Makes IsNetworkV4 non-optional
  • lxd/network/driver/bridge: Wraps validate.IsNetworkV4 in shared.Optional
  • shared/validate: Makes IsNetworkAddressV4 non-optional
  • lxd/device/nic: Wraps validate.IsNetworkAddressV4 in validate.Optional
  • lxd/network/driver/bridge: Wraps validate.IsNetworkAddressV4 in validate.Optional
  • shared/validate: Makes IsNetworkAddressCIDRV4 non-optional
  • lxd: Wraps validate.IsNetworkAddressCIDRV4 in validate.Optional
  • shared/validate: Makes IsDeviceID non-optional
  • lxd/device: Wraps validate.IsDeviceID in validate.Optional
  • shared/validate: Makes IsNetworkV6 non-optional
  • shared/validate: Makes IsNetworkAddressCIDRV6 non-optional
  • lxd: Wraps validate.IsNetworkAddressCIDRV6 in validate.Optional
  • shared/validate: Makes IsNetworkAddressV6 non-optional
  • lxd: Wraps validate.IsNetworkAddressV6 in validate.Optional
  • lxd/device/nic/routed: Wraps validate.IsNetworkAddressV4List in validate.Optional
  • lxd: Wraps validate.IsNetworkV4List and validate.IsNetworkV6List in validate.Optional
  • shared/validate: Tweaks IsNetworkVLAN error message ordering
  • shared/validate: comment spacing
  • daemon: check whether shiftfs is useable
  • lxd/network/network/utils: Renames ValidNetworkName to validInterfaceName
  • lxd/network/network/utils: Adds validVirtualNetworkName
  • lxd/network/network/interfaces: Adds ValidateName
  • lxd/network/driver/bridge: Implements ValidateName
  • lxd/network/network/load: Adds ValidateName helper function
  • lxd/main/init/interactive: Switches to network.ValidateName for bridge validation
  • lxd/networks: Switches to network.ValidateName
  • lxd/storage/utils: Simplifies error message from ValidName
  • lxd/cluster/config: Fix import ordering of external package
  • lxd/network/openvswitch: Name functions consistently using ObjectAction format
  • lxd/network/driver/bridge: OVS function naming usage
  • lxd/network/network/utils: OVS function naming usage
  • lxd/network/network/interface: Adds ID() function
  • lxd/network/driver/common: Implements ID() function
  • lxd/resources: Fix total memory for per NUMA node
  • lxd/rsync: Don't pass --bwlimit when no limits set
  • client/operations: Fixes race conditions
  • lxd/operations: Fixes race conditions
  • client: More races fixed
  • Makefile: Adds race target for enabling race detector
  • Makefile: Correctly builds lxd-p2c and lxd-agent in debug and nocache targets
  • client/operations: Race fix
  • lxd/db: Adds mutex to fix races
  • lxd/operations: Fixes races
  • shared/validate: Adds IsURLSegmentSafe function
  • lxd/network/driver/common: Adds common ValidateName function
  • lxd/network/driver/bridge: Changes ValidateName to use common validation too
  • lxd/network/network/load: Adds field name context to name validation errors
  • lxd/network/network/utils: Removes validVirtualNetworkName
  • lxd/networks: Returns network context on network startup failure
  • shared/validate: Adds Required() and makes Optional() accept multiple validators
  • test/suites/storage: LVM size tweaks
  • lxd: enable safe native container terminal allocation
  • exec: fix OpenPtyInDevpts()
  • lxd/instance/drivers/driver/lxc: Adds nil check in getLxcState
  • lxd/storage/locking: Moves package to lxd/locking
  • lxd/locking: Renames variables to make them generic
  • lxd/storage/drivers/utils: Adds OperationLockName function
  • lxd/storage: locking.Lock usage with OperationLockName wrapper
  • lxd/network/driver/bridge: Don't allow stable volatile MAC with fan network
  • lxd/network/driver/bridge: Don't allow hwaddr to be set in fan mode
  • seccomp: update comment about blocking the new mount api
  • syscall_numbers: fix pidfd_open() definition
  • lxd_seccomp: add SECCOMP_IOCTL_NOTIF_ADDFD definitions and types
  • checkfeature: check for seccomp notify fd injection feature
  • syscall_numbers: add pidfd_getfd()
  • syscall_numbers: add bpf()
  • seccomp: report helpful errors when determining support for features
  • seccomp: handle liblxc sending the notify fd as part of the seccomp message
  • syscall_numbers: add close_range()
  • exec: switch to close_range() syscall
  • process_utils: remove faulty license
  • lxd/apparmor/dnsmasq: Add binary for nesting
  • lxd/storage/drivers/ceph: Fix volume deletion
  • lxd/instance/drivers/driver/qemu: Fix race in onStop getting operation
  • lxd/db: Fix premature failure when listing cluster volumes
  • lxd/db/storage_volumes: Add comments regarding behaviour
  • doc/production-setup: Fix escaping
  • doc/production-setup: Update introduction
  • lxd: Fix automatic storage volume snapshots
  • cluster: Don't upgrade nodes without raft role concurrently
  • lxd/network/network/load: Moves fillAuto logic into per-driver fillConfig function
  • lxd/network/utils: Moves fillAuto into bridge's fillConfig function
  • lxd/network/network/utils: Adds randomHwaddr function
  • lxd/patches: Adds patch to remove volatile.bridge.hwaddr network key
  • lxd/network/bridge/driver: Removes volatile.bridge.hwaddr and adds stable MAC generation
  • shared/usbid: Don't auto-load
  • lxd/resources: Load USB database
  • lxd/apparmor: Move dnsmasq functions
  • lxd/apparmor: forkdns profile
  • lxd/sys: Add unpriv uid/group
  • lxd/instances: Update for OS type change
  • shared/subprocess: s/Pid/PID/
  • shared/subprocess: Add credentials
  • lxd/network: forkdns and creds drop for forkdns
  • lxd/network: Run dnsmasq as unpriv group
  • lxd/device/device/common: Adds common contextual logger
  • lxd/network/driver/bridge: Validates bridge.external_interfaces using validate.Optional() helper
  • shared/validate: Adds network IP range validators
  • lxd/network/driver/bridge: Adds DHCP IP range validation
  • shared/network/ip: Defines IPRange struct
  • lxd/dnsmasq/dhcpalloc: Removes DHCPRange and switches to shared.IPRange
  • lxd/network: Replaces dhcpalloc.DHCPRange with shared.IPRange
  • lxd/storage: Fix delete of remote pools
  • lxd/storage/ceph: Allow for small size variation

Try it for yourself

This new LXD release is already available for you to try on our demo service.

Downloads

The release tarballs can be found on our download page.

Binary builds are also available for:

  • Linux: snap install lxd
  • MacOS: brew install lxc
  • Windows: choco install lxc

LXD 4.4 has been released

31st of July 2020

Introduction

The LXD team is very excited to announce the release of LXD 4.4!

This is one of those very busy releases with new features for everyone. It also makes significant improvements for our clustering and multi-user deployments and lays on foundation for some more exciting features coming soon.

Enjoy!

New features and highlights

VGA console for virtual machines

Back in LXD 4.3, support for both a default virtio-gpu device as well as for the SPICE communication channel was added to the QEMU configuration.

With this release, we're now adding the communication mechanism and client logic to actually attach and interact with the virtual GPU.

You can now pass --console=vga to lxc launch or lxc start or --type=vga to lxc console. This relies on either remote-viewer or spicy being available on the client system. If neither are, the SPICE socket is mapped on the client and the path is provided.

This API is based on LXD's own websocket console API but is compatible with spice-html5 and so can be used for web interface accessing LXD.

Clustering failure domains

LXD now exposes the concept of failure domains for cluster members.

With this, you can tell the LXD database which systems are likely to go offline at the same time so it can make better decisions when electing a leader or promoting cluster members to different database roles.

Example failure domains could be power circuits on physical systems or the host system in the case of LXD running in a virtual machine or a cloud availability zone and region in the case of LXD running in a cloud instance.

root@nuc01:~# lxc cluster list
+-------+----------------------------+----------+--------+-------------------+--------------+----------------+
| NAME  |            URL             | DATABASE | STATE  |      MESSAGE      | ARCHITECTURE | FAILURE DOMAIN |
+-------+----------------------------+----------+--------+-------------------+--------------+----------------+
| nuc01 | https://172.17.16.140:8443 | YES      | ONLINE | fully operational | x86_64       | pdu01          |
+-------+----------------------------+----------+--------+-------------------+--------------+----------------+
| nuc02 | https://172.17.16.139:8443 | NO       | ONLINE | fully operational | x86_64       | pdu02          |
+-------+----------------------------+----------+--------+-------------------+--------------+----------------+

/dev/lxd API in virtual machines

The /dev/lxd API is now also available inside of virtual machines.

This works identically to within containers with the exception that the image download forwarding feature isn't available.

Graceful daemon shutdown

Up until now, when LXD was instructed to shutdown, either because the system is being shutdown or because of a LXD update, it would immediately interrupt any operation that's in progress.

This was causing a few issues:

  • Any lxc exec/console commands would be immediately disconnected
  • Interrupted image refreshes could lead to broken or missing images
  • Instances being migrated could find themselves left in a stopped state on the source server

The new logic now tries to:

  • Cleanly cancel any cancelable operation
  • Prevent any new operation from starting up
  • Prevent any API interaction while shutting down
  • Give up to 5 minutes for non-cancelable operations (like exec/console) to disconnect

There is unfortunately no good way to notify a user of lxc exec or lxc console that they will get disconnected in a few minutes as any kind of output may interfere with their work. However we feel that the 5 minutes grace period will be sufficient for a lot of cases and a big improvement over the current behavior.

macvlan and sriov managed network types

Two new managed network types now join the existing bridged network type.

This means that it's now possible to define managed networks using macvlan or sriov, then making those usable by restricted projects (which can only used managed networks).

When defined this way, this also allows pre-configuring the MAAS subnets, MTU and VLAN without having to repeat that configuration on a per-instance basis.

This also lays the foundation for the external layer of our upcoming virtual network work (through OVN) which will allow for project users to create their own networks, backed by an allowed managed network and without any risk of conflicts on the host system.

root@lantea:~# lxc network create my-macvlan parent=enp11s0 --type=macvlan
Network my-macvlan created
root@lantea:~# lxc network create my-sriov parent=enp7s0 vlan=1017 --type=sriov
Network my-sriov created
root@lantea:~# lxc init images:ubuntu/20.04/cloud c1
Creating c1
root@lantea:~# lxc config device add c1 eth0 nic network=my-macvlan name=eth0
Device eth0 added to c1
root@lantea:~# lxc init images:ubuntu/20.04/cloud c2
Creating c2
root@lantea:~# lxc config device add c2 eth0 nic network=my-sriov name=eth0
Device eth0 added to c2
root@lantea:~# lxc start c1 c2
root@lantea:~# lxc list
+------+---------+----------------------+-----------------------------------+-----------+-----------+
| NAME |  STATE  |         IPV4         |               IPV6                |   TYPE    | SNAPSHOTS |
+------+---------+----------------------+-----------------------------------+-----------+-----------+
| c1   | RUNNING | 172.17.16.224 (eth0) | 2001:470:b0f8:1016:1::dcba (eth0) | CONTAINER | 0         |
+------+---------+----------------------+-----------------------------------+-----------+-----------+
| c2   | RUNNING | 172.17.17.241 (eth0) | 2001:470:b0f8:1017:1::c36d (eth0) | CONTAINER | 0         |
+------+---------+----------------------+-----------------------------------+-----------+-----------+
root@lantea:~#

Disk usage limits in projects

Following on the work recently done to make LXD safe to use by untrusted users thanks to project limits and restrictions, one piece was missing with projects still able to run the host systems out of disk space.

This is no longer an issue as a new limits.disk key is now available for projects and allows restricting the total disk usage of a project.

This applies to all its instances, images and custom storage volumes.

AppArmor confinement for dnsmasq

AppArmor support has now been extended to protect not only instances but also other services that LXD operates.

The first such external service is dnsmasq which is now run with its own per-network apparmor profile.

We're expecting to add similar profiles for forkdns, forkproxy and qemu, covering all the long running processes that LXD spawns.

GPU mediated devices in resources API

LXD now detects mediated devices for GPUs.

This is supported on some Intel and NVIDIA GPUs and allows for virtual devices to be created on the physical device with multiple profiles available to choose from. The resulting device can then be used with VFIO in virtual machines.

At this point, LXD only detects and reports the mediated device profiles but doesn't yet allow consuming them for virtual machines.

stgraber@castiana:~$ lxc query /1.0/resources | jq .gpu.cards
[
  {
    "driver": "i915",
    "driver_version": "5.4.0-42-generic",
    "drm": {
      "card_device": "226:0",
      "card_name": "card0",
      "control_device": "226:0",
      "control_name": "controlD64",
      "id": 0,
      "render_device": "226:128",
      "render_name": "renderD128"
    },
    "mdev": {
      "i915-GVTg_V5_4": {
        "api": "vfio-pci",
        "available": 0,
        "description": "low_gm_size: 128MB\nhigh_gm_size: 512MB\nfence: 4\nresolution: 1920x1200\nweight: 4",
        "devices": []
      },
      "i915-GVTg_V5_8": {
        "api": "vfio-pci",
        "available": 1,
        "description": "low_gm_size: 64MB\nhigh_gm_size: 384MB\nfence: 4\nresolution: 1024x768\nweight: 2",
        "devices": [
          "7c43babb-cf2a-403c-ae5a-7c45aeb5fb2f"
        ]
      }
    },
    "numa_node": 0,
    "pci_address": "0000:00:02.0",
    "product": "HD Graphics 620",
    "product_id": "5916",
    "vendor": "Intel Corporation",
    "vendor_id": "8086"
  }
]

--console option in lxc launch

LXD 4.3 introduced --console for lxc start and lxc restart, now lxc launch also gives you quick access to the instance console.

Complete changelog

Here is a complete list of all changes in this release:

  • lxd/cluster: Leverage RolesChanges.Handover() to choose handover target
  • lxd: Increase timeout of go unit tests when ran from Emacs
  • lxd/cluster: Skip unncessary loading of nodes from database in Rebalance()
  • lxd/cluster: Leverage RolesChanges.Adjust() to choose rebalance target
  • lxd/cluster: Increase time budget of client.Assign() when assigning voter role
  • lxd/cluster: When demoting to Spare only transition to StandBy if Voter
  • lxd/project: Add more name checks
  • doc/server: Cover listen + authentication
  • lxd/db: Add failure_domains table and nodes column reference
  • lxd/qemu: Don't do file lock on custom volumes
  • lxd/db: Add UpdateNodeFailureDomain() and GetNodesFailureDomains()
  • lxd/cluster: Honor failure domains when changing roles
  • shared/version: Add clustering_failure_domains extension
  • shared/api: Add FailureDomain field to ClusterMemberPut
  • lxd/cluster: Populate FailureDomain field when listing cluster members
  • lxd: Support changing failure domain in PUT /1.0/cluster/
  • client: Check clustering_failure_domains extension when updating a member
  • doc: Add documentation about failure domains
  • lxc: Add failure domain column in "lxc cluster list" output
  • make i18n
  • test: Add new clustering_failure_domains test case
  • instance: update terminology I
  • lxd/network: Validate ipv4/ipv6 routes
  • lxd/proxy: Fix govet
  • lxd/rsync: Add AtLeast
  • lxd/rsync: Filter out security.selinux
  • lxd-p2c: Filter out security.selinux
  • lxc-to-lxd: Filter out security.selinux
  • lxc/launch: Add --console
  • instance: introduce container_syscall_filtering_allow_deny extension
  • tests: remove trailing comma
  • lxd/instance/drivers: Provide instance-data file
  • lxd-agent: Support /dev/lxd
  • lxd/instance/drivers: Allow updating running VMs
  • tests: Fix bad ipv6.routes value
  • lxc/instance/drivers/qemu: Support ephemeral VMs
  • lxd/qemu: Use memory backend ram/file
  • lxc/image: Fix dir handling on snap
  • lxd/qemu: Fix crash on non-pinned VM
  • lxc/image: Fix more dir handling on snap
  • terminals: update terminology again
  • doc/instances: Improves proxy docs
  • lxc/main_alias: Handle leading arguments
  • lxd/storage: Fix block volume migration
  • lxd/rbac: Always allow internal cluster traffic
  • units: handle multiplication integer overflow
  • lxd/rsync: Untangle from daemon package
  • lxd/qemu: Don't use file.locking with rbd
  • lxd/storage/zfs: Use autotrim when available
  • lxd: Add clustering_fix_raft_address_zero patch to fix node with "0" as address
  • lxd/resources: Use udev model data if available
  • Decode error
  • doc/api-extensions: Fix escaping
  • share/api: Add GPU mdev
  • lxd/resources: Add GPU mdev
  • api: Add GPU mdev
  • lxd/qemu: Fix unbound hugepages
  • lxd/qemu: Properly connect memory
  • api: console_vga_type
  • doc/rest-api: Add type field to console
  • shared/api: Add Type field to InstanceConsolePost
  • lxd/instance: Add protocol argument to Instance.Console()
  • lxd/instance/drivers: Support VGA output in qemu.Console()
  • lxd: Handle "vga" type in console API handler
  • client: Add ConsoleInstanceDynamic() to support multiple websocket connections
  • lxc: Add --type flag to "lxc console"
  • i18n: Update translation templates
  • lxc/console: Missing error handling
  • i18n: Update translations from weblate
  • lxc/console: Prefer remote-viewer
  • lxc: Populate cmdConsole.flagType also when ran manually
  • lxc/console: Short argument for type
  • lxc: Allow using --console=TYPE
  • lxd/images: Rename imgPostContInfo to imgPostInstanceInfo
  • lxd/instances: Return and set image properties
  • lxd/qemu: Add support for spice agent
  • lxd/main_daemon: s/containers/instances/
  • lxd: s/containersShutdown/instancesShutdown/
  • lxd: Add context to daemon
  • lxd/operations: Add db operation type to Operation
  • lxd: Add waitForOperations()
  • lxd: Shut down gracefully
  • lxd/operations/operations: Fix hanging cancelation
  • lxd/instance_post: Pass cancel function to websocket operation
  • client/lxd_instances: Cancel websocket op if needed
  • lxc/console: Disconnect on shutdown
  • lxd/daemon: Return 503 when shutting down
  • lxd/db: Drive-by removal of leftover fmt.Printf's
  • doc/api-extensions: Fix over-escaping
  • lxc/network: Adds flagType to cmdNetwork
  • shared/instance: Move network validation functions to shared
  • lxd/db/cluster: Adds type field to networks table
  • lxd/db/networks: Adds internal network type constants
  • lxd/db/networks: Updates CreateNetwork to accept a network type
  • lxd/db/networks: Updates CreatePendingNetwork to accept a network type
  • lxd/db/networks: Populate network type in getNetwork
  • lxd/network/network/interface: Adds network interface
  • lxd/network/network/load: LoadByName to use Network interface, add Validate
  • lxd/network/errors: Adds error constants
  • lxd/network/network/utils: Moved validation functions from main package
  • lxd/network/driver/common: Adds common driver
  • lxd/network/driver/bridge: Renames network to driver_bridge
  • lxd/networks/utils: Remove unused network validation functions in main
  • lxd/device/device/utils/network: Removes unused validation functions
  • lxd/device/device/utils/proxy: shared.IsNetworkAddress usage
  • lxd/device/nic: shared validation function usage
  • lxd/device/nic/bridged: Support Network interface
  • lxd/device/nic/ipvlan: shared validation function usage
  • lxd/device/nic/routed: shared validation function usage
  • lxd/main/init/interactive: Uses network name validation from network package
  • lxd/networks: ValidNetworkName usage in networkPost
  • lxd/networks: Updates doNetworkUpdate to use network package validation
  • lxd/networks: Updates networksPost to support network type
  • lxd/networks: Remove use of network.IsRunning in networkShutdown
  • lxd/networks/config: Removed
  • lxd/networks/utils: Updates usage of n.RefreshForkdnsServerAddresses to generic n.HandleHearbeat
  • i18n: Update translation templates
  • lxd: Updates network tests to pass netType
  • lxd/network/network/utils: Unexports usesIPv4Firewall and usesIPv6Firewall
  • lxd/network/driver/bridge: usesIPv4Firewall and usesIPv6Firewall usage
  • lxd: Add --force flag to lxd shutdown
  • lxd/apparmor: Use templating
  • lxd/apparmor: Use proper version parsing
  • shared/version: Add projects_limits_disk extension
  • doc: Document limits.disk project configuration key
  • lxd: Add "limits.disk" to supported project config keys
  • lxd/project: Check that root disk sizes are within limits.disk
  • lxd/project: Add projectInfo struct to hold together project's extra info
  • lxd/db: Add GetCustomVolumesInProject() to fetch custom volumes in a project
  • lxd/project: Fetch the project's custom volumes
  • lxd/project: Consider custom volumes sizes in checkAggregateLimits
  • lxd/project: Add AllowVolumeCreation() to check limits upon volume creation
  • lxd: Call project.AllowVolumeCreation() before creating custom volumes
  • lxd/project: Add AllowVolumeUpdate() to check custom volumes config updates
  • lxd: Call project.AllowVolumeUpdate() before modifying a custom volume
  • shared: Add QuotaWriter
  • lxd/project: Add GetImageSpaceBudget() returning image disk space budget
  • lxd: Possibly limit the disk space that can be used by POST /1.0/images
  • lxd/network/driver/common: Adds config diff and db update common functions
  • lxd/network/driver/common: Adds contextual logger
  • lxd/network/driver/common: Removes stuttering on "common" in validation rules function
  • lxd/network/driver/bridge: Updates to use contextual logger
  • lxd/network/driver/bridge: Simplifies Update function to use common update functions
  • lxc/networks: Renames notify to clusterNotification in doNetworkUpdate
  • lxd/network/network/interface: Clarifies Update arguments
  • lxd/network/network/interface: Renames Delete withDatabase arg to clusterNotification
  • lxd/network/driver/common: Adds common delete function
  • lxd/networks: Cleans up networksPost to use clusterNotification argument correctly
  • lxd/networks: Log quoting in networksPostCluster
  • lxd/networks: Cleans up doNetworksCreate to use clusterNotification argument
  • lxd/network/driver/bridge: Updates Delete to use common delete function
  • lxd/network/driver/bridge: Adds logging to Update
  • lxd: Check available project budget when publishing an instance as image
  • lxd/project: Fill missing fields when checking instance creation
  • lxd/project: Skip checks when unsetting limits
  • lxd/networks: Removes bridge specific logic in doNetworkUpdate
  • lxd: Honor project disk budget when downloading images
  • lxd/network/driver/bridge: Adds fan auto detection logic to Update
  • lxd/network/driver/common: Adds rename common function
  • lxd/network/driver/bridge: Updates Rename to use common rename function
  • lxd/networks: networkPost logging quoting
  • test: Add tests for the "limits.disk" project config key
  • lxc/network/driver/bridge: isRunning comment
  • lxd/network/driver/bridge: Unexports hasIPv4Firewall and hasIPv6Firewall
  • lxd/networks: Detect unknown network type in networksPost, dont assume bridge
  • lxd/networks: comment fix in networksPostCluster
  • lxd/db/network: Provide way to identifty unknown network type in getNetwork
  • lxd/networks: Allow for different managed network types in doNetworkGet
  • lxd/network/network/interface: Adds fillConfig to interface
  • lxd/network/driver/common: Adds default fillConfig function
  • lxd/network/driver/common: Adds default HandleHeartbeat function
  • lxd/network/network/load: Adds per-driver FillConfig wrapper
  • lxd/network/network/utils: Removes generic FillConfig
  • lxd/network/driver/bridge: fillConfig implementation
  • lxd/network/driver/bridge: Exposes error message from ValidNetworkName in Validate
  • lxd/sys: Create apparmor/seccomp paths
  • lxd/apparmor: Split and rename instance functions
  • lxd/resources/storage: Use ID_MODEL_ENC when possible
  • shared: Add InSnap
  • shared/subprocess: Add AppArmor support
  • lxd/apparmor: Rename template
  • lxd/apparmor: Add dnsmasq profile
  • lxd/networks: Use AppArmor when available
  • tests: Delete leftover storage volume
  • lxd/operations/operations: Renames Operations to Clone
  • lxd-agent/operations: operations.Clone() usage
  • lxd: operations.Clone() usage
  • Drop from .travis.yaml Go versions we don't support anymore
  • shared/api/network: Adds network status constants
  • lxd/networks: API constant usage in networkDelete
  • lxd/network/network/load: Adds status
  • lxd/network/network/interface: Adds status function
  • lxd/network/driver/common: Adds status field and function
  • lxd/network/driver/bridge: Don't allow starting a pending network
  • lxd/device/nic/bridged: Usage of d.state.Cluster.GetNetworkInAnyState in rebuildDnsmasqEntry
  • lxd/api/cluster: Usage of api.NetworkStatusPending
  • lxd/db/networks: Usage of api package's NetworkStatus constants in getNetwork
  • lxd/db/networks: Removes unused GetNetwork
  • lxd/db/networks: GetNonPendingNetworks comment
  • lxd/db/networks: Allow pending nodes to be added to errored networks in CreatePendingNetwork
  • lxd/db/networks: CreatePendingNetwork comments and line spacing
  • lxd/networks/utils: Skip network load error in networkUpdateForkdnsServersTask
  • lxd/device/nic/bridged: Validates network is type bridge
  • lxc/device/nic/bridged: Only allow using non-Pending networks
  • lxd/networks: Various comment and error quoting consistency fixes
  • lxd/networks: Validate network name earlier in networksPost
  • lxc/networks: Validate config in doNetworksCreate
  • lxd/db/networks: Ensure that network type matches existing pending network in CreatePendingNetwork
  • lxd/db/networks: Remove errored state on successful update in UpdateNetwork
  • lxd/network/driver/bridge: Adds targetNode arg to Update
  • lxd/network/network/interface: Adds targetNode arg to Update
  • lxd/network/driver/common: Tweaks to update function in cluster environment
  • lxd/networks: networksPost error response tweaks
  • lxd/networks: Updates networksPostCluster
  • lxd/networks: Unifies networkPut and networkPatch
  • lxd/device/nictype: Adds small package to resolve NIC device nictype from network
  • lxd/device/config/devices: Removes NICType
  • lxd/device/config/devices: Improves comment on Update
  • lxd/device/device/load: Removes devTypes map and updates load to use NICType function
  • lxd/device: Removes device load helpers
  • lxd/device/device/utils/network: nictype.NICType usage
  • lxd/device/nic/bridged: Updates usage of functions whos signatures changed due to NICType
  • lxd/device/nic/p2p: Updates usage of functions that changed signature due to NICType
  • lxd/device/proxy: nictype.NICType usage
  • lxd/instance/drivers/driver/lxc: nictype.NICType usage
  • lxd/instance/drivers/driver/qemu: nictype.NICType usage
  • lxd/network/driver/bridge: Usage of functions that changed signature due to NICType
  • lxd/network/driver/common: Updates IsUsed for NICType signature changes and checks for profile usage
  • lxd/network/network/interface: Signature change of IsUsed to accomodate NICType
  • lxd/network/network/utils: Usage of nictype.NICType and signature changes to accomodate it
  • lxd/networks: nictype.NICType usage and comment improvements
  • lxd/networks: Comment ending consistency
  • test: Updates tests to delete profiles before networks
  • doc: Updates clustering docs with network parent optional per-node key
  • lxd/db/networks: Adds parent as optional per-node network key
  • lxd/db/networks: Adds constant for NetworkTypeMacvlan
  • lxd/network/network/load: Adds macvlan driver as supported network type
  • lxd/networks: Adds macvlan support to networksPost
  • lxd/network/driver/macvlan: macvlan driver implementation
  • lxd/device/nic/macvlan: Adds support for network config key
  • lxd/device/nic/macvlan: Only allow non-pending networks to be used
  • test: Adds macvlan network test
  • lxd: Adds NetworkTypeSriov constant and conversion handling
  • lxd/network: Adds sriov driver
  • lxd/networks: Remove database record on error in networksPost
  • lxd/device/nic/sriov: Adds network key support
  • lxd/device/nictype: Adds sriov support
  • test: sriov NIC comment ending consistency
  • test: sriov network test
  • doc/networks: Re-arranges network docs to support different types
  • doc/networks: Adds doc for macvlan and sriov networks
  • doc/instances: Updates macvlan and sriov NIC to indicate network support
  • doc/networks: Fixes typo
  • doc/networks: Adds example usage of --type flag
  • lxd/network/openvswitch/ovs: Adds OVS wrapper
  • lxd/device/nic/bridged: ovs.PortSet usage
  • lxd/network/driver/bridge: ovs usage
  • lxd/network/network/utils: ovs usage
  • lxd/networks: ovs.BridgeExists usage
  • api: Adds network_type_macvlan extension
  • api: Adds network_type_sriov extension
  • tree-wide: add dummy include package for cgo
  • doc/images: Cover the various image servers
  • doc: Typo fix
  • lxd/networks: Fixes bug in doNetworkUpdate that prevents removal of non-node specific keys
  • lxd/network/driver/bridge: Consistent comment ending in setup()
  • lxd/network/network/interface: fillConfig signature
  • lxd/network/driver/common: Updates fillConfig signature
  • lxd/network/driver/bridge: Updates fillConfig signature
  • lxd/network/network/load: Updates FillConfig to use new signature
  • lxd/network/driver/bridge: Fixes Update to regenerate default values if missing
  • test/suites/container/devices/nic/bridged: Fixes DHCP disable by setting IP address none
  • lxd/network/driver/bridge: Dont fail start if cannot restore third party route
  • lxd/migrate: Fix crash in sendControl when no active connection
  • lxd/operations: Fix typo
  • lxc/export: Plug in cancelable wait
  • i18n: Update translation templates
  • lxd/devices/device/utils/network: Removes networkValidMAC
  • shared/instance: Adds IsNetworkMAC for use in network and device packages
  • lxd/device/nic: shared.IsNetworkMAC usage
  • lxd/network/driver/bridge: Adds volatile.bridge.hwaddr key
  • shared/validate: Adds validate helper package
  • lxd: Updates use of validate helper functions now in validate package
  • shared: Removes validate helper functions
  • lxd/device/device/utils/infiniband: Changes infinibandValidMAC to use net.ParseMAC
  • lxd/device/device/utils/infiniband/test: Changes test name for linter
  • lxd/networks: Allow update/removal of node-specific key in non-clustered mode
  • lxd/network/driver/bridge: Adds safety check for volatile MAC address usage
  • lxd/device: fix empty error message when tc fails
  • test: Wait for operations to be removed from the database
  • shared/validate: Adds Optional() validate wrapper
  • shared/validate: Makes IsInt64 non-optional
  • lxd/network/driver/bridge: Add validate.Optional() wrapper for validate.IsInt64 usage
  • lxd/storage/utils: Adds validate.Optional() wrapper for validate.IsInt64 usage
  • shared/instance: Adds validate.Optional() wrapper for validate.IsInt64 usage
  • lxd/device/device/utils/network: Removes networkValidVLAN
  • shared/validate: Adds IsNetworkVLAN
  • lxd/device/device/utils/network: validate.IsNetworkVLAN usage
  • lxd/device/nic: validate.IsNetworkVLAN usage
  • lxd/network/driver: Adds mtu and vlan support for macvlan and sriov network types
  • lxd/device/nic: Inherit mtu and vlan settings from network for macvlan and sriov NICs
  • doc/networks: Adds mtu and vlan options for macvlan and sriov network types
  • seccomp: switch from individual pread() to process_vm_readv()
  • seccomp: fix i386 builds
  • seccomp: ensure that target process is still valid
  • client: Move proxyMigration
  • lxd: Port remaining calls to instance
  • lxd/network/driver/common: Adds Create function no-op
  • lxd/network/network/interface: Adds Create function
  • lxd/networks: Adds call to network Create in doNetworksCreate
  • lxd/device/device/utils/network: Adds networkDHCPValidIP
  • lxd/device/nic/bridged: Removes networkDHCPValidIP
  • lxd/device/device/utils/networks: Splits networkSetupHostVethDevice into multiple functions
  • lxd/device/nic/bridged: networkVethFillFromVolatile usage and other host-veth functions
  • lxd/device/nic/p2p: networkVethFillFromVolatile usage and other host-veth helper functions
  • lxd/device/nic/routed: networkVethFillFromVolatile usage and other host-veth helper functions
  • lxd/network/network/utils: Updates isInUseByDevices to support networks that don't match their physical parent
  • i18n: Update translations from weblate

Try it for yourself

This new LXD release is already available for you to try on our demo service.

Downloads

The release tarballs can be found on our download page.

Binary builds are also available for:

  • Linux: snap install lxd
  • MacOS: brew install lxc
  • Windows: choco install lxc

LXD 4.3 has been released

1st of July 2020

Introduction

The LXD team is very excited to announce the release of LXD 4.3!

This release comes with a lot of improvements especially for those using virtual machines. It also comes with quite a few bugfixes for our cluster users and general performance improvements.

Enjoy!

New features and highlights

Block custom storage volumes

Up until now, all custom storage volumes were filesystems. Either a directory/subvolume/dataset on a storage backend which supports that or as a formatted block on the other backends.

Now with virtual machines being supported by LXD, we found ourselves needing to support attaching both our traditional filesystem backed volumes to virtual machines (which has been possible for a while and uses 9p) as well as allowing for additional raw disks to be attached to virtual machines.

This can now be done with block custom storage volumes.

stgraber@castiana:~$ lxc storage volume create default my-fs size=10GiB
Storage volume my-fs created
stgraber@castiana:~$ lxc storage volume create default my-block size=10GiB --type=block
Storage volume my-block created

stgraber@castiana:~$ lxc storage volume list default
+-----------------+------------------------------------------------------------------+-------------+--------------+---------+
|      TYPE       |                               NAME                               | DESCRIPTION | CONTENT TYPE | USED BY |
+-----------------+------------------------------------------------------------------+-------------+--------------+---------+
| custom          | my-block                                                         |             | block        | 0       |
+-----------------+------------------------------------------------------------------+-------------+--------------+---------+
| custom          | my-fs                                                            |             | filesystem   | 0       |
+-----------------+------------------------------------------------------------------+-------------+--------------+---------+
| image           | a4dc839edd35d50158d57818938775669265a3af004bd93b8281115ee0abd29d |             | block        | 1       |
+-----------------+------------------------------------------------------------------+-------------+--------------+---------+
| virtual-machine | f1                                                               |             | block        | 1       |
+-----------------+------------------------------------------------------------------+-------------+--------------+---------+

stgraber@castiana:~$ lxc config device add f1 my-fs disk source=my-fs pool=default path=/srv/my-fs
Device my-fs added to f1
stgraber@castiana:~$ lxc config device add f1 my-block disk source=my-block pool=default
Device my-block added to f1

stgraber@castiana:~$ lxc start f1
stgraber@castiana:~$ lxc exec f1 bash
root@f1:~# gdisk -l /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_lxd_my-block
GPT fdisk (gdisk) version 1.0.5

Partition table scan:
  MBR: not present
  BSD: not present
  APM: not present
  GPT: not present

Creating new GPT entries in memory.
Disk /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_lxd_my-block: 20971520 sectors, 10.0 GiB
Sector size (logical/physical): 512/512 bytes
Disk identifier (GUID): EA616112-9C49-4809-AA68-53895E752A34
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 20971486
Partitions will be aligned on 2048-sector boundaries
Total free space is 20971453 sectors (10.0 GiB)

Number  Start (sector)    End (sector)  Size       Code  Name
root@f1:~# df -h /srv/my-fs/
Filesystem      Size  Used Avail Use% Mounted on
lxd_my-fs        10G  128K   10G   1% /srv/my-fs
root@f1:~#

VM: Initial work for graphical console

All LXD VMs now come with virtio-gpu and virtio-input devices out of the box as well as a spice channel currently tied to a local unix socket.

One can directly connect to that socket using a client like spicy but this will soon change and instead have LXD allow remote access to this through websocket using lxc console.

VM: Rework of PCIe layout

We've now made sure that every virtio device we expose to the VM is on the PCIe bus, devices have been merged into functions when possible to save the number of slots.

Logic has also been put in place so that network devices should always show up in the same slot and so get a stable name when hardware based naming is enabled.

VM: GPU passthrough

It is now possible to attach gpu type devices to VM, passing a physical GPU through VFIO. Do note that unlike containers that can share GPU with their host, virtual machines cannot.

Direct console attach on lxc start and lxc restart

Both lxc start and lxc restart can now be passed --console when interacting with a single instance. This will cause the command line to immediately attach to the console letting you observe the instance boot sequence.

Isolated CPUs reporting in resources API

A new isolated field is present on all CPU threads now in the /1.0/resources API, this will be set to true if the particular thread is specified as an isolated CPU.

This usually happens when one starts the system with isolcpus= on the kernel command line.

Complete changelog

Here is a complete list of all changes in this release:

  • lxd/instance/drivers/driver/lxc: Adds debug logging to deviceStop
  • lxd/instance/drivers/driver/lxc: Adds driver revert on failed start in startCommon
  • lxd/instance/drivers/driver/qemu: Adds debug logging to deviceStop
  • lxd/instance/drivers/driver/qemu: Simplifies failed start device cleanup in Start
  • lxd/storage/drivers/driver/ceph/utils: Removes getRBDFilesystem
  • lxd/storage/drivers/driver/ceph: Replaces use of d.getRBDFilesystem with vol.ConfigBlockFilesystem
  • lxd/storage/drivers/volume: Adds ConfigBlockMountOptions function
  • lxd/storage/drivers/driver/ceph/utils: Removes getRBDMountOptions in place of vol.ConfigBlockMountOptions()
  • lxd/storage/drivers/driver/lvm/utils: Removes volumeMountOptions in place of vol.ConfigBlockMountOptions()
  • lxd/storage/drivers: Replaces driver specific mount options resolution with vol.ConfigBlockMountOptions()
  • lxd/rbac: Don't close body when missing
  • doc/storage: Cover host/disk/loop setups
  • lxd/init: Tweak default loop sizing
  • lxd/vm: Rename some functions
  • client: Expand snap path in ConnectLXDUnix
  • lxd/vm: Add virtio-vga card
  • lxd/vm: Add spice channel
  • client: Fix ConnectLXDUnix regression
  • lxd/vm: Fix PCIe slot for physical/sriov nic
  • lxd/network: Make setting bridge VLAN filtering & default PVID optional
  • lxd/instance/drivers/driver/qemu: Integrates built in GPU device PCI range with future passthrough GPU devices
  • lxd/instance/drivers/driver/qemu/templates: Updates built in GPU device to use GPU address range prefix
  • lxd/vm: Move to separate devices
  • lxd/vm: Remove tiny wrapper functions
  • lxd/vm: Per-architecture bus type
  • add type to specify the instance type on creation Signed-off-by: Salem Yaslem s@sy.sa
  • lxd/vm: Centralize port generation
  • lxd/device: Sort nic devices ahead of others
  • lxd/device/device/utils/generic: Adds PCI management functions for overriding driver
  • lxd/device/device/utils/network: Removes network specific PCI bind/unbind functions
  • lxd/device/nic/physical: Updates to use generic PCI management functions
  • lxd/device/nic/sriov: Updates to use generic PCI management functions
  • lxd/vm: Separate template keys in global/local
  • lxd/vm: Use virtio-gpu-pci on non-x86
  • lxd/vm: Rename qemuVGA to qemuGPU
  • lxd/vm: Add virtio-input keyboard/mouse
  • lxd/vm: Move bus allocator to own file
  • lxc/volume: Fix typo in help message
  • i18n: Update translation templates
  • lxc/snapshot: Allow using snapshot delimiter
  • i18n: Update translation templates
  • doc/instances: Updates GPU device docs to show VM support
  • lxd/device/gpu: Updates validation for VM support
  • lxd/device/config/device/runconfig: Adds GPU field to RunConfig
  • lxd/device/device/utils/generic: pciDeviceDriverOverride only check for driver binding if specified
  • lxd/device/gpu: Adds VM GPU passthrough support
  • lxd/instance/drivers/driver/qemu/templates: Consistent naming and casing for net dev templates
  • lxd/instance/drivers/driver/qemu: Consistent net dev naming usage
  • lxd/instance/drivers/driver/qemu/templates: Adds qemuGPUDevPhysical template
  • lxd/instance/drivers/driver/qemu: Adds GPU passthrough support
  • lxd/instance/drivers/driver/qemu/bus: Adds comments, clarifies var names, and constants for defined multi-function groups
  • lxd/instance/drivers/driver/qemu: Switches to multi-function group constants and adds comments
  • lxd/instance/drivers/qmp/monitor: Allow serial char device name to be passed in
  • lxd/instance/drivers/driver/qemu: Defines qemuSerialChardevName to share with qemu and qmp
  • lxd/instance/drivers/driver/qemu: qemuSerialChardevName usage
  • lxd/instance/drivers/driver/qemu/templates: Add serial chardev name injection
  • lxd/storage/quota/projectquota: Only set quota on directories and regular files
  • lxd/db: Automatically strip ?project=default
  • lxc/action: Properly handle --all with remotes
  • lxd/projects: Properly clear empty keys
  • lxd/db: Add missing feature to default project
  • lxd/instance/drivers/driver/qemu: Pass-through GPU VGA mode status from host
  • lxd/storage/drivers/driver/zfs/volumes: Remove snapshot when migrating as main volume
  • lxd/cluster/heartbeat: Fix race in HeartbeatNode
  • lxc/console: Split Console to own function
  • lxc/start: Allow direct console attach
  • i18n: Update translation templates
  • lxd/instance/drivers/driver/qemu: Only enable GPU vga mode on x86_64 systems
  • lxd/resources: Fix golint warning
  • doc/api-extensions: Fix escaping
  • api: resource_cpu_isolated
  • lxd/resources: Add Isolated property
  • lxd/resources: Don't use shared
  • lxd/devices: Use resources for cpuset parsing
  • lxc: Don't over-escape URLs
  • lxd: Don't over-escape URLs
  • lxd/db/storage: Rework UsedBy for pools
  • lxd/instance/drivers/driver/qemu: Adds trans=virtio to 9p mounts
  • lxc/action: Also add --console to restart
  • lxd/resources/net: More flexible PCI detection
  • lxc/query: Add path check
  • i18n: Update translation templates
  • tests: Fix bad lxc query call
  • lxd/storage-pools: Tweak UsedBy URLs
  • lxd/networks: Reports profiles in UsedBy
  • lxd/db: Tweak joins
  • lxd/db: Fix UsedBy on projects
  • lxd/storage_volumes: Fix UsedBy
  • api: usedby_consistency
  • lxd-agent/main/agent: Fix 9p mount when relative target path is supplied
  • test: Updates udhcpd args to ensure process quits one lease acquired
  • util_linux: update terminology
  • lxd: Fix snapshot index retrieval
  • lxd/backups: Use backups dir for unpack
  • lxd/vm: Add udev rule fallback
  • lxd/images: Set arch names when downloading
  • lxd: More flexible compression algorithms
  • tests: Add test for compression options
  • doc/rest-api: Rename rootfs to root
  • doc/rest-api: Fix instance PATCH example
  • lxd: Fix building with clang
  • lxd/db: Add missing criteria for querying a specific public image
  • lxd/db: Add the Errored storage state when rendering the Status field
  • lxd/cluster: If raft node 1 gets remove during recovery, add it back
  • lxd/db: Make GetNework() return an error if the network is pending
  • lxd/db: Rename NetworkCreatePending to CreatePendingNetwork
  • lxd/db: Make GetStoragePool() return an error if the pool is pending
  • lxd/db: Rename StoragePoolCreatePending to CreatePendingStoragePool
  • lxd/firewall: Filter unwanted ethernet frame types when IP filtering is enabled
  • lxd/storage/drivers: Bump VM fs size to 100MB
  • lxd/db: Fix UsedBy for profiles on storage pools
  • lxd/storage: Use Truncate to create/grow VM files
  • lxd/db: Consider personalities in GetNodeWithLeastInstances
  • lxd/db: Avoid test failure in arch matching
  • lxd/storage: Better handle broken volumes
  • client: Handle unknown image sizes
  • lxd/response: Stream multi-part responses
  • lxd/device/disk: Fixes cloud-init errors for VMs
  • lxc/action: Show usage on missing target
  • lxd/storage: Rely on UsedBy for deletion error
  • lxd/instances/qemu: Use images dir during compression
  • lxd/storage/drivers: Rename fs to filesystem
  • api: custom_block_volumes
  • shared/api: Add ContentType to storage volume structs
  • lxd/migration: Add ContentType to structs
  • lxd/db/cluster: Add content type to storage volumes
  • lxd/db: Add content type constants
  • lxd/db: Add content type to storage volumes
  • lxd/storage/utils: Add content type conversion functions
  • lxd: Support custom block volumes
  • lxd/storage: Show type in error
  • lxd/device/disk: Handle custom block volumes
  • client: Support custom block volumes
  • lxc/storage_volume: Support custom block volumes
  • test/suites: Add tests for custom block volumes
  • po: Update translations
  • lxd/storage: Backward compatibility for content types
  • doc/storage: Document block storage volumes
  • lxd/util: Detect hugetlbfs mount point
  • lxd/cluster: Always check for dqlite protocol version mismatches
  • lxd/cluster: Don't run unncessary HEAD probe upon dqlite connections
  • forksyscall: use nsids for shiftfs syscall intercepts
  • lxd/db: Drop ClusterRoleDatabase records from the database
  • lxd/cluster: Fetch database role information directly from raft
  • lxd/storage: Fix regression in truncate handling
  • lxd/cluster: Only look up raft_nodes for resolving the address of node 1
  • i18n: Update translations from weblate

Try it for yourself

This new LXD release is already available for you to try on our demo service.

Downloads

The release tarballs can be found on our download page.

Binary builds are also available for:

  • Linux: snap install lxd
  • MacOS: brew install lxc
  • Windows: choco install lxc

LXD 4.0.2 LTS has been released

25th of June 2020

Introduction

The LXD team is pleased to announce the release of LXD 4.0.2!

This is the second bugfix release for LXD 4.0 which is supported until June 2025.

Bugfixes and improvements

This release includes a couple of months worth of bugfixes and minor improvements from the development branch.

Some of the highlights include:

  • Automatic matching of CPU NUMA layout for VMs
  • Updated PCIe layout for VMs (includes input devices and virtual GPU)
  • Automatic detection and support for zsys ZFS layout
  • --expanded option in lxc config get
  • Argument support in image/backup compressor
  • New disk and memory (optional) columns in lxc list
  • GPU passthrough for VMs
  • --console option to lxc start and lxc restart

The full list of commits is available below:

  • lxd-agent: Support systemd-notify
  • lxd/qemu: Switch default unit type to notify
  • lxd/storage/backend/lxd: Updates CreateInstanceFromImage to use reverter
  • lxd/storage/drivers/errors: Adds ErrCannotBeShrunk error
  • lxd/storage/drivers/utils: Updates to shrinkFileSystem ErrCannotBeShrunk error
  • lxd/storage/backend/lxd: Updates CreateInstanceFromImage to detect ErrCannotBeShrunk
  • lxd/storage/drivers: Returns ErrCannotBeShrunk when block volume cannot be shrunk
  • lxd/device/proxy: Dont allow proxy_protocol to be set when in nat mode
  • lxd/device/proxy: Dont wrap lines
  • lxd/device/proxy: Improves validation
  • test/suites/container/devices/proxy: Updates tests with new validation rules
  • lxd: Updates snapshotProtobufToInstanceArgs to support instance type
  • lxd/qemu: Match basic NUMA layout
  • lxd/storage/drivers/driver/zfs/volumes: Delete volume on error in CreateVolumeFromCopy
  • lxd-agent/main/agent: Adds comment about reason for systemd-notify usage
  • lxd/cgroup: Fix memory controller detection
  • lxd/migration/migrate/proto: Fix alignment
  • lxd/migration: Adds volumeSize field to MigrationHeader
  • lxd/migrate: Adds VolumeSize to MigrationSinkArgs
  • lxd/migration/migration/volumes: Adds VolumeSize to VolumeTargetArgs
  • lxd/migrate/instance: Use VolumeSize from offer header in Do()
  • lxd/storage/backend/lxd: Use VolumeSize from migration header in CreateInstanceFromMigration
  • lxd/storage/drivers: Exports BlockDevSizeBytes function
  • lxd/storage/utils: Adds InstanceDiskBlockSize
  • lxd/migrate/instance: Populate offerHeader.VolumeSize for VMs
  • lxd/storage/backend/lxd: Adds VM volume size hint to CreateInstanceFromCopy
  • lxd/device/utils: Do not add the Ceph mon port if already present in /etc/ceph config file
  • lxd/instance/qemu: Add comment on cpuTopology
  • lxd/storage/ceph: Support port in URL
  • lxd/storage/drivers/utils: Makes minBlockBoundary available to other functions
  • lxd/storage/drivers/driver/zfs/utils: Updates createVolume to use minBlockBoundary
  • lxd/storage/drivers/driver/zfs/volumes: Updates SetVolumeQuota to use minBlockBoundary
  • lxd/storage/drivers/zfs/volumes: Updates CreateVolume to allow regeneration of deleted image volumes
  • lxd/storage/drivers/driver/zfs/volumes: Dont revert on rename success
  • lxd/daemon: Remove duplicated logic
  • lxd/instance/qemu: Announce LXD in SMBIOS
  • share/usbid: Don't print error when missing
  • lxd/init: Auto-detect and use Ubuntu ZFS setup
  • lxc/config: Add --expanded to get
  • client/interfaces: Add Mode to ImageCopyArgs
  • shared/api/image: Add ImageExportPost
  • client/lxd_images: Set fingerprint and secret headers
  • i18n: Update translation templates
  • client: Add relay mode for image copy
  • client: Add ExportImage to ImageServer
  • client: Add push mode for image copy
  • client: Add GetOperationWaitSecret
  • Resolve both core.https_address and cluster.https_address when comparing IPs
  • lxd/storage/drivers/generic/vfs: Skip missing files during export
  • lxd/images: Fixes hang in export when invalid --compression argument passed
  • lxd/storage/drivers/driver/btrfs/volumes: CreateVolumeFromCopy only use expanded volume size when source is image
  • lxd/storage/drivers/driver/ceph/volumes: Allow cached volume regeneration in CreateVolume
  • lxd/storage/drivers/driver/ceph/utils: Uses defaultBlockSize rather than hardcoded 10GB
  • lxd/storage/drivers/driver/ceph/volumes: Adds getVolumeSize function
  • lxd/storage/drivers/driver/ceph/volumes: Removes unnecessary mount/unmount
  • lxd/storage/drivers/driver/zfs/volumes: Clarify clone comments
  • lxd/storage/drivers/driver/ceph/volumes: Dont wrap lines
  • lxd/storage/drivers/driver/ceph/volumes: Dont use clone mode when creating volume from cached image when it is disabled
  • lxd/storage/utils: VolumeDBCreate comment formatting
  • lxd/storage/drivers/driver/lvm/volumes: CreateVolumeFromCopy only set volume size from expanded config when source is image
  • lxd/storage/drivers/driver/zfs/volumes: CreateVolumeFromCopy only set volume size from expanded config when source is image
  • lxc/storage/drivers/driver/ceph/utils: Reworks parseParent to return a Volume struct
  • lxd/storage/drivers/driver/ceph/utils: Adds tests for parseParent
  • lxd/storage/drivers/driver/ceph/utils: Adds cephVolumeTypeZombieImage constant
  • lxd/storage/drivers/driver/ceph/utils: Updates rbdCreateVolume to accept string size
  • lxd/storage/drivers/driver/ceph/utils: Pass volume config in rbdMarkVolumeDeleted
  • lxd/storage/drivers/driver/ceph/utils: Pass volume config in rbdRenameVolume
  • lxd/storage/drivers/driver/ceph/utils: Replaces getRBDSize with volumeSize
  • lxd/storage/drivers/driver/ceph/utils: Dont wrap lines
  • lxd/storage/drivers/driver/ceph/utils: Updates usage of d.parseParent in deleteVolume
  • lxd/storage/drivers/driver/ceph/utils: Updates RBD naming logic in getRBDVolumeName
  • lxd/storage/drivers/driver/ceph/volumes: Ensures CreateVolumeFromCopy correctly sizes new volume
  • lxd/storage/drivers/driver/ceph/volumes: If volume doesnt exist in DeleteVolume do nothing
  • lxd/storage/drivers/driver/ceph/utils: Dont wrap lines
  • lxd/db: Rename CertificatesGet to GetCertificates
  • lxd/db: Rename CertificateGet to GetCertificate
  • lxd/db: Rename CertSave to CreateCertificate
  • lxd/db: Rename CertDelete to DeleteCertificate
  • lxd/db: Rename CertUpdate to UpdateCertificate
  • lxd/db: Drop unused ConfigValueSet
  • lxd/instances/post: Fix revert in createFromBackup
  • lxd/storage/drivers/volume: Adds allowUnsafeResize bool to Volume struct
  • lxd/storage/backend/lxd: Adds cannot shrink error handling in CreateInstanceFromBackup
  • lxd/storage/drivers/generic/vfs: Sets block volume size to file size of volume in tarball in genericVFSBackupUnpack
  • lxd/storage/drivers/driver/btrfs/volumes: No need to move GPT header if no filler used in CreateVolume
  • lxd/storage/drivers/driver/btrfs/volumes: Skip GPT header move in SetVolumeQuota when allowUnsafeResize is enabled
  • lxd/storage/drivers/driver/dir/volumes: Skip GPT header move in SetVolumeQuota when allowUnsafeResize is enabled
  • lxd/storage/drivers/driver/lvm/volumes: Allow unsafe shrinking when allowUnsafeResize is enabled
  • lxd/storage/drivers/driver/zfs/volumes: Allow unsafe shrinking when allowUnsafeResize is enabled
  • lxd/storage/drivers/driver/ceph/volumes: Allow unsafe shrinking when allowUnsafeResize is enabled
  • lxd/db: Rename InstanceNames to GetInstanceNames
  • lxd/db: Rename ContainerNodeAddress to GetNodeAddressOfInstance
  • lxd/db: Rename ContainersListByNodeAddress to GetInstanceNamesByNodeAddress
  • lxd/db: Rename ContainersByNodeName to GetInstanceToNodeMap
  • lxd/db: Rename ContainerNodeMove to UpdateInstanceNode
  • lxd/db: Rename ContainerNodeProjectList to GetLocalInstancesInProject
  • lxd/db: Rename ContainerConfigInsert to CreateInstanceConfig
  • lxd/db: Rename ContainerConfigUpdate to UpdateInstanceConfig
  • lxd/db: Rename InstanceRemove to RemoveInstance
  • lxd/db: Rename ContainerProjectAndName to GetInstanceProjectAndName
  • lxd/db: Rename ContainerConfigClear to DeleteInstanceConfig
  • lxd/db: Rename ContainerConfigGet to GetInstanceConfig
  • lxd/db: Rename ContainerConfigRemove to DeleteInstanceConfigKey
  • lxd/db: Rename ContainerSetStateful to UpdateInstanceStatefulFlag
  • lxd/db: Rename ContainerProfilesInsert to AddProfilesToInstance
  • lxd/db: Drop unused ContainerProfiles
  • lxd/db: Drop unused ContainerConfig
  • lxd/db: Remove unused ContainersNodeList
  • lxd/db: Rename ContainersResetState to ResetInstancesPowerState
  • lxd/db: Rename ContainerSetState to UpdateInstancePowerState
  • lxd/db: Rename ContainerUpdate to UpdateInstance
  • lxd/db: Rename InstanceSnapshotCreationUpdate to UpdateInstanceSnapshotCreationDate
  • lxd/db: Rename ContainerLastUsedUpdate to UpdateInstanceLastUsedDate
  • lxd/db: Rename ContainerGetSnapshots to GetInstanceSnapshotsNames
  • lxd/db: Rename ContainerNextSnapshot to GetNextInstanceSnapshotIndex
  • lxd/db: Rename InstancePool to GetInstancePool
  • lxd/db: Rename ContainerBackupID to getInstanceBackupID
  • Rename ContainerGetBackup to GetInstanceBackup
  • lxd/db: Rename InstanceCreateBackup to CreateInstanceBackup
  • lxd/db: Rename InstanceBackupRemove to DeleteInstanceBackup
  • lxd/db: ContainerBackupRename to RenameInstanceBackup
  • lxd/db: Rename ContainerBackupsGetExpired to GetExpiredInstanceBackups
  • lxd/storage/drivers/utils: Updates roundVolumeBlockFileSizeBytes and ensureVolumeBlockFile to take size as bytes
  • lxd/storage/drivers/generic/vfs: Updates genericVFSResizeBlockFile to accept size as bytes
  • lxd/storage/drivers/driver/btrfs/utils: Adds volumeSize function
  • lxd/storage/drivers/driver/btrfs/volumes: Updates CreateVolume to use volumeSize()
  • lxd/storage/drivers/driver/btrfs/volumes: Updates SetVolumeQuota to be byte oriented internally
  • lxd/storage/drivers/driver/ceph/utils: Updates volumeSize comment for consistency
  • lxd/storage/drivers/driver/ceph/volumes: Updates CreateVolumeFromCopy to use volumeSize()
  • lxd/storage/drivers/driver/ceph/volumes: Updates SetVolumeQuota to be byte oriented internally
  • lxd/storage/drivers/driver/dir/utils: Adds volumeSize function
  • lxd/storage/drivers/driver/dir/volumes: Updates CreateVolume to use volumeSize
  • lxd/storage/drivers/driver/dir/volumes: Updates SetVolumeQuota to be byte oriented internally
  • lxd/storage/drivers/driver/lvm/utils: Updates copyThinpoolVolume to use volumeSize()
  • lxd/storage/drivers/driver/lvm/volumes: Updates SetVolumeQuota variables and comments
  • lxd/storage/drivers/driver/zfs/utils: Adds volumeSize function
  • lxd/storage/drivers/driver/zfs/volumes: Updates CreateVolume to use volumeSize()
  • lxd/storage/drivers/driver/zfs/volumes: Updates CreateVolumeFromCopy to use volumeSize()
  • lxd/storage/drivers/driver/zfs/volumes: Updates SetVolumeQuota to be byte oriented internally
  • lxd/db: Rename DevicesAdd to AddDevicesToEntity
  • lxd/storage/backend/lxd: Detect cached image filesystem changes for VM images too
  • lxd/db: Remove unused Devices
  • lxd/db: Rename ImagesGetLocal to GetLocalImages
  • lxd/db: Rename ImagesGet to GetImages
  • lxd/db: Rename ImagesGetExpired to GetExpiredImages
  • lxd/db: Rename ImageSourceInsert to CreateImageSource
  • lxd/db: Rename ImageSourceGet to GetImageSource
  • lxd/db: Rename ImageGetFromAnyProject to GetImageFromAnyProject
  • lxd/db: Rename ImageLocate to LocateImage
  • lxd/db: Rename ImageDelete to DeleteImage
  • lxd/db: Rename ImageAliasesGet GetImageAliases
  • lxd/db: Rename ImageAliasGet to GetImageAlaias
  • lxd/db: Rename ImageAliasRename to RenameImageAlias
  • lxd/db: Rename ImageAliasDelete to DeleteImageAlias
  • lxd/db: Rename ImageAliasesMove to MoveImageAlias
  • lxd/db: Rename ImageAliasAdd to CreateImageAlias
  • lxd/db: Rename ImageAliasUpdate to UpdateImageAlias
  • lxd/db: Rename ImageCopyDefaultProfiles to CopyDefaultImageProfiles
  • lxd/db: Rename ImageLastAccessUpdate to UpdateImageLastUseDate
  • lxd/db: Rename ImageLastAccessInit to InitImageLastUseDate
  • lxd/db: Rename ImageUpdate to UpdateImage
  • lxd/db: Rename ImageInsert to CreateImage
  • lxd/db: Rename ImageGetPools to GetPoolsWithImage
  • lxd/db: Rename ImageGetPoolNamesFromIDs to GetPoolNamesFromIDs
  • lxd/db: Rename ImageUploadedAt to UpdateImageUploadDate
  • lxd/db: Rename ImagesGetOnCurrentNode to GetImagesOnLocalNode
  • lxd/db: Rename ImagesGetByNodeID to GetImagesOnNode
  • lxd/db: Replace ImageGetNodesWithImage with GetNodesWithImage
  • lxd/db: Rename ImageGetNodesWithoutImage to GetNodesWithoutImage
  • lxc/image: Actually refresh multiple images
  • lxd/resources: Use permanent MAC when available
  • lxd/qemu: Restrict NUMA layout to x86_64
  • Consider all nodes when looking for the leader, not only voters
  • Only attempt to transfer leadership if we are not standalone
  • lxd/db: Rename NetworksNodeConfig to GetNetworksLocalConfig
  • lxd/db: Rename NetworkIDsNotPending to GetNonPendingNetworkIDs
  • lxd/db: Rename NetworkID to GetNetworkID
  • lxd/db: Rename NetworkConfigAdd to CreateNetworkConfig
  • lxd/db: Rename Networks to GetNetworks
  • lxd/db: Rename NetworksNotPending to GetNonPendingNetworks
  • lxd/db: Rename NetworksNotPending to GetNonNetworks
  • lxd/db: Rename NetworkGetInterface to GetNetworkWithInterface
  • lxd/db: Rename NetworkConfig to getNetworkConfig
  • lxd/db: Rename NetworkCreate to CreateNetwork
  • lxd/db: Rename NetworkUpdate to UpdateNetwork
  • lxd/db: Rename NetworkConfigClear to clearNetworkConfig
  • lxd/db: Rename NetworkDelete to DeleteNetwork
  • lxd/db: Rename NetworkRename to RenameNetwork
  • lxd/db: Rename NetworkNodeConfigKeys to NodeSpecificNetworkNodeConfig
  • lxd/db: Rename ImageGet to GetImage
  • lxd/db: Rename ImageAssociateNode to AddImageToLocalNode
  • lxd/daemon: Detect nodev and improve errors
  • lxd/db: Rename NodeByAddress to GetNodeByAddress
  • lxd/db: Rename NodePendingByAddress to GetPendingNodeByAddress
  • lxd/db: Rename NodeByName to GetNodeByName
  • lxd/db: Rename NodeName to GetLocalNodeName
  • lxd/db: Rename NodeAddress to GetLocalNodeAddress
  • lxd/db: Rename Nodes to GetNodes
  • lxd/db: Rename NodesCount to GetNodesCount
  • lxd/db: Rename NodeRename to RenameNode
  • lxd/db: Rename NodeAdd to CreateNode
  • lxd/db: Rename NodeAddWithArch to CreateNodeWithArch
  • lxd/db: Rename NodePending to SetNodePendingFlag
  • lxd/db: Rename NodeUpdate to UpdateNode
  • lxd/db: Rename NodeAddRole to CreateNodeRole
  • lxd/db: Rename NodeRemoveRole to RemoveNodeRole
  • lxd/db: Rename NodeUpdateRoles to UpdateNodeRoles
  • lxd/db: Rename NodeRemove to RemoveNode
  • lxd/db: Rename NodeHeartbeat to SetNodeHeartbeat
  • lxd/db: Rename NodeOfflineThreshold to GetNodeOfflineThreshold
  • lxd/db: Rename NodeClear to ClearNode
  • lxd/db: Rename NodeWithLeastContainers to GetNodeWithLeastInstances
  • lxd/db: Rename NodeUpdateVersion to SetNodeVersion
  • lxd/db: Rename Operations to GetLocalOperations
  • lxd/db: Rename OperationsUUIDs to GetLocalOperationsUUIDs
  • lxd/db: Rename OperationNodes to GetNodesWithRunningOperations
  • lxd/db: Rename OperationByUUID to GetOperationByUUID
  • lxd/db: Rename OperationAdd to CreateOperation
  • lxd/db: Rename OperationRemove to RemoveOperation
  • lxd/db: Rename OperationFlush to removeNodeOperations
  • lxd/db: Rename Patches to GetAppliedPatches
  • lxd/db: Rename PatchesMarkApplied to MarkPatchAsApplied
  • lxd/db: Rename Profiles to GetProfileNames
  • lxd/db: Rename ProfileGet to GetProfile
  • lxd/db: Rename ProfilesGet to GetProfiles
  • lxd/db: Drop ProfileConfig
  • lxd/db: Rename ProfileDescriptionUpdate to UpdateProfileDescription
  • lxd/db: Rename ProfileConfigClear to ClearProfileConfig
  • lxd/db: Rename ProfileConfigAdd to CreateProfileConfig
  • lxd/db: Rename ProfileContainersGet to GetInstancesWithProfile
  • lxd/db: Rename ProfileCleanupLeftover to RemoveUnreferencedProfiles
  • lxd/db: Rename ProfilesExpandConfig to ExpandInstanceConfig
  • lxd/db: Rename ProfilesExpandDevices to ExpandInstanceDevices
  • lxd/storage/drivers/generic/vfs: Dont require access to block device when excluding root image file from rsync in genericVFSMigrateVolume
  • lxd/storage/drivers/driver/zfs/volumes: Updates MigrateVolume to avoid need to premount snapshot volume
  • test/suites/storage/volume/attach: Adds test for custom volume root perm persistence
  • lxd/storage/drivers: Fixes custom volume root mount perm issue for BTRFS and DIR
  • lxc/storage/drivers/volume: Removes keepDevice from Volume
  • lxd/storage/drivers/driver/ceph/volumes: Removes keepDevice usage
  • lxc/storage/drivers/driver/ceph/volumes: Mount changes
  • lxd/storage/drivers/driver/ceph/volumes: UnmountVolume modifications
  • lxd/storage/drivers/driver/ceph/volumes: Esnure permission on volume root set in CreateVolume
  • lxd/resources: Skip NVME multipath entries
  • lxd/db: Rename ProjectNames to GetProjectNames
  • lxd/db: Rename ProjectMap to GetProjectIDsToNames
  • lxd/db: Rename ProjectUpdate to UpdateProject
  • lxd/db: Rename ProjectLaunchWithoutImages to InitProjectWithoutImages
  • lxd/db: Rename RaftNodes to GetRaftNodes
  • lxd/db: Rename RaftNodeAddresses to GetRaftNodeAddresses
  • lxd/db: Rename RaftNodeAddress to GetRaftNodeAddress
  • lxd/db: Rename RaftNodeFirst to CreateFirstRaftNode
  • lxd/db: Rename RaftNodeAdd to CreateRaftNode
  • lxd/db: Rename RaftNodeDelete to RemoveRaftNode
  • lxd/db: Rename RaftNodesReplace to ReplaceRaftNodes
  • lxd/db: Rename InstanceSnapshotConfigUpdate to UpdateInstanceSnapshotConfig
  • lxd/db: Rename InstanceSnapshotID to GetInstanceSnapshotID
  • lxd/db: Rename StoragePoolsNodeConfig to GetStoragePoolsLocalConfig
  • lxd/db: Rename StoragePoolID to GetStoragePoolID
  • lxd/db: Rename StoragePoolDriver to GetStoragePoolDriver
  • lxd/db: Rename StoragePoolIDsNotPending to GetNonPendingStoragePoolsNamesToIDs
  • lxd/db: Rename StoragePoolNodeJoin to UpdateStoragePoolAfterNodeJoin
  • lxd/db: Rename StoragePoolConfigAdd to CreateStoragePoolConfig
  • lxd/db: Rename StoragePoolNodeConfigs to GetStoragePoolNodeConfigs
  • lxd/db: Rename StoragePools to GetStoragePoolNames
  • lxd/db: Rename StoragePoolsNotPending to GetNonPendingStoragePoolNames
  • lxd/db: Rename StoragePoolsGetDrivers to GetStoragePoolDrivers
  • lxd/db: Rename StoragePoolGetID to GetStoragePoolID
  • lxd/db: Rename StoragePoolGet to GetStoragePool
  • lxd/db: Rename StoragePoolConfigGet to getStoragePoolConfig
  • lxd/db: Rename StoragePoolCreate to CreateStoragePool
  • lxd/db: Rename StoragePoolUpdate to UpdateStoragePool
  • lxd/db: Rename StoragePoolConfigClear to clearStoragePoolConfig
  • lxd/db: Rename StoragePoolDelete to RemoveStoragePool
  • lxd/db: Rename StoragePoolVolumesGetNames to GetStoragePoolVolumesNames
  • lxd/db: Rename StoragePoolVolumesGetAllByType to GetStoragePoolVolumesWithType
  • lxd/db: Rename StoragePoolVolumesGet to GetStoragePoolVolumes
  • lxd/db: Rename StoragePoolNodeVolumesGet to GetLocalStoragePoolVolumes
  • lxd/db: Rename StoragePoolVolumeSnapshotsGetType to GetLocalStoragePoolVolumeSnapshotsWithType
  • lxd/db: Rename StoragePoolNodeVolumesGetType to GetLocalStoragePoolVolumesWithType
  • lxd/db: Rename StoragePoolNodeVolumeGetTypeByProject to GetLocalStoragePoolVolume
  • lxd/db: Rename StoragePoolVolumeUpdateByProject to UpdateStoragePoolVolume
  • lxd/db: Rename StoragePoolVolumeDelete to RemoveStoragePoolVolume
  • lxd/db: Rename StoragePoolVolumeRename to RenameStoragePoolVolume
  • lxd/db: Rename StoragePoolVolumeCreate to CreateStoragePoolVolume
  • lxd/db: Rename StoragePoolNodeVolumeGetTypeIDByProject to GetStoragePoolNodeVolumeID
  • lxd/db: Rename StoragePoolInsertZfsDriver to FillMissingStoragePoolDriver
  • lxd/storage/zfs: Use TryUnmount
  • ethtool: add ethtoolGset() helper
  • Support two-phase creation of a storage pool on single-node cluster
  • lxd/storage/drivers/driver/btrfs/utils: Adds setSubvolumeReadonlyProperty function
  • lxd/storag/drivers/driver/btrfs/volumes: Removes readonly argument from snapshotSubvolume
  • lxd/storage/drivers/driver/btrfs: d.setSubvolumeReadonlyProperty and d.snapshotSubvolume usage
  • lxd/db: Rename StoragePoolVolumeGetType to GetStoragePoolVolume
  • lxd/db: Rename StoragePoolVolumeSnapshotCreate to CreateStorageVolumeSnapshot
  • lxd/db: Rename StoragePoolVolumeSnapshotUpdateByProject to UpdateStoragePoolVolumeSnapshot
  • lxd/db: Rename StorageVolumeSnapshotExpiryGet to GetStorageVolumeSnapshotExpiry
  • lxd/db: Rename StorageVolumeSnapshotsGetExpired to GetExpiredStorageVolumeSnapshots
  • resources/ethtool: implement ETHTOOL_GLINKSETTINGS
  • lxd/storage/drivers/driver/btrfs/utils: Adds getSubvolumesMetaData function
  • lxd/storage/drivers/driver/btrfs/volumes: Maintain subvolume readonly state in snapshot
  • lxd/storage/driversr/driver/btrfs/utils: Allow ro subvolumes to be deleted in deleteSubvolume
  • lxd/storag/drivers/driver/btrfs/volumes: Updates MigrateVolume to send subvolumes
  • lxd/storage/drivers/driver/btrfs/volumes: Fail backup when cleanup fails in BackupVolume
  • lxd/storage/drivers/driver/btrfs/volumes: Better naming of variables in unpackVolume
  • lxd/migration/migrate/proto: Adds BTRFS Features to offer header
  • lxd/migration/utils: Adds GetBtrfsFeaturesSlice function
  • lxd/migration/migration/volumes: Adds BTRFS feature support to TypesToHeader
  • lxd/migration/migration/volumes: Adds BTRFS feature support to MatchTypes
  • lxd/storage/drivers/driver/btrfs: Adds BTRFS features to MigrationTypes
  • lxd/storage/memorypipe: Dont make ioutil.ReadAll panic on cancel
  • lxd/storage/drivers/driver/btrfs/utils: Kill btrfs send on error in sendSubvolume
  • lxd/storage/drivers/driver/btrfs/utils: Support subvolumes in receiveSubvolume
  • lxd/storage/drivers/driver/btrfs/utils: Adds metadataHeader function
  • lxd/storage/drivers/driver/btrfs/volumes: Updates CreateVolumeFromMigration to receive subvolumes
  • lxd/db: Rename StorageVolumeNodeAddresses to GetStorageVolumeNodeAddresses
  • lxd/db: Rename StorageVolumeDescriptionGet to GetStorageVolumeDescription
  • lxd/db: Rename StorageVolumeNextSnapshot to GetNextStorageVolumeSnapshotIndex
  • lxd/db: Rename StorageVolumeCleanupImages to RemoveStorageVolumeImages
  • lxd/db: Rename StorageVolumeMoveToLVMThinPoolNameKey to UpgradeStorageVolumConfigToLVMThinPoolNameKey
  • lxd/db: Update naming pattern for generated database code
  • client/lxd_images: Fix backward compatibility
  • lxd/storage/btrfs: Fix migration from snapshot
  • shared/generate/db: Fix generation of Exists method
  • lxd/db: Make generated code stable across "make update-schema" runs
  • lxd/db: Leverage code-generation for certificates
  • shared: Rewrite OpenPty without cgo
  • openpty: use O_CLOEXEC directly
  • openpty: use fchown()
  • openpty: first unlock the master, then get a slave fd
  • openpty: use TIOCGPTPEER if available
  • lxd/storage/drivers/driver/lvm/utils: Adds lvmSnapshotSeparator constant and updates lvmFullVolumeName to use it
  • lxd/storage/drivers/driver/lvm/utils: Adds lvmEscapedHyphen and updates lvmFullVolumeName usage
  • lxd/storage/drivers/driver/lvm/utils: Adds parseLogicalVolumeSnapshot function
  • lxd/storage/drivers/driver/lvm/utils: Adds tests for parseLogicalVolumeSnapshot
  • lxd/storage/drivers/driver/lvm/volumes: Updates VolumeSnapshots to use parseLogicalVolumeSnapshot
  • test: Adds tests for snapshot naming conflicts
  • lxd/firewall/drivers: Fix nft syntax
  • lxc/project: Fix remote handling
  • tests: Fix bad project switch call
  • lxd/seccomp: Fix profile conflict between projects
  • lxd/storage/drivers/driver/lvm/utils: Adds activateVolume and deactivateVolume functions
  • lxd/storage/drivers/driver/lvm/utils: Set --setactivationskip on in createLogicalVolume
  • lxd/storage/drivers/driver/lvm/utils: Set --setactivationskip on in createLogicalVolumeSnapshot
  • lxd/storage/drivers/driver/lvm/utils: Activate volume in copyThinpoolVolume when regeneration FS UUID
  • lxd/storage/drivers/driver/lvm: Dont activate all volumes on pool mount
  • lxd/storage/drivers/driver/lvm/volumes: Activate volume before generic copy in CreateVolumeFromCopy
  • lxd/storage/drivers/driver/lvm/volumes: Activate volume in SetVolumeQuota
  • lxd/storage/drivers/driver/lvm/volumes: Activate volume in MountVolume
  • lxd/storage/drivers/driver/lvm/volumes: Deactivate volume in UnmountVolume
  • lxd/storage/drivers/driver/lvm/volumes: Acticate volume before generic migrate in MigrateVolume
  • lxd/storage/drivers/driver/lvm/volumes: Activate volume in MountVolumeSnapshot
  • lxd/storage/drivers/driver/lvm/volumes: Deactivate volume in UnmountVolumeSnapshot
  • lxd/storage/drivers/driver/lvm/volumes: Activate volume before FS UUID regen in RestoreVolume
  • openpty: fix TIOCGPTPEER usage
  • Make network address bind error fatal when clustered
  • lxd/storage/drivers/driver/btrfs/utils: Renames metadatHeader to restorationHeader
  • lxd/storage/drivers/driver/btrfs/volumes: d.restorationHeader usage
  • lxd/storage/drivers/driver/btrfs/volumes: Clarifies comments in MigrateVolume
  • lxd/storage/drivers/driver/btrfs/volumes: Adds safety net against failed matching of subvolumes
  • lxd/storage/drivers/driver/btrfs/utils: Fix deleteSubvolume to support recursive delete with intermediate ro subvols
  • lxd/storage/drivers/utils: Mark BTRFSSubVolumeMakeRo and BTRFSSubVolumeMakeRw deprecated
  • lxd/storage/drivers/driver/btrfs/volumes: Updates RestoreVolume to restore subvolume ro property
  • test: Adds BTRFS subvolume tests
  • lxd/storage/memorypipe: Fixes issue with partial reads losing data
  • lxd/storage/drivers/driver/btrfs/volumes: Restores subvolumes ro property in CreateVolumeFromCopy
  • lxd/storage/drivers/driver/btrfs/utils: Adds marshal tags to BTRFSSubVolume and BTRFSMetaDataHeader
  • lxd/device/nic/bridged: Updates github.com/mdlayher/netx/eui64
  • fix IPVLAN docs
  • lxd/cluster: Don't run a connection proxy when connecting with the Go dqlite client
  • lxd/cluster: Extract dqlite network proxy logic to standalone function and support cancellation
  • lxd/cluster: Use dqliteProxy in raftDial
  • lxd/cluster: Use ReadClose() to gracefully stop the dqlite proxy
  • lxd/device/device/utils/generic: Removes deviceNameEncode and deviceNameDecode
  • lxd/storage/drivers/utils: Adds PathNameEncode and PathNameDecode
  • lxd/device/device: PathNameEncode and PathNameDecode usage
  • lxd/storage/drivers/driver/types: Adds OptimizedBackupHeader field to Info
  • lxd/backup/backup: Adds OptimizedHeader field to Info struct
  • lxd/backup: Updates backupWriteIndex to populate the OptimizedHeader field
  • lxd/storage/drivers/driver/btrfs: Sets OptimizedBackupHeader to true in Info struct response
  • lxd/storage/drivers/driver/btrfs/utils: Adds warning to BTRFSSubVolume and BTRFSMetaDataHeader about shared usage
  • lxd/storage/drivers/driver/btrfs/volumes: Updates BackupVolume to add subvolumes to optimized backup file
  • lxd/storage/drivers/interface: Update CreateVolumeFromBackup to pass srcBackup backup.Info
  • lxd/storage/backend/lxd: Pass srcBackup in CreateInstanceFromBackup
  • lxd/storage/drivers: CreateVolumeFromBackup srcBackup backup.Info usage
  • lxd/backup/backup: Updates GetInfo to set optimizedHeaderFalse false if not present in yaml file
  • lxd/storage/drivers/driver/btrfs/utils: Adds loadOptimizedBackupHeader
  • lxd/storage/drivers/driver/btrfs/volumes: Updates CreateVolumeFromBackup to restore subvolumes using optimized header file
  • lxd/storage/drivers/driver/btrfs/volumes: Simplifies parent volume logic in BackupVolume
  • lxd/storage/drivers/driver/btrfs/volumes: Simplifies parent volume logic for MigrateVolume
  • test: Adds BTRFS backup subvolume tests
  • lxd/storage/drivers/driver/btrfs/utils: Removes receiveSubvolume
  • lxd/storage/drivers/driver/btrfs/utils: Adds receiveSubVolume function
  • lxd/storage/drivers/driver/btrfs/volumes: Updates CreateVolumeFromMigration to use receiveSubVolume
  • lxd/resources/memory: Fix memory calculation
  • lxd: Improve logging of shutdown errors
  • lxd/instances/post: Delete restored instance on backup post hook failure
  • Fix 'how to mount home directory' shiftfs FAQ
  • shared: build fs_{32,64}bit.go on mips*
  • lxd/util: build fs_{32,64}bit.go on mips*
  • lxd/rsync: Adds optional rsync arguments to LocalCopy
  • lxd/storage/utils: Fixes ImageUnpack to not erase generated rootfs block file when doing rsync
  • ethtool: don't report -1 for speed in ethtoolLink()
  • lxd/storage/quota/projectquota: Fixes leaking file handles in quota_set_path and quota_get_path
  • lxd/storage/quota/projectquota: Adds inherit argument to quota_set_path
  • lxd/storage/quota/projectquota: Updates SetProject to recursively set project and support non-directory files
  • lxd/storage/drivers/driver/dir/utils: Updates deleteQuota to use DeleteProject
  • lxd/storage/drivers/driver/dir/volumes: Adds quota revert in CreateVolumeFromBackup post hook
  • Always skip offline servers when rebalancing
  • When demoting a voter to spare, transition to stand-by first
  • test/clustering: Make sure that a killed voter can't dsirupt current leader
  • lxd/cluster: Use a dedicated channel to stop the dqlite proxy
  • lxd: Call Deamon.Kill() also when receiving signals (so db transactions won't be retried)
  • lxd/db: Add Cluster.Kill() method to prevent retrying upon shutdown
  • lxd/firewall/drivers/driver/nftables/templates: Fixes proxy nat rule dynamic family
  • shared/util_linux.go: cast Rdev uint64 for mips
  • lxd/storage/quota/projectquota.go: cast Rdev uint64 for mips
  • lxd/device/device_utils_unix.go: cast Rdev uint64 for mips
  • lxd/device/gpu.go: cast Rdev uint64 for mips
  • shared: Reimplement GetPollRevents without cgo
  • lxd-agent: Build statically
  • Drop gccgo
  • lxd-p2c: Drop cgo
  • shared/ucred: Cleanup package
  • lxd/api: Don't strip double slashes
  • lxd/operations: Improve error message when database insertion fails
  • lxd/db: Change UpdateCertificate to RenameCertificate (only renaming supported)
  • lxd/db: Rename containers.go to instances.go
  • shared/generate/db: Statement for deleting references (config and devices)
  • lxd/db: Generate delete stements for profile config and devices
  • shared/generate/db: update statement: take ID instead of natural key
  • shared/generate/db: Handle config and devices in Update method
  • lxd/db: Generate Update method for profiles
  • lxd: Plug new UpdateProfile() db method into doProfileUpdate
  • lxd: Plug new UpdateProfile() db method into updatePoolPropertyForAllObjects
  • lxd/db: Generate delete statements for instance config, devices and profiles
  • lxd/db: Generate UpdateInstance method
  • lxd/instance: Plug the new UpdateInstance method and replace legacy logic
  • lxd/db: Drop AddDevicesToEntity
  • lxd/storage/drivers/driver/common: Logging quoting consistency
  • lxd/storage/drivers: Adds storage_lvm_skipactivation patch
  • test: Drive-by fix for flaky clustering rebalance test
  • Recommend to increase the value of aio-max-nr for production use
  • lxd/firewall/firewall/interface: Change definition of Compat() to return compat issue error
  • lxd/firewall/drivers/driver/nftables: Updates Compat() to return compat issues as error
  • lxd/firewall/drivers/drivers/xtables: Updates Compat() to return compat issues as error
  • shared/simplestreams: Support uefi1.img
  • lxd/firewall/firewall/load: Updates driver detection to warn when falling back to non-compatible xtables
  • lxd/storage/pools: Improves delete pool error info
  • instance_exec: don't panic
  • lxd/qemu: Handle quoted raw.qemu
  • lxd/main_forkproxy: Reduce logging
  • lxd/networks: Warn on small IPv6 subnets
  • lxd/network: Force DHCP custom gateway
  • lxc/list: Add disk and memory columns
  • i18n: Update translation template
  • lxd/storage/drivers: Make sure tar reader context is cancelled before defer
  • lxc/list: Fix test
  • shared/archive: Wraps cancelFunc to wait until unpacker process has finished in CompressedTarReader
  • lxd/cluster: Transfer leadership before adjusting roles, not after
  • lxd/cluster: Add time skew detection
  • test: Wait a few more seconds for the rebalance to happen
  • lxd/daemon.go: Don't try to rebalance after shutdown sequence has started
  • lxd/cluster: Don't try to rebalance a standalone node
  • lxc/ucred: Simplify logic
  • lxd/qemu: Cleanup arch checks
  • lxd/qemu: Add s390x support
  • lxd/api: Fail /internal/ready requests made after shutdown has started
  • lxc/config: Add -e shorthand
  • forkfile: port to using pidfds
  • forkmount: port to using pidfds
  • forkproxy: port to using pidfds
  • syscall_numbers: update
  • forknet: port to pidfds
  • forkuevent: port to pidfds
  • forksyscall: port to pidfds
  • daemon: record "pidfd" extension
  • lxd/storage/lvm: Correct bad VG name in patch
  • shared/subprocess: Better handle slow systems
  • tests: Don't assume bridge MTU can be forced up
  • fork*: add "--" to not misinterpret negative integers as flags
  • lxd/storage/utils: Removes unused name arg from VolumeFillDefault
  • lxd/instance/drivers: storagePools.VolumeFillDefault usage
  • lxd/patches: driver.VolumeFillDefault usage
  • lxd/storage/utils: VolumeFillDefault usage
  • lxd/storage/utils: Updates VolumeValidateConfig to require volume type
  • lxd/storage/utils: Adds VolumeDBTypeToType function
  • lxd/storage/utils: Updates VolumeDBCreate to pass volume type
  • lxd/storage/drivers/utils: Updates ensureVolumeBlockFile to reject unsafe volume shrinking
  • lxd/storage/drivers/geneirc/vfs: Removes genericVFSResizeBlockFile
  • lxd/storage/drivers: ensureVolumeBlockFile usage
  • lxd/storage/drivers/volume: Adds SetQuota function
  • lxd/storage/drivers/volume: Adds config functions
  • lxd/storage/drivers/driver/lvm/utils: Removes functions moved into Volume struct
  • lxd/storage/drivers/driver/lvm/utils: Usage of volume config functions
  • lxd/storage/drivers/driver/lvm/volumes: Volume config function usage
  • lxd/storage/drivers: Replace volumeSize() with vol.ConfigSize()
  • forknet: add missing "--" to forknet invocation on detach
  • process_utils: remove a bunch of unused functions
  • lxd: Make use of ExitCode
  • share/subprocess: Reduce sleep back to 5
  • lxd/instances/lxc: Fix calls to forknet
  • forkmount: prevent interpreting negative numbers as flags
  • shared/subprocess: Ensure monitor routine exits
  • shared/subprocess: Properly reset state
  • tests: Fix btrfs test on non-shiftfs
  • tests: Old kernels don't let you rmdir btrfs
  • lxd/db: Use query.SelectString helper in GetLocalImages()
  • lxd/db: Use query.SelectString helper in GetImagesFingerprints()
  • shared/generate/db: Support int64 fields
  • lxd/db: Initial code generation for images (without references)
  • lxd/db: Use the generated GetImages code to implement GetExpiredImages
  • lxd/db: Use query.SelectObjects helper in GetImageSource
  • lxd/db: Use query.SelectStrings helper in ImageSourceGetCachedFingerprint
  • lxd/db: Use query.Count helper in ImageExists
  • lxd/db: Use query.Count helper in ImageIsReferencedByOtherProjects
  • lxd/db: Use query.UpsertObject helper in CreateImageSource
  • lxd/cluster: Drive-by fix for flaky rebalance test
  • lxd/db: Usage query.DeleteObject to implement DeleteImage
  • lxd/db: Use query.SelectStrings to implement GetImageAliases
  • lxd/db: Use a single transaction in GetImageAlias
  • lxd/db: Use a single transaction in DeleteImageAlias
  • lxd/db: Use single transaction in CreateImageAlias
  • lxd/db: Usage single transaction in CreateImage
  • lxd/db: Use query.SelectIntegers helper in GetPoolsWithImage
  • lxd/db: Use a single transaction in GetPoolNamesFromIDs
  • lxd/db: Use explicit transaction in GetInstanceProjectAndName
  • lxd/db: Drop unused DeleteInstanceConfig
  • shared/subprocess: Fix Stop handling
  • lxd/storage/utils: Updates ImageUnpack to detect too small volume for qcow2 image and increase size before unpack
  • lxd/storage/utils: Adds checks to ImageUnpack before enlarging volume
  • lxd/storage/drivers/driver/types: Updates VolumeFiller Fill function to take a Volume
  • lxd/storage: Updates volume filler usage to supply Volume rather than mount path
  • lxd/storage/drivers/volume: Adds ConfigSizeFromSource function
  • lxd/storage/drivers/driver/lvm/utils: Updates copyThinpoolVolume to only use vol.config["size"] for resizing
  • lxd/storage/drivers/driver/lvm/utils: Updates Volume type in createLogicalVolumeSnapshot definition
  • lxd/storage/drivers/driver/common: Adds runFiller function
  • lxd/storage/backend/lxd: Updates imageFiller to return volume size
  • lxd/storage/backend/lxd: Updates CreateInstanceFromImage to load image vol DB record
  • lxd/storage/backend/lxd: Updates EnsureImage to record volatile.rootfs.size for block images
  • lxd/storage/drivers/driver/types: Updates VolumeFiller definition to store size
  • lxd/storage/utils: Validates volatile.rootfs.size key for image volumes in validateVolumeCommonRules
  • lxd/storage/utils: Updates ImageUnpack to return image virtual size
  • lxd/storage/drivers/driver/btrfs/volumes: d.runFiller usage
  • lxd/storage/drivers/driver/ceph/volumes: d.runFiller usage
  • lxd/storage/drivers/driver/cephfs/volumes: d.runFiller usage
  • lxd/storage/drivers/driver/dir/volumes: d.runFiller usage
  • lxd/storage/drivers/driver/lvm/volumes: d.runFiller usage
  • lxd/storage/drivers/driver/zfs/volumes: d.runFiller usage
  • lxd/storage/drivers/volume: Adds SetConfigSize function
  • lxd/storage/backend/lxd: Updates CreateInstanceFromImage to use vol.ConfigSizeFromSource to dervice volume size
  • lxd/storage/drivers: Updates CreateVolumeFromCopy to only use vol.config["size"] for resizing
  • lxd: Reduce number of transactions in containerPostClusteringMigrate
  • lxd/db: Use query.SelectStrings helper in LegacyContainersList
  • lxd/db: Rename dbDeviceTypeToString to deviceTypeToString
  • lxd/storage/drivers/utils: ensureVolumeBlockFile comment clarification
  • lxd/storage/drivers/utils: Renames BlockDevSizeBytes to BlockDiskSizeBytes
  • lxd/storage/utils: drivers.BlockDiskSizeBytes usage
  • lxd/storage/utils: Simplifies InstanceDiskBlockSize with drivers.BlockDiskSizeBytes usage
  • lxd/storage/drivers/generic/vfs: Simplifies genericVFSBackupVolume with drivers.BlockDiskSizeBytes usage
  • lxd/storage/backend/lxd: Whitespace in CreateInstanceFromBackup
  • lxd/storage/drivers/driver/ceph/volumes: BlockDiskSizeBytes usage in SetQuota
  • lxd/storage/drivers: Updates dir and btrfs to support filler volume enlargement
  • lxd/db: Group ClusterTx instance methods together
  • lxd/db: Rename AddProfilesToInstance to addProfilesToInstance
  • lxd/db: Move instance backup methods to backups.go
  • lxd/db: Rename InstanceBackupArgs to InstanceBackup
  • lxd/db: Remove unused profile functions
  • lxd/db: Move storage volumes methods to storage_volumes.go
  • lxd/storage/drivers/volume/test: Adds tests for Volume.ConfigSizeFromSource()
  • forkuevent: fix slice allocation
  • unix-hotplug: fix uevent injection
  • lxd/db: Use auto-generated GetImages() to implement GetImage()
  • lxd/db: Use auto-generated GetImages to implement GetImageFromAnyProject
  • lxd/db: Group ClusterTx image methods together
  • lxd/db: Rename ImageSourceGetCachedFingerprint to GetCachedImageSourceFingerprint
  • lxd/images: Set CreatedAt on publish
  • lxd: New command line option to trace SQL statements
  • lxd/firewall/drivers/drivers/xtables: Updates iptablesInUse to kill process once first rule found
  • lxd/backup: Fixes hang in backupCreate when invalid compression argument supplied
  • lxd/storage/utils: Removes duplicated qemu-img call in ImageUnpack
  • lxd/storage/utils: Switch to qemu-img dd mode in ImageUnpack
  • lxd/storage/drivers/utils: Exports MinBlockBoundary
  • lxd/storage/drivers: MinBlockBoundary usage
  • lxd/resources: Handle missing cache size/type
  • Update documentation with backup compression
  • lxd/rbac: New notification API
  • lxd/firewall/nft: Enhance support detection
  • Fix regression in GetImageFromAnyProject
  • doc/security: Adds notes about IPv6 router advertisement security
  • lxd/device/nic: Changes nicValidationRules to properly validation vlan
  • lxd/device/nic/bridged: Adds revert for veth pair cleanup on error
  • lxd/firewall/drivers/drivers/xtables: Drops tagged vlan frames when using IP filtering
  • lxd/firewall/drivers/drivers/nftables: Drops tagged vlan frames when using IP filtering
  • lxd/network/network/utils: Improve comments on ovs switch attach/detach
  • lxd/network/network/utils: Improves arg name in network attach/detach functions
  • lxd/device/bic/bridged: Fixes openvswitch port leak when device is stopped
  • lxd/network/utils: Adds IsNativeBridge function
  • lxd/maas: Fix support for multiple subnets
  • lxd/maas: Support projects
  • lxd/dnsmasq: Add project suffix
  • Remove incorrect statement about supported network devices with virtual machines According documentation supported types with virtual machines are physical, bridged, macvlan, p2p, sriov
  • lxd/rbac: Fix auth for non-RBAC trusted clients
  • global: Add riscv64 to build tags
  • Stop using Driver.SetContextTimeout() which is a no-op
  • use the coreos fork of boltdb since the original is archived/abandoned
  • lxd/device/device/utils/network: Adds networkValidVLAN and networkValidVLANList functions
  • lxd/device/device/utils/network: Allow VLAN ID 0 in networkValidVLAN
  • lxd/instance/drivers/driver/lxc: Adds debug logging to deviceStop
  • lxd/instance/drivers/driver/lxc: Adds driver revert on failed start in startCommon
  • lxd/instance/drivers/driver/qemu: Adds debug logging to deviceStop
  • lxd/instance/drivers/driver/qemu: Simplifies failed start device cleanup in Start
  • lxd/storage/drivers/driver/ceph/utils: Removes getRBDFilesystem
  • lxd/storage/drivers/driver/ceph: Replaces use of d.getRBDFilesystem with vol.ConfigBlockFilesystem
  • lxd/storage/drivers/volume: Adds ConfigBlockMountOptions function
  • lxd/storage/drivers/driver/ceph/utils: Removes getRBDMountOptions in place of vol.ConfigBlockMountOptions()
  • lxd/storage/drivers/driver/lvm/utils: Removes volumeMountOptions in place of vol.ConfigBlockMountOptions()
  • lxd/storage/drivers: Replaces driver specific mount options resolution with vol.ConfigBlockMountOptions()
  • shared/api: Extend NetworkState for bridge/bond
  • lxd/rbac: Don't close body when missing
  • doc/storage: Cover host/disk/loop setups
  • lxd/init: Tweak default loop sizing
  • lxd/vm: Rename some functions
  • client: Expand snap path in ConnectLXDUnix
  • client: Fix ConnectLXDUnix regression
  • lxd/vm: Fix PCIe slot for physical/sriov nic
  • lxd/vm: Add virtio-vga card
  • lxd/vm: Add spice channel
  • lxd/instance/drivers/driver/qemu: Integrates built in GPU device PCI range with future passthrough GPU devices
  • lxd/instance/drivers/driver/qemu/templates: Updates built in GPU device to use GPU address range prefix
  • lxd/vm: Move to separate devices
  • lxd/vm: Remove tiny wrapper functions
  • lxd/vm: Per-architecture bus type
  • add type to specify the instance type on creation Signed-off-by: Salem Yaslem s@sy.sa
  • lxd/vm: Centralize port generation
  • lxd/device: Sort nic devices ahead of others
  • lxd/device/device/utils/generic: Adds PCI management functions for overriding driver
  • lxd/device/device/utils/network: Removes network specific PCI bind/unbind functions
  • lxd/device/nic/physical: Updates to use generic PCI management functions
  • lxd/device/nic/sriov: Updates to use generic PCI management functions
  • lxd/vm: Separate template keys in global/local
  • lxd/vm: Use virtio-gpu-pci on non-x86
  • lxd/vm: Rename qemuVGA to qemuGPU
  • lxd/vm: Add virtio-input keyboard/mouse
  • lxd/vm: Move bus allocator to own file
  • lxc/volume: Fix typo in help message
  • lxc/snapshot: Allow using snapshot delimiter
  • doc/instances: Updates GPU device docs to show VM support
  • lxd/device/gpu: Updates validation for VM support
  • lxd/device/config/device/runconfig: Adds GPU field to RunConfig
  • lxd/device/device/utils/generic: pciDeviceDriverOverride only check for driver binding if specified
  • lxd/device/gpu: Adds VM GPU passthrough support
  • lxd/instance/drivers/driver/qemu/templates: Consistent naming and casing for net dev templates
  • lxd/instance/drivers/driver/qemu: Consistent net dev naming usage
  • lxd/instance/drivers/driver/qemu/templates: Adds qemuGPUDevPhysical template
  • lxd/instance/drivers/driver/qemu: Adds GPU passthrough support
  • lxd/instance/drivers/driver/qemu/bus: Adds comments, clarifies var names, and constants for defined multi-function groups
  • lxd/instance/drivers/driver/qemu: Switches to multi-function group constants and adds comments
  • lxd/instance/drivers/qmp/monitor: Allow serial char device name to be passed in
  • lxd/instance/drivers/driver/qemu: Defines qemuSerialChardevName to share with qemu and qmp
  • lxd/instance/drivers/driver/qemu: qemuSerialChardevName usage
  • lxd/instance/drivers/driver/qemu/templates: Add serial chardev name injection
  • lxd/storage/quota/projectquota: Only set quota on directories and regular files
  • lxd/db: Automatically strip ?project=default
  • lxc/action: Properly handle --all with remotes
  • lxd/projects: Properly clear empty keys
  • lxd/db: Add missing feature to default project
  • lxd/instance/drivers/driver/qemu: Pass-through GPU VGA mode status from host
  • i18n: Update translation templates
  • lxd/storage/drivers/driver/zfs/volumes: Remove snapshot when migrating as main volume
  • lxd/cluster/heartbeat: Fix race in HeartbeatNode
  • lxc/console: Split Console to own function
  • lxc/start: Allow direct console attach
  • i18n: Update translation templates
  • lxd/instance/drivers/driver/qemu: Only enable GPU vga mode on x86_64 systems
  • lxd/resources: Fix golint warning
  • doc/api-extensions: Fix escaping
  • api: resource_cpu_isolated
  • lxd/resources: Add Isolated property
  • lxd/resources: Don't use shared
  • lxd/devices: Use resources for cpuset parsing
  • lxc: Don't over-escape URLs
  • lxd: Don't over-escape URLs
  • lxd/db/storage: Rework UsedBy for pools
  • lxd/instance/drivers/driver/qemu: Adds trans=virtio to 9p mounts
  • lxc/action: Also add --console to restart
  • lxd/resources/net: More flexible PCI detection
  • lxc/query: Add path check
  • i18n: Update translation templates
  • tests: Fix bad lxc query call
  • lxd/storage-pools: Tweak UsedBy URLs
  • lxd/db: Tweak joins
  • lxd/db: Fix UsedBy on projects
  • lxd/storage_volumes: Fix UsedBy
  • api: usedby_consistency
  • lxd-agent/main/agent: Fix 9p mount when relative target path is supplied
  • test: Updates udhcpd args to ensure process quits one lease acquired
  • util_linux: update terminology
  • lxd/networks: Reports profiles in UsedBy
  • lxd: Fix snapshot index retrieval
  • lxd/backups: Use backups dir for unpack
  • lxd/vm: Add udev rule fallback
  • lxd/images: Set arch names when downloading
  • lxd: More flexible compression algorithms
  • tests: Add test for compression options
  • doc/rest-api: Rename rootfs to root
  • doc/rest-api: Fix instance PATCH example
  • lxd: Fix building with clang
  • lxd/db: Add missing criteria for querying a specific public image
  • lxd/db: Add the Errored storage state when rendering the Status field
  • lxd/cluster: If raft node 1 gets remove during recovery, add it back
  • lxd/db: Make GetNework() return an error if the network is pending
  • lxd/db: Rename NetworkCreatePending to CreatePendingNetwork
  • lxd/db: Make GetStoragePool() return an error if the pool is pending
  • lxd/db: Rename StoragePoolCreatePending to CreatePendingStoragePool
  • lxd/firewall: Filter unwanted ethernet frame types when IP filtering is enabled
  • lxd/storage/drivers: Bump VM fs size to 100MB
  • lxd/db: Fix UsedBy for profiles on storage pools
  • lxd/storage: Use Truncate to create/grow VM files
  • lxd/db: Consider personalities in GetNodeWithLeastInstances
  • lxd/db: Avoid test failure in arch matching

Try it for yourself

This new LXD release is already available for you to try on our demo service.

Downloads

The release tarballs can be found on our download page.

Binary builds are also available for:

  • Linux: snap install lxd
  • MacOS: brew install lxc
  • Windows: choco install lxc

LXD 4.2 has been released

5th of June 2020

Introduction

The LXD team is very excited to announce the release of LXD 4.2!

This release brings quite a few new features and a lot of background stability and speed improvements.

The networking improvements in this release mark the beginning of more work we've set for ourselves with the final goal of having per-project virtual networks implemented through OVN. As part of this, we've done some fixes in our existing OVS handling and added VLAN filtering and some useful config reporting to LXD.

Quite a bit of effort is also going in improving our database and clustering logic, fixing issues, improving test coverage and improving performance.

One last area of focus is security where we've now begun to reap the benefits from some upstream kernel work we've been doing for the past few months/years, using those features to avoid race conditions and speed up LXD in general.

Enjoy!

New features and highlights

VLAN filtering on bridges

Those familiar with physical network switches are no doubt used to configuring your untagged and tagged VLANs for your ports or bonds. Linux software switching allows for the exact same thing, per-port selection of your untagged VLAN and a list of tagged VLANs.

Now LXD exposes that with support for both native Linux bridging and OVS.

This is implemented through the vlan and vlan.tagged config keys on a bridged nic device. The vlan property controls the untagged VLAN while vlan.tagged is a comma separated list of tagged VLANs to let through.

Expanded network state information

The /1.0/networks/NAME/state API endpoint was expanded to show bond and bridge specific details. This makes it easier to remotely inspect a LXD host, particularly useful when in a cluster.

The bond details look like this:

stgraber@castiana:~$ lxc query /1.0/networks/bond0/state | jq .bond
{
  "down_delay": 500,
  "lower_devices": [
    "dum0",
    "dum1"
  ],
  "mii_frequency": 100,
  "mii_state": "up",
  "mode": "balance-rr",
  "transmit_policy": "layer2",
  "up_delay": 100
}

The bridge details look like this:

stgraber@castiana:~$ lxc query /1.0/networks/lxdbr0/state | jq .bridge
{
  "forward_delay": 1500,
  "id": "8000.06099e00b912",
  "stp": false,
  "upper_devices": [
    "tap1053b4fd",
    "tapef45d46d",
    "veth1651f83f",
    "veth8eb3fb1a"
  ],
  "vlan_default": 1,
  "vlan_filtering": true
}

Support for custom search domains

A new domain.search config key on networks can be used to set a comma-separate listed of search domains to advertise to the instances.

New IPv4 and IPv6 columns in network lists

The default output of lxc network list now shows the IPv4 and IPv6 subnets. This makes it quite a bit easier to recognize your networks.

stgraber@castiana:~$ lxc network list
+--------+----------+---------+----------------+---------------------------+-------------+---------+
|  NAME  |   TYPE   | MANAGED |      IPV4      |           IPV6            | DESCRIPTION | USED BY |
+--------+----------+---------+----------------+---------------------------+-------------+---------+
| bond0  | bond     | NO      |                |                           |             | 0       |
+--------+----------+---------+----------------+---------------------------+-------------+---------+
| eth0   | physical | NO      |                |                           |             | 0       |
+--------+----------+---------+----------------+---------------------------+-------------+---------+
| eth1   | physical | NO      |                |                           |             | 0       |
+--------+----------+---------+----------------+---------------------------+-------------+---------+
| lxdbr0 | bridge   | YES     | 10.166.11.1/24 | fd42:4c81:5770:1eaf::1/64 |             | 16      |
+--------+----------+---------+----------------+---------------------------+-------------+---------+
| wlan0  | physical | NO      |                |                           |             | 0       |
+--------+----------+---------+----------------+---------------------------+-------------+---------+

mips & riscv64 support for containers and s390x support for VMs

Support for various MIPS variants has been added, allowing LXD to be built and run on MIPS systems.

RISC-V 64bit support was also added and confirmed to work with containers.

ubuntu@riscv64:~$ lxc list -cns46ta
+------+---------+----------------------+-----------------------------------------------+-----------+--------------+
| NAME |  STATE  |         IPV4         |                     IPV6                      |   TYPE    | ARCHITECTURE |
+------+---------+----------------------+-----------------------------------------------+-----------+--------------+
| b1   | RUNNING | 10.108.12.160 (eth0) | fd42:5832:5781:1eaf:216:3eff:fedd:884d (eth0) | CONTAINER | riscv64      |
+------+---------+----------------------+-----------------------------------------------+-----------+--------------+

In both cases, image selection is effectively non-existent, so you're pretty much stuck with Busybox for now!

On the VM front, we've added support for s390x virtual machines.

Using pidfds for all container subprocesses

LXD frequently spawns subprocesses that are fed a PID coming from a container. This can be racy in some situations, allowing for the process to exit and the PID be recycled before we interact with it, causing us to accidentally interact with the wrong thing.

That's what @brauner's work on pidfds in the Linux kernel is meant to fix and LXD and LXC now make us of those whenever possible, passing a file descriptor to a particular process rather than passing its PID.

LVM volumes only active when needed

LVM now behaves in the same way as ZFS and CEPH by keeping LVs inactive unless the instance is running. This reduces clutter in /dev and can lead to some small performance improvements.

DB query tracing support

A new trace option has been added for debugging database queries in LXD. Starting the daemon with --debug --trace database will have all SQL queries logged.

Better cluster life-cycle handling

We've recently been expanding our automated testing for our external dqlite/raft/libco projects, fixed a number of issues found by other downstream users and moved some of LXD's logic into the upstream codebases.

LXD's clustering tests have also been expanded to test more cases of leadership changes, node restarts and handling of degraded setups.

A common source of issues with any clustered environment is time skew. You get more than a few seconds and it can wreck havoc on scheduled tasks, events and more. To help with this, LXD now uses its internal heartbeats as a way to detect time skews and will log a warning in its log whenever one is detected or resolved.

Cleaned up database functions

Still on the database front, a lot more of the database logic has been moved over to our code generator, limiting the risk of mistakes when writing that code. A number of functions have been deprecated as a result and some codepaths optimized to run within a single transation.

Complete changelog

Here is a complete list of all changes in this release:

  • shared/generate/db: Fix generation of Exists method
  • lxd/db: Make generated code stable across "make update-schema" runs
  • lxd/db: Leverage code-generation for certificates
  • shared: Rewrite OpenPty without cgo
  • openpty: use O_CLOEXEC directly
  • openpty: use fchown()
  • openpty: first unlock the master, then get a slave fd
  • openpty: use TIOCGPTPEER if available
  • lxd/storage/drivers/driver/lvm/utils: Adds lvmSnapshotSeparator constant and updates lvmFullVolumeName to use it
  • lxd/storage/drivers/driver/lvm/utils: Adds lvmEscapedHyphen and updates lvmFullVolumeName usage
  • lxd/storage/drivers/driver/lvm/utils: Adds parseLogicalVolumeSnapshot function
  • lxd/storage/drivers/driver/lvm/utils: Adds tests for parseLogicalVolumeSnapshot
  • lxd/storage/drivers/driver/lvm/volumes: Updates VolumeSnapshots to use parseLogicalVolumeSnapshot
  • test: Adds tests for snapshot naming conflicts
  • lxd/firewall/drivers: Fix nft syntax
  • lxc/project: Fix remote handling
  • tests: Fix bad project switch call
  • lxd/seccomp: Fix profile conflict between projects
  • lxd/storage/drivers/driver/lvm/utils: Adds activateVolume and deactivateVolume functions
  • lxd/storage/drivers/driver/lvm/utils: Set --setactivationskip on in createLogicalVolume
  • lxd/storage/drivers/driver/lvm/utils: Set --setactivationskip on in createLogicalVolumeSnapshot
  • lxd/storage/drivers/driver/lvm/utils: Activate volume in copyThinpoolVolume when regeneration FS UUID
  • lxd/storage/drivers/driver/lvm: Dont activate all volumes on pool mount
  • lxd/storage/drivers/driver/lvm/volumes: Activate volume before generic copy in CreateVolumeFromCopy
  • lxd/storage/drivers/driver/lvm/volumes: Activate volume in SetVolumeQuota
  • lxd/storage/drivers/driver/lvm/volumes: Activate volume in MountVolume
  • lxd/storage/drivers/driver/lvm/volumes: Deactivate volume in UnmountVolume
  • lxd/storage/drivers/driver/lvm/volumes: Acticate volume before generic migrate in MigrateVolume
  • lxd/storage/drivers/driver/lvm/volumes: Activate volume in MountVolumeSnapshot
  • lxd/storage/drivers/driver/lvm/volumes: Deactivate volume in UnmountVolumeSnapshot
  • lxd/storage/drivers/driver/lvm/volumes: Activate volume before FS UUID regen in RestoreVolume
  • openpty: fix TIOCGPTPEER usage
  • Make network address bind error fatal when clustered
  • lxd/storage/drivers/driver/btrfs/utils: Renames metadatHeader to restorationHeader
  • lxd/storage/drivers/driver/btrfs/volumes: d.restorationHeader usage
  • lxd/storage/drivers/driver/btrfs/volumes: Clarifies comments in MigrateVolume
  • lxd/storage/drivers/driver/btrfs/volumes: Adds safety net against failed matching of subvolumes
  • lxd/storage/drivers/driver/btrfs/utils: Fix deleteSubvolume to support recursive delete with intermediate ro subvols
  • lxd/storage/drivers/utils: Mark BTRFSSubVolumeMakeRo and BTRFSSubVolumeMakeRw deprecated
  • lxd/storage/drivers/driver/btrfs/volumes: Updates RestoreVolume to restore subvolume ro property
  • test: Adds BTRFS subvolume tests
  • lxd/storage/memorypipe: Fixes issue with partial reads losing data
  • lxd/storage/drivers/driver/btrfs/volumes: Restores subvolumes ro property in CreateVolumeFromCopy
  • lxd/storage/drivers/driver/btrfs/utils: Adds marshal tags to BTRFSSubVolume and BTRFSMetaDataHeader
  • lxd/device/nic/bridged: Updates github.com/mdlayher/netx/eui64
  • fix IPVLAN docs
  • lxd/cluster: Don't run a connection proxy when connecting with the Go dqlite client
  • lxd/cluster: Extract dqlite network proxy logic to standalone function and support cancellation
  • lxd/cluster: Use dqliteProxy in raftDial
  • lxd/cluster: Use ReadClose() to gracefully stop the dqlite proxy
  • lxd/device/device/utils/generic: Removes deviceNameEncode and deviceNameDecode
  • lxd/storage/drivers/utils: Adds PathNameEncode and PathNameDecode
  • lxd/device/device: PathNameEncode and PathNameDecode usage
  • lxd/storage/drivers/driver/types: Adds OptimizedBackupHeader field to Info
  • lxd/backup/backup: Adds OptimizedHeader field to Info struct
  • lxd/backup: Updates backupWriteIndex to populate the OptimizedHeader field
  • lxd/storage/drivers/driver/btrfs: Sets OptimizedBackupHeader to true in Info struct response
  • lxd/storage/drivers/driver/btrfs/utils: Adds warning to BTRFSSubVolume and BTRFSMetaDataHeader about shared usage
  • lxd/storage/drivers/driver/btrfs/volumes: Updates BackupVolume to add subvolumes to optimized backup file
  • lxd/storage/drivers/interface: Update CreateVolumeFromBackup to pass srcBackup backup.Info
  • lxd/storage/backend/lxd: Pass srcBackup in CreateInstanceFromBackup
  • lxd/storage/drivers: CreateVolumeFromBackup srcBackup backup.Info usage
  • lxd/backup/backup: Updates GetInfo to set optimizedHeaderFalse false if not present in yaml file
  • lxd/storage/drivers/driver/btrfs/utils: Adds loadOptimizedBackupHeader
  • lxd/storage/drivers/driver/btrfs/volumes: Updates CreateVolumeFromBackup to restore subvolumes using optimized header file
  • lxd/storage/drivers/driver/btrfs/volumes: Simplifies parent volume logic in BackupVolume
  • lxd/storage/drivers/driver/btrfs/volumes: Simplifies parent volume logic for MigrateVolume
  • test: Adds BTRFS backup subvolume tests
  • lxd/storage/drivers/driver/btrfs/utils: Removes receiveSubvolume
  • lxd/storage/drivers/driver/btrfs/utils: Adds receiveSubVolume function
  • lxd/storage/drivers/driver/btrfs/volumes: Updates CreateVolumeFromMigration to use receiveSubVolume
  • lxd/resources/memory: Fix memory calculation
  • lxd: Improve logging of shutdown errors
  • lxd/instances/post: Delete restored instance on backup post hook failure
  • Fix 'how to mount home directory' shiftfs FAQ
  • shared: build fs_{32,64}bit.go on mips*
  • lxd/util: build fs_{32,64}bit.go on mips*
  • lxd/rsync: Adds optional rsync arguments to LocalCopy
  • lxd/storage/utils: Fixes ImageUnpack to not erase generated rootfs block file when doing rsync
  • ethtool: don't report -1 for speed in ethtoolLink()
  • lxd/storage/quota/projectquota: Fixes leaking file handles in quota_set_path and quota_get_path
  • lxd/storage/quota/projectquota: Adds inherit argument to quota_set_path
  • lxd/storage/quota/projectquota: Updates SetProject to recursively set project and support non-directory files
  • lxd/storage/drivers/driver/dir/utils: Updates deleteQuota to use DeleteProject
  • lxd/storage/drivers/driver/dir/volumes: Adds quota revert in CreateVolumeFromBackup post hook
  • Always skip offline servers when rebalancing
  • When demoting a voter to spare, transition to stand-by first
  • test/clustering: Make sure that a killed voter can't dsirupt current leader
  • lxd/cluster: Use a dedicated channel to stop the dqlite proxy
  • lxd: Call Deamon.Kill() also when receiving signals (so db transactions won't be retried)
  • lxd/db: Add Cluster.Kill() method to prevent retrying upon shutdown
  • lxd/firewall/drivers/driver/nftables/templates: Fixes proxy nat rule dynamic family
  • shared/util_linux.go: cast Rdev uint64 for mips
  • lxd/storage/quota/projectquota.go: cast Rdev uint64 for mips
  • lxd/device/device_utils_unix.go: cast Rdev uint64 for mips
  • lxd/device/gpu.go: cast Rdev uint64 for mips
  • shared: Reimplement GetPollRevents without cgo
  • lxd-agent: Build statically
  • Drop gccgo
  • lxd-p2c: Drop cgo
  • shared/ucred: Cleanup package
  • lxd/api: Don't strip double slashes
  • lxd/operations: Improve error message when database insertion fails
  • lxd/db: Change UpdateCertificate to RenameCertificate (only renaming supported)
  • lxd/db: Rename containers.go to instances.go
  • shared/generate/db: Statement for deleting references (config and devices)
  • lxd/db: Generate delete stements for profile config and devices
  • shared/generate/db: update statement: take ID instead of natural key
  • shared/generate/db: Handle config and devices in Update method
  • lxd/db: Generate Update method for profiles
  • lxd: Plug new UpdateProfile() db method into doProfileUpdate
  • lxd: Plug new UpdateProfile() db method into updatePoolPropertyForAllObjects
  • lxd/db: Generate delete statements for instance config, devices and profiles
  • lxd/db: Generate UpdateInstance method
  • lxd/instance: Plug the new UpdateInstance method and replace legacy logic
  • lxd/db: Drop AddDevicesToEntity
  • lxd/storage/drivers/driver/common: Logging quoting consistency
  • lxd/storage/drivers: Adds storage_lvm_skipactivation patch
  • test: Drive-by fix for flaky clustering rebalance test
  • Recommend to increase the value of aio-max-nr for production use
  • lxd/firewall/firewall/interface: Change definition of Compat() to return compat issue error
  • lxd/firewall/drivers/driver/nftables: Updates Compat() to return compat issues as error
  • lxd/firewall/drivers/drivers/xtables: Updates Compat() to return compat issues as error
  • shared/simplestreams: Support uefi1.img
  • lxd/firewall/firewall/load: Updates driver detection to warn when falling back to non-compatible xtables
  • lxd/storage/pools: Improves delete pool error info
  • instance_exec: don't panic
  • lxd/qemu: Handle quoted raw.qemu
  • lxd/main_forkproxy: Reduce logging
  • lxd/networks: Warn on small IPv6 subnets
  • lxd/network: Force DHCP custom gateway
  • api: Add network_dns_search
  • lxd/network: Support specifying search domain
  • lxc/list: Add disk and memory columns
  • i18n: Update translation template
  • lxd/storage/drivers: Make sure tar reader context is cancelled before defer
  • lxc/list: Fix test
  • shared/archive: Wraps cancelFunc to wait until unpacker process has finished in CompressedTarReader
  • lxd/cluster: Transfer leadership before adjusting roles, not after
  • lxd/cluster: Add time skew detection
  • test: Wait a few more seconds for the rebalance to happen
  • lxd/daemon.go: Don't try to rebalance after shutdown sequence has started
  • lxd/cluster: Don't try to rebalance a standalone node
  • lxc/ucred: Simplify logic
  • lxd/qemu: Cleanup arch checks
  • lxd/qemu: Add s390x support
  • lxd/api: Fail /internal/ready requests made after shutdown has started
  • lxc/config: Add -e shorthand
  • lxc/network: Add IPv4/IPv6 columns
  • forkfile: port to using pidfds
  • forkmount: port to using pidfds
  • forkproxy: port to using pidfds
  • syscall_numbers: update
  • forknet: port to pidfds
  • forkuevent: port to pidfds
  • forksyscall: port to pidfds
  • daemon: record "pidfd" extension
  • api: Add container_nic_routed_limits
  • lxd/device/nic/routed: Add limits support
  • lxd/storage/lvm: Correct bad VG name in patch
  • shared/subprocess: Better handle slow systems
  • tests: Don't assume bridge MTU can be forced up
  • lxd/db: Use query.SelectString helper in GetLocalImages()
  • lxd/db: Use query.SelectString helper in GetImagesFingerprints()
  • shared/generate/db: Support int64 fields
  • lxd/db: Initial code generation for images (without references)
  • lxd/db: Use the generated GetImages code to implement GetExpiredImages
  • lxd/db: Use query.SelectObjects helper in GetImageSource
  • lxd/db: Use query.SelectStrings helper in ImageSourceGetCachedFingerprint
  • lxd/db: Use query.Count helper in ImageExists
  • lxd/db: Use query.Count helper in ImageIsReferencedByOtherProjects
  • lxd/db: Use query.UpsertObject helper in CreateImageSource
  • lxd/db: Use auto-generated GetImages() to implement GetImage()
  • lxd/cluster: Drive-by fix for flaky rebalance test
  • lxd/db: Use auto-generated GetImages to implement GetImageFromAnyProject
  • lxd/db: Usage query.DeleteObject to implement DeleteImage
  • lxd/db: Use query.SelectStrings to implement GetImageAliases
  • lxd/db: Use a single transaction in GetImageAlias
  • lxd/db: Use a single transaction in DeleteImageAlias
  • lxd/db: Use single transaction in CreateImageAlias
  • lxd/db: Usage single transaction in CreateImage
  • lxd/db: Use query.SelectIntegers helper in GetPoolsWithImage
  • lxd/db: Use a single transaction in GetPoolNamesFromIDs
  • lxd/db: Use explicit transaction in GetInstanceProjectAndName
  • lxd/db: Drop unused DeleteInstanceConfig
  • fork*: add "--" to not misinterpret negative integers as flags
  • lxd/storage/utils: Removes unused name arg from VolumeFillDefault
  • lxd/instance/drivers: storagePools.VolumeFillDefault usage
  • lxd/patches: driver.VolumeFillDefault usage
  • lxd/storage/utils: VolumeFillDefault usage
  • lxd/storage/utils: Updates VolumeValidateConfig to require volume type
  • lxd/storage/utils: Adds VolumeDBTypeToType function
  • lxd/storage/utils: Updates VolumeDBCreate to pass volume type
  • lxd/storage/drivers/utils: Updates ensureVolumeBlockFile to reject unsafe volume shrinking
  • lxd/storage/drivers/geneirc/vfs: Removes genericVFSResizeBlockFile
  • lxd/storage/drivers: ensureVolumeBlockFile usage
  • lxd/storage/drivers/volume: Adds SetQuota function
  • lxd/storage/drivers/volume: Adds config functions
  • lxd/storage/drivers/driver/lvm/utils: Removes functions moved into Volume struct
  • lxd/storage/drivers/driver/lvm/utils: Usage of volume config functions
  • lxd/storage/drivers/driver/lvm/volumes: Volume config function usage
  • lxd/storage/drivers: Replace volumeSize() with vol.ConfigSize()
  • forknet: add missing "--" to forknet invocation on detach
  • process_utils: remove a bunch of unused functions
  • lxd: Make use of ExitCode
  • share/subprocess: Reduce sleep back to 5
  • lxd/instances/lxc: Fix calls to forknet
  • forkmount: prevent interpreting negative numbers as flags
  • shared/subprocess: Ensure monitor routine exits
  • shared/subprocess: Properly reset state
  • tests: Fix btrfs test on non-shiftfs
  • tests: Old kernels don't let you rmdir btrfs
  • shared/subprocess: Fix Stop handling
  • lxd/storage/utils: Updates ImageUnpack to detect too small volume for qcow2 image and increase size before unpack
  • lxd/storage/utils: Adds checks to ImageUnpack before enlarging volume
  • lxd/storage/drivers/driver/types: Updates VolumeFiller Fill function to take a Volume
  • lxd/storage: Updates volume filler usage to supply Volume rather than mount path
  • lxd/storage/drivers/volume: Adds ConfigSizeFromSource function
  • lxd/storage/drivers/driver/lvm/utils: Updates copyThinpoolVolume to only use vol.config["size"] for resizing
  • lxd/storage/drivers/driver/lvm/utils: Updates Volume type in createLogicalVolumeSnapshot definition
  • lxd/storage/drivers/driver/common: Adds runFiller function
  • lxd/storage/backend/lxd: Updates imageFiller to return volume size
  • lxd/storage/backend/lxd: Updates CreateInstanceFromImage to load image vol DB record
  • lxd/storage/backend/lxd: Updates EnsureImage to record volatile.rootfs.size for block images
  • lxd/storage/drivers/driver/types: Updates VolumeFiller definition to store size
  • lxd/storage/utils: Validates volatile.rootfs.size key for image volumes in validateVolumeCommonRules
  • lxd/storage/utils: Updates ImageUnpack to return image virtual size
  • lxd/storage/drivers/driver/btrfs/volumes: d.runFiller usage
  • lxd/storage/drivers/driver/ceph/volumes: d.runFiller usage
  • lxd/storage/drivers/driver/cephfs/volumes: d.runFiller usage
  • lxd/storage/drivers/driver/dir/volumes: d.runFiller usage
  • lxd/storage/drivers/driver/lvm/volumes: d.runFiller usage
  • lxd/storage/drivers/driver/zfs/volumes: d.runFiller usage
  • lxd/storage/drivers/volume: Adds SetConfigSize function
  • lxd/storage/backend/lxd: Updates CreateInstanceFromImage to use vol.ConfigSizeFromSource to dervice volume size
  • lxd/storage/drivers: Updates CreateVolumeFromCopy to only use vol.config["size"] for resizing
  • lxd: Reduce number of transactions in containerPostClusteringMigrate
  • lxd/db: Use query.SelectStrings helper in LegacyContainersList
  • lxd/db: Rename dbDeviceTypeToString to deviceTypeToString
  • lxd/db: Group ClusterTx image methods together
  • lxd/db: Rename ImageSourceGetCachedFingerprint to GetCachedImageSourceFingerprint
  • lxd/storage/drivers/utils: ensureVolumeBlockFile comment clarification
  • lxd/storage/drivers/utils: Renames BlockDevSizeBytes to BlockDiskSizeBytes
  • lxd/storage/utils: drivers.BlockDiskSizeBytes usage
  • lxd/storage/utils: Simplifies InstanceDiskBlockSize with drivers.BlockDiskSizeBytes usage
  • lxd/storage/drivers/generic/vfs: Simplifies genericVFSBackupVolume with drivers.BlockDiskSizeBytes usage
  • lxd/storage/backend/lxd: Whitespace in CreateInstanceFromBackup
  • lxd/storage/drivers/driver/ceph/volumes: BlockDiskSizeBytes usage in SetQuota
  • lxd/storage/drivers: Updates dir and btrfs to support filler volume enlargement
  • lxd/db: Group ClusterTx instance methods together
  • lxd/db: Rename AddProfilesToInstance to addProfilesToInstance
  • lxd/db: Move instance backup methods to backups.go
  • lxd/db: Rename InstanceBackupArgs to InstanceBackup
  • lxd/db: Remove unused profile functions
  • lxd/db: Move storage volumes methods to storage_volumes.go
  • lxd/storage/drivers/volume/test: Adds tests for Volume.ConfigSizeFromSource()
  • forkuevent: fix slice allocation
  • lxd/images: Set CreatedAt on publish
  • unix-hotplug: fix uevent injection
  • lxd: New command line option to trace SQL statements
  • lxd/firewall/drivers/drivers/xtables: Updates iptablesInUse to kill process once first rule found
  • lxd/backup: Fixes hang in backupCreate when invalid compression argument supplied
  • lxd/storage/utils: Removes duplicated qemu-img call in ImageUnpack
  • lxd/storage/utils: Switch to qemu-img dd mode in ImageUnpack
  • lxd/storage/drivers/utils: Exports MinBlockBoundary
  • lxd/storage/drivers: MinBlockBoundary usage
  • lxd/resources: Handle missing cache size/type
  • Update documentation with backup compression
  • lxd/rbac: New notification API
  • lxd/firewall/nft: Enhance support detection
  • lxd/device/device/utils/network: Adds networkValidVLAN and networkValidVLANList functions
  • lxd/network/network/utils: Adds linux bridge VLAN management functions
  • lxd/network: Enable VLAN filtering for managed Linux bridges
  • lxd/device/nic: Changes nicValidationRules to properly validation vlan
  • lxd/device/nic/bridged: Adds vlan validation
  • lxd/device/nic/bridged: Adds revert for veth pair cleanup on error
  • lxd/device/nic/bridged: Adds support for untagged and tagged vlan membership
  • doc: Documents NIC bridged vlan and vlan.tagged settings
  • api: Adds API extension instance_nic_bridged_vlan
  • lxd/firewall/drivers/drivers/xtables: Drops tagged vlan frames when using IP filtering
  • lxd/firewall/drivers/drivers/nftables: Drops tagged vlan frames when using IP filtering
  • test: Adds bridged VLAN tests
  • Fix regression in GetImageFromAnyProject
  • doc/security: Adds notes about IPv6 router advertisement security
  • lxd/device/nic/bridged: Corrects vlan comment
  • lxd/network/network/utils: Improve comments on ovs switch attach/detach
  • lxd/network/network/utils: Improves arg name in network attach/detach functions
  • lxd/device/bic/bridged: Fixes openvswitch port leak when device is stopped
  • lxd/network/utils: Adds IsNativeBridge function
  • lxd/device/device/utils/network: Allow VLAN ID 0 in networkValidVLAN
  • test: Updates bridged vlan ID range tests
  • lxd/device/nic/bridged: Adds openvswitch vlan support
  • test: Adds LXD_NIC_BRIDGED_DRIVER test environment variable
  • lxd/maas: Fix support for multiple subnets
  • lxd/maas: Support projects
  • lxd/dnsmasq: Add project suffix
  • Remove incorrect statement about supported network devices with virtual machines According documentation supported types with virtual machines are physical, bridged, macvlan, p2p, sriov
  • lxd/rbac: Fix auth for non-RBAC trusted clients
  • global: Add riscv64 to build tags
  • Stop using Driver.SetContextTimeout() which is a no-op
  • use the coreos fork of boltdb since the original is archived/abandoned
  • i18n: Update translations from weblate
  • api: Add network_state_bond_bridge
  • shared/api: Extend NetworkState for bridge/bond
  • lxd/networks: Add bridge/bond details

Try it for yourself

This new LXD release is already available for you to try on our demo service.

Downloads

The release tarballs can be found on our download page.

Binary builds are also available for:

  • Linux: snap install lxd
  • MacOS: brew install lxc
  • Windows: choco install lxc

LXD 4.1 has been released

8th of May 2020

Introduction

The LXD team is very excited to announce the release of LXD 4.1!

This is the first feature release following the release of 4.0 LTS. As a normal feature release, LXD 4.1 is only supported until 4.2 is released, usually about a month afterwards.

The bulk of the changes are bugfixes and refactoring we've done since the 4.0 release, but there are also a number of smaller features and improvements.

Enjoy!

New features and highlights

Push and relay support for images

Similar to instance copy/move, it's now possible to have the source server push an image directly to the target server or have the client tool relay between servers.

This makes it easier to deal with firewalls in between servers.

lxc image copy source:some-image target: --mode=push
lxc image copy source:some-image target: --mode=relay

Routing table support for routed NIC devices

Two new options were added on routed NIC devices:

  • ipv4.host_table
  • ipv6.host_table

Those control what routing table to insert the routing rules into. By default, this is the main routing table, but some users have indicated wanting to use alternative routing tables which this enables.

L2 mode for ipvlan NIC devices

ipvlan devices in LXD default to layer 3 symmetric mode (l3s) but a new mode option was now introduced allowing for layer 2 mode (l2) to be used as well.

Tweaks to the resources API

A new system section was added, exposing many DMI fields as well as the type of system used to run LXD (physical, virtual or container).

Additionally, NUMA nodes are now tracked at the CPU thread level and CPU die information is also recorded at the per-core level.

Example CPU output:

stgraber@castiana:~$ lxc query /1.0/resources | jq .cpu
{
  "architecture": "x86_64",
  "sockets": [
    {
      "cache": [
        {
          "level": 1,
          "size": 32768,
          "type": "Data"
        },
        {
          "level": 1,
          "size": 32768,
          "type": "Instruction"
        },
        {
          "level": 2,
          "size": 262144,
          "type": "Unified"
        },
        {
          "level": 3,
          "size": 3145728,
          "type": "Unified"
        }
      ],
      "cores": [
        {
          "core": 0,
          "die": 0,
          "frequency": 639,
          "threads": [
            {
              "id": 0,
              "numa_node": 0,
              "online": true,
              "thread": 0
            },
            {
              "id": 2,
              "numa_node": 0,
              "online": true,
              "thread": 1
            }
          ]
        },
        {
          "core": 1,
          "die": 0,
          "frequency": 658,
          "threads": [
            {
              "id": 1,
              "numa_node": 0,
              "online": true,
              "thread": 0
            },
            {
              "id": 3,
              "numa_node": 0,
              "online": true,
              "thread": 1
            }
          ]
        }
      ],
      "frequency": 648,
      "frequency_minimum": 400,
      "frequency_turbo": 3500,
      "name": "Intel(R) Core(TM) i5-7300U CPU @ 2.60GHz",
      "socket": 0,
      "vendor": "GenuineIntel"
    }
  ],
  "total": 4
}

Example system output:

stgraber@castiana:~$ lxc query /1.0/resources | jq .system
{
  "chassis": {
    "serial": "PF0QD1U7",
    "type": "Notebook",
    "vendor": "LENOVO",
    "version": "None"
  },
  "family": "ThinkPad X1 Carbon 5th",
  "firmware": {
    "date": "02/17/2020",
    "vendor": "LENOVO",
    "version": "N1MET60W (1.45 )"
  },
  "motherboard": {
    "product": "20HRCTO1WW",
    "serial": "L1HF6CX006Y",
    "vendor": "LENOVO",
    "version": "Not Defined"
  },
  "product": "20HRCTO1WW",
  "serial": "PF0QD1U7",
  "sku": "LENOVO_MT_20HR_BU_Think_FM_ThinkPad X1 Carbon 5th",
  "type": "physical",
  "uuid": "7fa1c0cc-2271-11b2-a85c-aab32a05d71a",
  "vendor": "LENOVO",
  "version": "ThinkPad X1 Carbon 5th"
}

Addition of OS data in the server information

OS information is now exposed in /1.0 and lxc info:

stgraber@castiana:~$ lxc info | grep os_
  os_name: Ubuntu
  os_version: "20.04"

New lxd cluster remove-raft-node command

This new command can be used to force the removal of a database member when LXD is unable to start due to missing database quorum.

Improved table sorting in the command line tool

Lists are now sorted by natural order, making numbered items sort properly. Additionally, in volume listings, snapshots are now listed immediately following their parent.

Complete changelog

Here is a complete list of all changes in this release:

  • doc/instances: Fix escaping
  • lxc/network: Updates network detach checks to use bridged network property
  • lxd/network/network/utils: Updates network setting detection in IsInUse
  • lxd/instance/drivers/driver/qemu: Adds host_name info to RenderState when lxd-agent is running
  • Merge pull request #7115 from tomponline/tp-bridged-network
  • lxd/networks: Fix clustered configs
  • Merge pull request #7114 from stgraber/master
  • shared/api: Move NUMANode to thread
  • lxd/resources: Set NUMANode on a per-thread basis
  • lxc/info: Update for NUMANode on thread
  • i18n: Update translation templates
  • api: resources_cpu_threads_numa
  • Merge pull request #7118 from stgraber/master
  • api: resources_cpu_core_die
  • lxd/resources: Parse and report die_id
  • lxd/storage/drivers/driver/lvm/volumes: Mount xfs snapshot with nouuid option
  • Merge pull request #7120 from stgraber/master
  • lxd/storage/drivers/driver/ceph/volumes: Adds mounting logging
  • lxd/instance/drivers/driver/lxc: Updates Render() to accept options arguments
  • lxd/instance/drivers/driver/qemu: Updates Render() to accept options arguments
  • lxd/instance/instance/interface: Updates Render() to accept options arguments
  • lxd/storage/drivers/utils: Zeros btrfs transaction log in regenerateFilesystemBTRFSUUID
  • lxd/storage/utils: Removes unused functions and constants
  • lxd/storage/utils: Adds RenderSnapshotUsage function
  • lxd/instance/snapshot: Adds storagePools.RenderSnapshotUsage to Render() in containerSnapshotsGet and snapshotGet
  • lxd/instance/drivers/driver/lxc: Use storagePools.RenderSnapshotUsage in RenderFull()
  • lxd/instance/drivers/driver/qemu: Use storagePools.RenderSnapshotUsage in RenderFull()
  • lxd/instance/instance/utils: Removes unused WriteBackupFile
  • lxd/storage/drivers/utils: Changes regenerateFilesystemUUID to use expanded arg definitions
  • lxd/storage/drivers/driver/ceph/utils: Changes generateUUID to not map device
  • lxd/storage/drivers/driver/ceph/volumes: d.generateUUID updated signature usage
  • lxd/storage/drivers/driver/ceph/volumes: Adds BTRFS UUID regeneration to MountVolumeSnapshot
  • lxd/storage/drivers/driver/zfs/volumes: Comment clarification
  • lxd/storage/drivers/volume: Adds support for setting custom mount path
  • lxd/storage/drivers/driver/btrfs/volumes: Create temporary snapshot in BackupVolume()
  • lxd/storage/drivers/driver/btrfs/volumes: Renames container vars to instance
  • lxd/storage/drivers/driver/btrfs/volumes: Consistent quoting of error message variables
  • Merge pull request #7117 from tomponline/tp-storage-mountsnapshots-uuid
  • Merge pull request #7122 from tomponline/tp-storage-export-snapshots
  • lxd/main_activateifneeded: s/container/instance/
  • lxd/instance/drivers: Removes storagePools.RenderSnapshotUsage from RenderFull()
  • lxd/storage/drivers/driver/zfs/volumes: Create temporary snapshot in BackupVolume()
  • lxd/storage/backend/lxd: Checks for existance of volume before deleting
  • lxd/instance: Switches to revert package for instanceCreateAsSnapshot
  • lxd/storage/backend/lxd: Comment tweak
  • lxd/storage/drivers/driver/ceph/volumes: Tweaks HasVolume detection
  • Merge pull request #7129 from tomponline/tp-storage-renderfull
  • Merge pull request #7131 from tomponline/tp-storage-export-snapshots-zfs
  • shared/subprocess/proc: Fixes race in process stopping
  • Merge pull request #7132 from tomponline/tp-storage-delete-volume-checks
  • lxd/main_activateifneeded: Retrieve all instances
  • lxd/main_activateifneeded: Check for scheduled instance snapshots
  • lxd/main_activateifneeded: Check for scheduled volume snapshots
  • test/suites/basic: Update activateifneeded tests
  • lxd/main_activateifneeded: Use defer statement to close db
  • Merge pull request #7128 from monstermunchkin/issues/7126
  • lxd/storage/btrfs: Workaround permission issue
  • Merge pull request #7134 from stgraber/master
  • lxd/cluster: add RemoveRaftNode() to force removing a raft node
  • api: Add "DELETE /internal/cluster/raft/
    " endpoint
  • Increase timeout when calling dqlite.Client.Add() to join the cluster
  • Merge pull request #7139 from freeekanayaka/increase-join-timeout
  • lxd/storage/drivers/driver/zfs/volumes: Comment
  • lxd/storage/drivers/driver/lvm/volumes: Always return -1/ErrNotSupported for snapshot usage
  • lxd/storage/drivers/driver/dir/volumes: Always return -1/ErrNotSupported for snapshot usage
  • lxd/storage/drivers/driver/zfs/volumes: Always used 'used' property for ZFS snapshot usage
  • lxd/storage/drivers/driver/cephfs/volumes: Always return -1/ErrNotSupported for snapshot usage
  • lxd/storage/drivers/driver/btrfs/volumes: Return -1/ErrNotSupported when no quota available
  • lxd/instance: Fix typo in comment
  • lxc/action: Fix typo in help message
  • i18n: Update translation templates
  • Merge pull request #7142 from stgraber/master
  • lxd: Add "lxd cluster remove-raft-node" recovery command
  • doc: Add paragraph about "lxd cluster remove-raft-node"
  • test: Add test exercising "lxd cluster remove-raft-node"
  • Merge pull request #7141 from tomponline/tp-storage-snapshot-usage
  • Merge pull request #7138 from freeekanayaka/remove-raft-node
  • lxd/storage/lvm: Always call vgchange on mount
  • Merge pull request #7146 from stgraber/master
  • lxd/patches: Fix snapshot migration
  • tests: Fix btrfs storage usage
  • Merge pull request #7147 from stgraber/master
  • lxd/storage/drivers/volume: Only chmod if needed in EnsureMountPath
  • lxd/storage/drivers/volume: Removes unnecessary variable
  • lxd/storage/drivers/driver/zfs/volumes: Ensure volumes created from copy have correct perms
  • lxd/storage/drivers: Call EnsureMountPath() in MountVolume()
  • lxd/storage/drivers: Call EnsureMountPath() in MountVolumeSnapshot()
  • lxd/storage/drivers/driver/btrfs/volumes: Adds revert to CreateVolume
  • lxd/storage/drivers/driver/btrfs/volumes: Comment in CreateVolumeFromCopy
  • lxd/storage/drivers/driver/lvm/utils: EnsureMountPath after copying thin volume
  • lxd/storage/drivers/driver/cephfs/volumes: typo
  • lxd/storage/drivers/driver/cephfs/volumes: Calls vol.EnsureMountPath after filling
  • lxd/storage/drivers/driver/ceph/volumes: Calls EnsureMountPath to fix perms after copying volume
  • lxd/storage/drivers/driver/lvm/volumes: Fixes temporary snapshot volume cleanup for VMs
  • Merge pull request #7144 from tomponline/tp-storage-snapshot-mnt-create
  • lxd/storagr/drivers/driver/ceph/volumes: Adds support for snapshot usage reporting
  • lxd/storage/drivers/driver/lvm/volumes: Clarifies comments on LVM volume usage reporting
  • Merge pull request #7151 from tomponline/tp-storage-ceph-snapshot-usage
  • shared/osarch: Coding style
  • shared/osarch: Don't fail on missing os-release
  • shared/api: Add OS information
  • lxd/api: Add OS information
  • api: Add api_os
  • lxc: Use natural string sorting
  • lxc: Group snapshot and parent
  • lxd/main: Move forkzfs mntns to cgo
  • Merge pull request #7154 from stgraber/master
  • Merge pull request #7155 from stgraber/cli
  • Merge pull request #7156 from stgraber/zfs
  • doc/networks: Adds note about firewalld and DHCP/DNS
  • Merge pull request #7158 from tomponline/tp-bridged-firewalld
  • lxd/device/nic/routed: Improves validation of sysctl settings when using vlan option
  • lxd/device/nic/routed: Corrects misleading error message when setting sysctls
  • Merge pull request #7159 from tomponline/tp-nic-routed-validation
  • lxd/storage/drivers/generic/vfs: Log when creating snapshots
  • lxd/storage/drivers/driver/zfs/volumes: Fix migrating VM block volumes in MigrateVolume
  • lxd/storage/memorypipe: Adds context support for cancellation
  • lxd/storage/backend/lxd: memorypipe cancellation usage
  • lxd/device/nic/sriov: Updates networkGetVirtFuncInfo to use json output from ip tool
  • Merge pull request #7160 from tomponline/tp-storage-vm-migration
  • doc: Add missing os_api extension
  • Merge pull request #7165 from stgraber/master
  • Merge pull request #7163 from tomponline/tp-nic-sriov
  • lxd/storage/drivers/driver/dir/utils: Removes default project quota
  • Merge pull request #7166 from tomponline/tp-storage-dir-quota
  • forkexec: mark fd cloexec so the attaching process doesn't inherit it
  • Merge pull request #7167 from brauner/2020-04-10/fixes
  • forkexec: close all inherited fds
  • Merge pull request #7168 from brauner/2020-04-10/fixes
  • forkexec: log unexpected fds
  • Merge pull request #7169 from brauner/2020-04-10/fixes
  • lxd/daemon: Ignore .zfs in volumes
  • Merge pull request #7170 from stgraber/master
  • lxd/network: Push MTU over DHCP
  • Merge pull request #7171 from stgraber/master
  • shared/api: Drop invalid Managed key in NetworksPost
  • lxd: Drop invalid use of Managed property
  • Merge pull request #7173 from stgraber/network
  • lxd/devices/disk: Prevent recursive & readonly
  • Merge pull request #7177 from stgraber/master
  • lxc/instance/drivers: Set new name before renaming backups
  • test: Extend backup rename
  • lxd/instance/drivers: Add revert steps when renaming instance
  • Merge pull request #7182 from monstermunchkin/issues/7176
  • lxd/instance/drivers/driver/qemu: Allow up to 8 NIC devices
  • lxd/instance/drivers/driver/qemu/templates: Note that lxd_ disk device name prefix should not be changed
  • Merge pull request #7185 from tomponline/tp-vm-pci
  • Merge pull request #7183 from tomponline/tp-vm-device-comment
  • doc/instances: Clarify config conditions
  • doc/index: Clarify bind-mount in FAQ
  • Merge pull request #7186 from stgraber/master
  • lxd/instances: Better use userRequested on Update
  • Merge pull request #7190 from stgraber/master
  • lxd/device/nic: Adds host_table setting validation rule
  • lxd/device/nic/routed: Fix sysctl command suggestion when using vlans
  • lxd/device/nic/routed: Add host_table support
  • api: Adds container_nic_routed_host_table extension
  • doc: Adds documentation for routed NIC host_table setting
  • suites/container/devices/nic/routed: Adds tests for custom routing tables
  • Merge pull request #7192 from tomponline/tp-nic-routed-hosttable
  • lxd/device/nic/ipvlan: Improve validation of sysctl settings when vlan setting used
  • lxd/device/nic/ipvlan: Adds host_table setting support
  • api: Adds container_nic_ipvlan_host_table extension
  • doc: Adds documentation for ipvlan NIC host_table setting
  • test/suites/container/devices/nic/ipvlan: Adds tests for custom routing tables
  • test/clustering: increase timing to detect offline node
  • Merge pull request #7193 from tomponline/tp-nic-ipvlan-hosttable
  • api: Adds container_nic_ipvlan_mode extension
  • lxd/device/nic/ipvlan: Adds support for l2 mode
  • doc/instances: Documents ipvlan l2 mode
  • test/suites/container/devices/nic/ipvlan: Adds l2 mode tests
  • Merge pull request #7197 from freeekanayaka/tweak-clustering-membership-test-timings
  • Merge pull request #7196 from tomponline/tp-nic-ipvlan-l2
  • shared/version/api: Add resources_system API extension
  • doc/api-extensions: Add resources_system
  • shared/api/resource: Add system resources
  • lxd/resources: Add new system resources
  • lxd/resources: Retrieve system information
  • shared/util: Never look into the snap
  • Merge pull request #7194 from monstermunchkin/issues/7189
  • Merge pull request #7198 from stgraber/master
  • lxd/resources: serial/uuid may not be accessible
  • Merge pull request #7201 from stgraber/master
  • doc/instances: Fixes default ceph.cluster_name value
  • lxd/device/disk: Adds support to use ceph: prefix for disk source for VMs
  • Merge pull request #7206 from tomponline/tp-vm-disk-ceph
  • firewalld & lxd : how to let Firewalld control the LXD's iptables rules this is related to https://github.com/lxc/lxd/pull/7195 but this a bit more generic
  • Update networks.md
  • Merge pull request #7204 from kerphi/patch-2
  • doc/networks: Fix typo
  • i18n: Update translations from weblate
  • Update networks.md
  • Merge pull request #7210 from ckd/patch-1
  • lxd/storage/ceph: Suppport alternate conf syntax
  • Merge pull request #7211 from stgraber/master
  • lxd/init: Try to bind LXD network address when running interactively
  • lxd/instance/drivers/driver/qemu/templates: Use static PCIe address prefix for 9p devices
  • lxd/instance/drivers/drivers/qemu: Adds support for 9p disk device PCIe indexes
  • Merge pull request #7213 from freeekanayaka/validate-listen-address
  • Merge pull request #7214 from tomponline/tp-vm-pcie
  • lxd/device/nic/bridged: Dont load br_netfilter
  • Merge pull request #7217 from tomponline/tp-nic-bridged-brnetfilter
  • doc/instances: Fix swapped description
  • Merge pull request #7219 from stgraber/master
  • index.md: add PATH env variable to sudo command example
  • Merge pull request #7220 from rafaeldtinoco/master
  • shared/simplestreams: Fix VM image preference
  • Merge pull request #7225 from stgraber/master
  • lxd/devoce/device/utils/disk: Comment on diskCephfsOptions
  • lxd/device/disk: Adds cephfs support for VMs
  • lxd/device/proxy: Check for br_netfilter enabled and log warning if not
  • lxd/firewall/drivers/driver/xtables: Adds MASQUERADE hairpin proxy NAT rule
  • lxd/firewall/drivers/drivers/xtables: comments
  • Merge pull request #7226 from tomponline/tp-vm-disk-cephfs
  • lxd/device/proxy: Sets bridge port hairpin mode on when br_netfilter loaded
  • lxd/firewall/drivers/drivers/xtables: Renames toDest to connectDest
  • lxd/firewall/drivers/drivers/nftables: Renames toDest to connectDest
  • lxd/init: Improve error messages when failing to bind an address
  • lxd/firewall/drivers/drivers/nftables: Adds MASQUERADE hairpin proxy NAT rule
  • Merge pull request #7227 from freeekanayaka/improve-cant-listen-error-message
  • test/suites/container/devices/proxy: Updates tests for checking hairpin rule
  • Merge pull request #7228 from tomponline/tp-nic-bridged-nat-hairpin
  • lxd/instance/drivers/driver/qemu: Wait for onStop when restarting
  • lxd/instance/drivers/driver/qemu: Makes onStop unexported
  • lxd/instance/drivers/driver/qemu: Comment
  • Merge pull request #7229 from tomponline/tp-vm-restart
  • lxd/instance/lxc: Don't crash in setNetworkPriority
  • Merge pull request #7230 from stgraber/master
  • lxd/instances: Export type to templates
  • lxd-agent: Reboot after cloud-init seed
  • lxd/util: Tweak NetworkInterfaceAddress to only return global
  • Merge pull request #7231 from stgraber/master
  • Merge pull request #7232 from stgraber/net
  • lxd/net/util: Updates comment on NetworkInterfaceAddress behaviour change
  • Merge pull request #7234 from tomponline/tp-util-networkinterfaceaddress
  • shared/usbid: Use system database
  • Merge pull request #7235 from stgraber/master
  • lxd-agent: Support systemd-notify
  • lxd/qemu: Switch default unit type to notify
  • Merge pull request #7236 from stgraber/master
  • lxd/storage/backend/lxd: Updates CreateInstanceFromImage to use reverter
  • lxd/storage/drivers/errors: Adds ErrCannotBeShrunk error
  • lxd/storage/drivers/utils: Updates to shrinkFileSystem ErrCannotBeShrunk error
  • lxd/storage/backend/lxd: Updates CreateInstanceFromImage to detect ErrCannotBeShrunk
  • lxd/storage/drivers: Returns ErrCannotBeShrunk when block volume cannot be shrunk
  • lxd/device/proxy: Dont allow proxy_protocol to be set when in nat mode
  • lxd/device/proxy: Dont wrap lines
  • lxd/device/proxy: Improves validation
  • test/suites/container/devices/proxy: Updates tests with new validation rules
  • Merge pull request #7238 from tomponline/tp-storage-cached-size
  • lxd: Updates snapshotProtobufToInstanceArgs to support instance type
  • Merge pull request #7240 from tomponline/tp-proxy-validation
  • Merge pull request #7241 from tomponline/tp-migration-inst-type
  • lxd/qemu: Match basic NUMA layout
  • Merge pull request #7243 from stgraber/master
  • lxd/storage/drivers/driver/zfs/volumes: Delete volume on error in CreateVolumeFromCopy
  • lxd-agent/main/agent: Adds comment about reason for systemd-notify usage
  • Merge pull request #7245 from tomponline/tp-vm-agentstart
  • lxd/cgroup: Fix memory controller detection
  • Merge pull request #7244 from tomponline/tp-storage-zfz-revert
  • lxd/migration/migrate/proto: Fix alignment
  • lxd/migration: Adds volumeSize field to MigrationHeader
  • lxd/migrate: Adds VolumeSize to MigrationSinkArgs
  • lxd/migration/migration/volumes: Adds VolumeSize to VolumeTargetArgs
  • lxd/migrate/instance: Use VolumeSize from offer header in Do()
  • lxd/storage/backend/lxd: Use VolumeSize from migration header in CreateInstanceFromMigration
  • lxd/storage/drivers: Exports BlockDevSizeBytes function
  • lxd/storage/utils: Adds InstanceDiskBlockSize
  • lxd/migrate/instance: Populate offerHeader.VolumeSize for VMs
  • lxd/storage/backend/lxd: Adds VM volume size hint to CreateInstanceFromCopy
  • Merge pull request #7248 from stgraber/master
  • Merge pull request #7246 from tomponline/tp-migration-volsize
  • lxd/device/utils: Do not add the Ceph mon port if already present in /etc/ceph config file
  • Merge pull request #7249 from leopaul36/master
  • lxd/instance/qemu: Add comment on cpuTopology
  • lxd/storage/ceph: Support port in URL
  • Merge pull request #7251 from stgraber/master
  • lxd/storage/drivers/utils: Makes minBlockBoundary available to other functions
  • lxd/storage/drivers/driver/zfs/utils: Updates createVolume to use minBlockBoundary
  • lxd/storage/drivers/driver/zfs/volumes: Updates SetVolumeQuota to use minBlockBoundary
  • lxd/storage/drivers/zfs/volumes: Updates CreateVolume to allow regeneration of deleted image volumes
  • lxd/storage/drivers/driver/zfs/volumes: Dont revert on rename success
  • Merge pull request #7250 from tomponline/tp-storage-image-regeneration
  • shared/version/api: Add API extension images_push_relay
  • doc: Add images_push_relay
  • client/interfaces: Add Mode to ImageCopyArgs
  • lxc/image: Add mode flag to image copy
  • client: Add relay mode for image copy
  • lxd/images: Return token response in push mode
  • lxd/images: Allow authentication using secret
  • shared/api/image: Add ImageExportPost
  • client: Add ExportImage to ImageServer
  • lxd/images: Add POST /1.0/images/fingerprint/export
  • client: Add push mode for image copy
  • client: Add GetOperationWaitSecret
  • lxd/images: Use metadata from the client
  • lxd/images: Return operation on token validation
  • lxd/images: Add secret metadata on image create
  • client/lxd_images: Set fingerprint and secret headers
  • lxd/operations: Allow untrusted clients for /1.0/operations/{id}/wait
  • doc/rest-api: Add POST /1.0/images//export
  • test/suites/remote: Add image copy push and relay mode
  • po: Update translations
  • lxd/daemon: Remove duplicated logic
  • Merge pull request #7130 from monstermunchkin/issues/6805
  • lxd/instance/qemu: Announce LXD in SMBIOS
  • Merge pull request #7255 from stgraber/master
  • share/usbid: Don't print error when missing
  • Merge pull request #7257 from stgraber/master
  • lxd/init: Auto-detect and use Ubuntu ZFS setup
  • Merge pull request #7261 from stgraber/master
  • lxc/config: Add --expanded to get
  • i18n: Update translation templates
  • Merge pull request #7267 from stgraber/master
  • Resolve both core.https_address and cluster.https_address when comparing IPs
  • Merge pull request #7269 from freeekanayaka/allow-using-hostnames-as-cluster-addresses
  • lxd/storage/drivers/generic/vfs: Skip missing files during export
  • Merge pull request #7271 from tomponline/tp-backup-walk-missing
  • lxd/images: Fixes hang in export when invalid --compression argument passed
  • Merge pull request #7272 from tomponline/tp-export-hang
  • lxd/storage/drivers/driver/btrfs/volumes: CreateVolumeFromCopy only use expanded volume size when source is image
  • Merge pull request #7276 from tomponline/tp-storage-createfromcopy-size-btrfs
  • lxd/storage/drivers/driver/ceph/volumes: Allow cached volume regeneration in CreateVolume
  • lxd/storage/drivers/driver/ceph/utils: Uses defaultBlockSize rather than hardcoded 10GB
  • lxd/storage/drivers/driver/ceph/volumes: Adds getVolumeSize function
  • lxd/storage/drivers/driver/ceph/volumes: Removes unnecessary mount/unmount
  • lxd/storage/drivers/driver/zfs/volumes: Clarify clone comments
  • lxd/storage/drivers/driver/ceph/volumes: Dont wrap lines
  • lxd/storage/drivers/driver/ceph/volumes: Dont use clone mode when creating volume from cached image when it is disabled
  • lxd/storage/utils: VolumeDBCreate comment formatting
  • lxd/storage/drivers/driver/lvm/volumes: CreateVolumeFromCopy only set volume size from expanded config when source is image
  • lxd/storage/drivers/driver/zfs/volumes: CreateVolumeFromCopy only set volume size from expanded config when source is image
  • lxc/storage/drivers/driver/ceph/utils: Reworks parseParent to return a Volume struct
  • lxd/storage/drivers/driver/ceph/utils: Adds tests for parseParent
  • lxd/storage/drivers/driver/ceph/utils: Adds cephVolumeTypeZombieImage constant
  • lxd/storage/drivers/driver/ceph/utils: Updates rbdCreateVolume to accept string size
  • lxd/storage/drivers/driver/ceph/utils: Pass volume config in rbdMarkVolumeDeleted
  • lxd/storage/drivers/driver/ceph/utils: Pass volume config in rbdRenameVolume
  • lxd/storage/drivers/driver/ceph/utils: Replaces getRBDSize with volumeSize
  • lxd/storage/drivers/driver/ceph/utils: Dont wrap lines
  • lxd/storage/drivers/driver/ceph/utils: Updates usage of d.parseParent in deleteVolume
  • lxd/storage/drivers/driver/ceph/utils: Updates RBD naming logic in getRBDVolumeName
  • lxd/storage/drivers/driver/ceph/volumes: Ensures CreateVolumeFromCopy correctly sizes new volume
  • lxd/storage/drivers/driver/ceph/volumes: If volume doesnt exist in DeleteVolume do nothing
  • lxd/storage/drivers/driver/ceph/utils: Dont wrap lines
  • lxd/db: Rename CertificatesGet to GetCertificates
  • lxd/db: Rename CertificateGet to GetCertificate
  • lxd/db: Rename CertSave to CreateCertificate
  • lxd/db: Rename CertDelete to DeleteCertificate
  • lxd/db: Rename CertUpdate to UpdateCertificate
  • lxd/db: Drop unused ConfigValueSet
  • lxd/instances/post: Fix revert in createFromBackup
  • lxd/storage/drivers/volume: Adds allowUnsafeResize bool to Volume struct
  • lxd/storage/backend/lxd: Adds cannot shrink error handling in CreateInstanceFromBackup
  • lxd/storage/drivers/generic/vfs: Sets block volume size to file size of volume in tarball in genericVFSBackupUnpack
  • lxd/storage/drivers/driver/btrfs/volumes: No need to move GPT header if no filler used in CreateVolume
  • lxd/storage/drivers/driver/btrfs/volumes: Skip GPT header move in SetVolumeQuota when allowUnsafeResize is enabled
  • lxd/storage/drivers/driver/dir/volumes: Skip GPT header move in SetVolumeQuota when allowUnsafeResize is enabled
  • lxd/storage/drivers/driver/lvm/volumes: Allow unsafe shrinking when allowUnsafeResize is enabled
  • lxd/storage/drivers/driver/zfs/volumes: Allow unsafe shrinking when allowUnsafeResize is enabled
  • Merge pull request #7280 from tomponline/tp-storage-createfromcopy
  • lxd/storage/drivers/driver/ceph/volumes: Allow unsafe shrinking when allowUnsafeResize is enabled
  • Merge pull request #7282 from tomponline/tp-storage-backuprestore-size
  • Merge pull request #7270 from tomponline/tp-storage-image-regeneration-ceph
  • lxd/db: Rename InstanceNames to GetInstanceNames
  • lxd/db: Rename ContainerNodeAddress to GetNodeAddressOfInstance
  • lxd/db: Rename ContainersListByNodeAddress to GetInstanceNamesByNodeAddress
  • lxd/db: Rename ContainersByNodeName to GetInstanceToNodeMap
  • lxd/db: Rename ContainerNodeMove to UpdateInstanceNode
  • lxd/db: Rename ContainerNodeProjectList to GetLocalInstancesInProject
  • lxd/db: Rename ContainerConfigInsert to CreateInstanceConfig
  • lxd/db: Rename ContainerConfigUpdate to UpdateInstanceConfig
  • lxd/db: Rename InstanceRemove to RemoveInstance
  • lxd/db: Rename ContainerProjectAndName to GetInstanceProjectAndName
  • lxd/db: Rename ContainerConfigClear to DeleteInstanceConfig
  • lxd/db: Rename ContainerConfigGet to GetInstanceConfig
  • lxd/db: Rename ContainerConfigRemove to DeleteInstanceConfigKey
  • lxd/db: Rename ContainerSetStateful to UpdateInstanceStatefulFlag
  • lxd/db: Rename ContainerProfilesInsert to AddProfilesToInstance
  • lxd/db: Drop unused ContainerProfiles
  • lxd/db: Drop unused ContainerConfig
  • lxd/db: Remove unused ContainersNodeList
  • lxd/db: Rename ContainersResetState to ResetInstancesPowerState
  • lxd/db: Rename ContainerSetState to UpdateInstancePowerState
  • lxd/db: Rename ContainerUpdate to UpdateInstance
  • lxd/db: Rename InstanceSnapshotCreationUpdate to UpdateInstanceSnapshotCreationDate
  • lxd/db: Rename ContainerLastUsedUpdate to UpdateInstanceLastUsedDate
  • lxd/db: Rename ContainerGetSnapshots to GetInstanceSnapshotsNames
  • lxd/db: Rename ContainerNextSnapshot to GetNextInstanceSnapshotIndex
  • lxd/db: Rename InstancePool to GetInstancePool
  • lxd/db: Rename ContainerBackupID to getInstanceBackupID
  • Rename ContainerGetBackup to GetInstanceBackup
  • lxd/db: Rename InstanceCreateBackup to CreateInstanceBackup
  • lxd/db: Rename InstanceBackupRemove to DeleteInstanceBackup
  • lxd/db: ContainerBackupRename to RenameInstanceBackup
  • lxd/db: Rename ContainerBackupsGetExpired to GetExpiredInstanceBackups
  • lxd/storage/drivers/utils: Updates roundVolumeBlockFileSizeBytes and ensureVolumeBlockFile to take size as bytes
  • lxd/storage/drivers/generic/vfs: Updates genericVFSResizeBlockFile to accept size as bytes
  • lxd/storage/drivers/driver/btrfs/utils: Adds volumeSize function
  • lxd/storage/drivers/driver/btrfs/volumes: Updates CreateVolume to use volumeSize()
  • lxd/storage/drivers/driver/btrfs/volumes: Updates SetVolumeQuota to be byte oriented internally
  • lxd/storage/drivers/driver/ceph/utils: Updates volumeSize comment for consistency
  • lxd/storage/drivers/driver/ceph/volumes: Updates CreateVolumeFromCopy to use volumeSize()
  • lxd/storage/drivers/driver/ceph/volumes: Updates SetVolumeQuota to be byte oriented internally
  • lxd/storage/drivers/driver/dir/utils: Adds volumeSize function
  • lxd/storage/drivers/driver/dir/volumes: Updates CreateVolume to use volumeSize
  • lxd/storage/drivers/driver/dir/volumes: Updates SetVolumeQuota to be byte oriented internally
  • lxd/storage/drivers/driver/lvm/utils: Updates copyThinpoolVolume to use volumeSize()
  • lxd/storage/drivers/driver/lvm/volumes: Updates SetVolumeQuota variables and comments
  • lxd/storage/drivers/driver/zfs/utils: Adds volumeSize function
  • lxd/storage/drivers/driver/zfs/volumes: Updates CreateVolume to use volumeSize()
  • lxd/storage/drivers/driver/zfs/volumes: Updates CreateVolumeFromCopy to use volumeSize()
  • lxd/storage/drivers/driver/zfs/volumes: Updates SetVolumeQuota to be byte oriented internally
  • Merge pull request #7281 from freeekanayaka/cleanup-db-function-names
  • lxd/db: Rename DevicesAdd to AddDevicesToEntity
  • lxd/storage/backend/lxd: Detect cached image filesystem changes for VM images too
  • lxd/db: Remove unused Devices
  • lxd/db: Rename ImagesGetLocal to GetLocalImages
  • lxd/db: Rename ImagesGet to GetImages
  • lxd/db: Rename ImagesGetExpired to GetExpiredImages
  • lxd/db: Rename ImageSourceInsert to CreateImageSource
  • lxd/db: Rename ImageSourceGet to GetImageSource
  • lxd/db: Rename ImageGet to GetImage
  • lxd/db: Rename ImageGetFromAnyProject to GetImageFromAnyProject
  • lxd/db: Rename ImageLocate to LocateImage
  • lxd/db: Rename ImageAssociateNode to AddImageToLocalNode
  • lxd/db: Rename ImageDelete to DeleteImage
  • lxd/db: Rename ImageAliasesGet GetImageAliases
  • lxd/db: Rename ImageAliasGet to GetImageAlaias
  • lxd/db: Rename ImageAliasRename to RenameImageAlias
  • lxd/db: Rename ImageAliasDelete to DeleteImageAlias
  • lxd/db: Rename ImageAliasesMove to MoveImageAlias
  • lxd/db: Rename ImageAliasAdd to CreateImageAlias
  • lxd/db: Rename ImageAliasUpdate to UpdateImageAlias
  • lxd/db: Rename ImageCopyDefaultProfiles to CopyDefaultImageProfiles
  • lxd/db: Rename ImageLastAccessUpdate to UpdateImageLastUseDate
  • lxd/db: Rename ImageLastAccessInit to InitImageLastUseDate
  • lxd/db: Rename ImageUpdate to UpdateImage
  • lxd/db: Rename ImageInsert to CreateImage
  • lxd/db: Rename ImageGetPools to GetPoolsWithImage
  • lxd/db: Rename ImageGetPoolNamesFromIDs to GetPoolNamesFromIDs
  • lxd/db: Rename ImageUploadedAt to UpdateImageUploadDate
  • lxd/db: Rename ImagesGetOnCurrentNode to GetImagesOnLocalNode
  • lxd/db: Rename ImagesGetByNodeID to GetImagesOnNode
  • lxd/db: Replace ImageGetNodesWithImage with GetNodesWithImage
  • lxd/db: Rename ImageGetNodesWithoutImage to GetNodesWithoutImage
  • lxc/image: Actually refresh multiple images
  • Merge pull request #7286 from freeekanayaka/cleanup-db-function-names-part-2
  • Merge pull request #7288 from stgraber/master
  • Merge pull request #7285 from tomponline/tp-storage-filesystem-regen
  • Merge pull request #7283 from tomponline/tp-storage-volsize-consistency
  • lxd/resources: Use permanent MAC when available
  • Merge pull request #7290 from stgraber/master
  • lxd/qemu: Restrict NUMA layout to x86_64
  • Merge pull request #7293 from stgraber/master
  • Consider all nodes when looking for the leader, not only voters
  • Only attempt to transfer leadership if we are not standalone
  • Merge pull request #7297 from freeekanayaka/try-all-nodes-when-looking-for-leader
  • lxd/db: Rename NetworksNodeConfig to GetNetworksLocalConfig
  • lxd/db: Rename NetworkIDsNotPending to GetNonPendingNetworkIDs
  • lxd/db: Rename NetworkID to GetNetworkID
  • lxd/db: Rename NetworkConfigAdd to CreateNetworkConfig
  • lxd/db: Rename Networks to GetNetworks
  • lxd/db: Rename NetworksNotPending to GetNonPendingNetworks
  • lxd/db: Rename NetworksNotPending to GetNonNetworks
  • lxd/db: Rename NetworkGetInterface to GetNetworkWithInterface
  • lxd/db: Rename NetworkConfig to getNetworkConfig
  • lxd/db: Rename NetworkCreate to CreateNetwork
  • lxd/db: Rename NetworkUpdate to UpdateNetwork
  • lxd/db: Rename NetworkConfigClear to clearNetworkConfig
  • lxd/db: Rename NetworkDelete to DeleteNetwork
  • lxd/db: Rename NetworkRename to RenameNetwork
  • lxd/db: Rename NetworkNodeConfigKeys to NodeSpecificNetworkNodeConfig
  • Merge pull request #7299 from freeekanayaka/cleanup-db-function-names-part-3
  • lxd/daemon: Detect nodev and improve errors
  • Merge pull request #7300 from stgraber/master
  • lxd/db: Rename NodeByAddress to GetNodeByAddress
  • lxd/db: Rename NodePendingByAddress to GetPendingNodeByAddress
  • lxd/db: Rename NodeByName to GetNodeByName
  • lxd/db: Rename NodeName to GetLocalNodeName
  • lxd/db: Rename NodeAddress to GetLocalNodeAddress
  • lxd/db: Rename Nodes to GetNodes
  • lxd/db: Rename NodesCount to GetNodesCount
  • lxd/db: Rename NodeRename to RenameNode
  • lxd/db: Rename NodeAdd to CreateNode
  • lxd/db: Rename NodeAddWithArch to CreateNodeWithArch
  • lxd/db: Rename NodePending to SetNodePendingFlag
  • lxd/db: Rename NodeUpdate to UpdateNode
  • lxd/db: Rename NodeAddRole to CreateNodeRole
  • lxd/db: Rename NodeRemoveRole to RemoveNodeRole
  • lxd/db: Rename NodeUpdateRoles to UpdateNodeRoles
  • lxd/db: Rename NodeRemove to RemoveNode
  • lxd/db: Rename NodeHeartbeat to SetNodeHeartbeat
  • lxd/db: Rename NodeOfflineThreshold to GetNodeOfflineThreshold
  • lxd/db: Rename NodeClear to ClearNode
  • lxd/db: Rename NodeWithLeastContainers to GetNodeWithLeastInstances
  • lxd/db: Rename NodeUpdateVersion to SetNodeVersion
  • lxd/db: Rename Operations to GetLocalOperations
  • lxd/db: Rename OperationsUUIDs to GetLocalOperationsUUIDs
  • lxd/db: Rename OperationNodes to GetNodesWithRunningOperations
  • lxd/db: Rename OperationByUUID to GetOperationByUUID
  • lxd/db: Rename OperationAdd to CreateOperation
  • lxd/db: Rename OperationRemove to RemoveOperation
  • lxd/db: Rename OperationFlush to removeNodeOperations
  • lxd/db: Rename Patches to GetAppliedPatches
  • lxd/db: Rename PatchesMarkApplied to MarkPatchAsApplied
  • lxd/db: Rename Profiles to GetProfileNames
  • lxd/db: Rename ProfileGet to GetProfile
  • lxd/db: Rename ProfilesGet to GetProfiles
  • lxd/db: Drop ProfileConfig
  • lxd/db: Rename ProfileDescriptionUpdate to UpdateProfileDescription
  • lxd/db: Rename ProfileConfigClear to ClearProfileConfig
  • lxd/db: Rename ProfileConfigAdd to CreateProfileConfig
  • lxd/db: Rename ProfileContainersGet to GetInstancesWithProfile
  • lxd/db: Rename ProfileCleanupLeftover to RemoveUnreferencedProfiles
  • lxd/db: Rename ProfilesExpandConfig to ExpandInstanceConfig
  • lxd/db: Rename ProfilesExpandDevices to ExpandInstanceDevices
  • Merge pull request #7302 from freeekanayaka/rename-db-function-names-part4
  • lxd/storage/drivers/generic/vfs: Dont require access to block device when excluding root image file from rsync in genericVFSMigrateVolume
  • lxd/storage/drivers/driver/zfs/volumes: Updates MigrateVolume to avoid need to premount snapshot volume
  • Merge pull request #7304 from tomponline/tp-storage-zfs-migration
  • ethtool: add ethtoolGset() helper
  • test/suites/storage/volume/attach: Adds test for custom volume root perm persistence
  • lxd/storage/drivers: Fixes custom volume root mount perm issue for BTRFS and DIR
  • lxc/storage/drivers/volume: Removes keepDevice from Volume
  • lxd/storage/drivers/driver/ceph/volumes: Removes keepDevice usage
  • lxc/storage/drivers/driver/ceph/volumes: Mount changes
  • lxd/storage/drivers/driver/ceph/volumes: UnmountVolume modifications
  • lxd/storage/drivers/driver/ceph/volumes: Esnure permission on volume root set in CreateVolume
  • lxd/resources: Skip NVME multipath entries
  • lxd/db: Rename ProjectNames to GetProjectNames
  • lxd/db: Rename ProjectMap to GetProjectIDsToNames
  • lxd/db: Rename ProjectUpdate to UpdateProject
  • Merge pull request #7310 from tomponline/tp-storage-customvol-chmod
  • lxd/db: Rename ProjectLaunchWithoutImages to InitProjectWithoutImages
  • lxd/db: Rename RaftNodes to GetRaftNodes
  • lxd/db: Rename RaftNodeAddresses to GetRaftNodeAddresses
  • lxd/db: Rename RaftNodeAddress to GetRaftNodeAddress
  • lxd/db: Rename RaftNodeFirst to CreateFirstRaftNode
  • lxd/db: Rename RaftNodeAdd to CreateRaftNode
  • lxd/db: Rename RaftNodeDelete to RemoveRaftNode
  • lxd/db: Rename RaftNodesReplace to ReplaceRaftNodes
  • lxd/db: Rename InstanceSnapshotConfigUpdate to UpdateInstanceSnapshotConfig
  • lxd/db: Rename InstanceSnapshotID to GetInstanceSnapshotID
  • lxd/db: Rename StoragePoolsNodeConfig to GetStoragePoolsLocalConfig
  • lxd/db: Rename StoragePoolID to GetStoragePoolID
  • lxd/db: Rename StoragePoolDriver to GetStoragePoolDriver
  • lxd/db: Rename StoragePoolIDsNotPending to GetNonPendingStoragePoolsNamesToIDs
  • lxd/db: Rename StoragePoolNodeJoin to UpdateStoragePoolAfterNodeJoin
  • lxd/db: Rename StoragePoolConfigAdd to CreateStoragePoolConfig
  • lxd/db: Rename StoragePoolNodeConfigs to GetStoragePoolNodeConfigs
  • lxd/db: Rename StoragePools to GetStoragePoolNames
  • lxd/db: Rename StoragePoolsNotPending to GetNonPendingStoragePoolNames
  • lxd/db: Rename StoragePoolsGetDrivers to GetStoragePoolDrivers
  • lxd/db: Rename StoragePoolGetID to GetStoragePoolID
  • lxd/db: Rename StoragePoolGet to GetStoragePool
  • lxd/db: Rename StoragePoolConfigGet to getStoragePoolConfig
  • lxd/db: Rename StoragePoolCreate to CreateStoragePool
  • lxd/db: Rename StoragePoolUpdate to UpdateStoragePool
  • Merge pull request #7314 from stgraber/master
  • lxd/db: Rename StoragePoolConfigClear to clearStoragePoolConfig
  • lxd/db: Rename StoragePoolDelete to RemoveStoragePool
  • lxd/db: Rename StoragePoolVolumesGetNames to GetStoragePoolVolumesNames
  • lxd/db: Rename StoragePoolVolumesGetAllByType to GetStoragePoolVolumesWithType
  • lxd/db: Rename StoragePoolVolumesGet to GetStoragePoolVolumes
  • lxd/db: Rename StoragePoolNodeVolumesGet to GetLocalStoragePoolVolumes
  • lxd/db: Rename StoragePoolVolumeSnapshotsGetType to GetLocalStoragePoolVolumeSnapshotsWithType
  • lxd/db: Rename StoragePoolNodeVolumesGetType to GetLocalStoragePoolVolumesWithType
  • lxd/db: Rename StoragePoolNodeVolumeGetTypeByProject to GetLocalStoragePoolVolume
  • lxd/db: Rename StoragePoolVolumeUpdateByProject to UpdateStoragePoolVolume
  • lxd/db: Rename StoragePoolVolumeDelete to RemoveStoragePoolVolume
  • lxd/db: Rename StoragePoolVolumeRename to RenameStoragePoolVolume
  • lxd/db: Rename StoragePoolVolumeCreate to CreateStoragePoolVolume
  • lxd/db: Rename StoragePoolNodeVolumeGetTypeIDByProject to GetStoragePoolNodeVolumeID
  • lxd/db: Rename StoragePoolInsertZfsDriver to FillMissingStoragePoolDriver
  • Merge pull request #7312 from tomponline/tp-storage-ceph-shrink
  • Merge pull request #7315 from freeekanayaka/rename-db-function-names-part-5
  • lxd/storage/zfs: Use TryUnmount
  • Merge pull request #7317 from stgraber/master
  • Support two-phase creation of a storage pool on single-node cluster
  • Merge pull request #7325 from freeekanayaka/storage-creation-on-single-node
  • lxd/storage/drivers/driver/btrfs/utils: Adds setSubvolumeReadonlyProperty function
  • lxd/storag/drivers/driver/btrfs/volumes: Removes readonly argument from snapshotSubvolume
  • lxd/storage/drivers/driver/btrfs: d.setSubvolumeReadonlyProperty and d.snapshotSubvolume usage
  • lxd/db: Rename StoragePoolVolumeGetType to GetStoragePoolVolume
  • lxd/db: Rename StoragePoolVolumeSnapshotCreate to CreateStorageVolumeSnapshot
  • lxd/db: Rename StoragePoolVolumeSnapshotUpdateByProject to UpdateStoragePoolVolumeSnapshot
  • lxd/db: Rename StorageVolumeSnapshotExpiryGet to GetStorageVolumeSnapshotExpiry
  • lxd/db: Rename StorageVolumeSnapshotsGetExpired to GetExpiredStorageVolumeSnapshots
  • resources/ethtool: implement ETHTOOL_GLINKSETTINGS
  • lxd/storage/drivers/driver/btrfs/utils: Adds getSubvolumesMetaData function
  • lxd/storage/drivers/driver/btrfs/volumes: Maintain subvolume readonly state in snapshot
  • lxd/storage/driversr/driver/btrfs/utils: Allow ro subvolumes to be deleted in deleteSubvolume
  • lxd/storag/drivers/driver/btrfs/volumes: Updates MigrateVolume to send subvolumes
  • lxd/storage/drivers/driver/btrfs/volumes: Fail backup when cleanup fails in BackupVolume
  • lxd/storage/drivers/driver/btrfs/volumes: Better naming of variables in unpackVolume
  • lxd/migration/migrate/proto: Adds BTRFS Features to offer header
  • lxd/migration/utils: Adds GetBtrfsFeaturesSlice function
  • lxd/migration/migration/volumes: Adds BTRFS feature support to TypesToHeader
  • lxd/migration/migration/volumes: Adds BTRFS feature support to MatchTypes
  • lxd/storage/drivers/driver/btrfs: Adds BTRFS features to MigrationTypes
  • lxd/storage/memorypipe: Dont make ioutil.ReadAll panic on cancel
  • lxd/storage/drivers/driver/btrfs/utils: Kill btrfs send on error in sendSubvolume
  • lxd/storage/drivers/driver/btrfs/utils: Support subvolumes in receiveSubvolume
  • lxd/storage/drivers/driver/btrfs/utils: Adds metadataHeader function
  • lxd/storage/drivers/driver/btrfs/volumes: Updates CreateVolumeFromMigration to receive subvolumes
  • Merge pull request #7327 from brauner/2020-05-06/ethtool
  • Merge pull request #7326 from tomponline/tp-storage-btrfs-snapshot
  • lxd/db: Rename StorageVolumeNodeAddresses to GetStorageVolumeNodeAddresses
  • lxd/db: Rename StorageVolumeDescriptionGet to GetStorageVolumeDescription
  • lxd/db: Rename StorageVolumeNextSnapshot to GetNextStorageVolumeSnapshotIndex
  • lxd/db: Rename StorageVolumeCleanupImages to RemoveStorageVolumeImages
  • lxd/db: Rename StorageVolumeMoveToLVMThinPoolNameKey to UpgradeStorageVolumConfigToLVMThinPoolNameKey
  • lxd/db: Update naming pattern for generated database code
  • Merge pull request #7316 from tomponline/tp-storage-btrfs-subvols
  • Merge pull request #7328 from freeekanayaka/rename-db-function-names-part-6
  • client/lxd_images: Fix backward compatibility
  • Merge pull request #7329 from stgraber/master
  • lxd/storage/btrfs: Fix migration from snapshot
  • Merge pull request #7330 from stgraber/master
  • i18n: Update translations from weblate

Try it for yourself

This new LXD release is already available for you to try on our demo service.

Downloads

The release tarballs can be found on our download page.

Binary builds are also available for:

  • Linux: snap install lxd
  • MacOS: brew install lxc
  • Windows: choco install lxc

LXD 4.0.1 LTS has been released

21st of April 2020

Introduction

The LXD team is pleased to announce the release of LXD 4.0.1!

This is the first bugfix release for LXD 4.0 which is supported until June 2025.

Bugfixes and improvements

This release fixes a number of issues that were reported shortly following the original 4.0.0 release.

Some of the highlights include:

  • Tweaked and improved the resources API
    • NUMA node tracked on a per core basis
    • Support for CPUs using the die_id kernel attribute
    • DMI information now available in a system section
  • Added os and os_version to Environment data in /1.0
  • Added lxd cluster remove-raft-node disaster recovery function
  • Improved activateifneeded to consider VMs and scheduled snapshots
  • Improved sorting order in the command line tool to improve numbered entries
  • Implemented ceph rbd/fs disk devices can now be attached to virtual machines
  • Fixed some data migration issues for users of < 3.0 upgrading to 4.0 directly
  • Fixed file descriptor leakage in exec

The full list of commits is available below:

  • doc/instances: Fix escaping
  • lxc/network: Updates network detach checks to use bridged network property
  • lxd/network/network/utils: Updates network setting detection in IsInUse
  • lxd/instance/drivers/driver/qemu: Adds host_name info to RenderState when lxd-agent is running
  • lxd/networks: Fix clustered configs
  • shared/api: Move NUMANode to thread
  • lxd/resources: Set NUMANode on a per-thread basis
  • lxc/info: Update for NUMANode on thread
  • i18n: Update translation templates
  • api: resources_cpu_threads_numa
  • api: resources_cpu_core_die
  • lxd/resources: Parse and report die_id
  • lxd/storage/drivers/driver/lvm/volumes: Mount xfs snapshot with nouuid option
  • lxd/storage/drivers/driver/ceph/volumes: Adds mounting logging
  • lxd/instance/drivers/driver/lxc: Updates Render() to accept options arguments
  • lxd/instance/drivers/driver/qemu: Updates Render() to accept options arguments
  • lxd/instance/instance/interface: Updates Render() to accept options arguments
  • lxd/storage/drivers/utils: Zeros btrfs transaction log in regenerateFilesystemBTRFSUUID
  • lxd/storage/utils: Removes unused functions and constants
  • lxd/storage/utils: Adds RenderSnapshotUsage function
  • lxd/instance/snapshot: Adds storagePools.RenderSnapshotUsage to Render() in containerSnapshotsGet and snapshotGet
  • lxd/instance/drivers/driver/lxc: Use storagePools.RenderSnapshotUsage in RenderFull()
  • lxd/instance/drivers/driver/qemu: Use storagePools.RenderSnapshotUsage in RenderFull()
  • lxd/instance/instance/utils: Removes unused WriteBackupFile
  • lxd/storage/drivers/utils: Changes regenerateFilesystemUUID to use expanded arg definitions
  • lxd/storage/drivers/driver/ceph/utils: Changes generateUUID to not map device
  • lxd/storage/drivers/driver/ceph/volumes: d.generateUUID updated signature usage
  • lxd/storage/drivers/driver/ceph/volumes: Adds BTRFS UUID regeneration to MountVolumeSnapshot
  • lxd/storage/drivers/driver/zfs/volumes: Comment clarification
  • lxd/storage/drivers/volume: Adds support for setting custom mount path
  • lxd/storage/drivers/driver/btrfs/volumes: Create temporary snapshot in BackupVolume()
  • lxd/storage/drivers/driver/btrfs/volumes: Renames container vars to instance
  • lxd/storage/drivers/driver/btrfs/volumes: Consistent quoting of error message variables
  • lxd/instance/drivers: Removes storagePools.RenderSnapshotUsage from RenderFull()
  • lxd/storage/drivers/driver/zfs/volumes: Create temporary snapshot in BackupVolume()
  • lxd/storage/backend/lxd: Checks for existance of volume before deleting
  • lxd/instance: Switches to revert package for instanceCreateAsSnapshot
  • lxd/storage/backend/lxd: Comment tweak
  • lxd/storage/drivers/driver/ceph/volumes: Tweaks HasVolume detection
  • shared/subprocess/proc: Fixes race in process stopping
  • lxd/main_activateifneeded: s/container/instance/
  • lxd/main_activateifneeded: Retrieve all instances
  • lxd/main_activateifneeded: Check for scheduled instance snapshots
  • lxd/main_activateifneeded: Check for scheduled volume snapshots
  • test/suites/basic: Update activateifneeded tests
  • lxd/main_activateifneeded: Use defer statement to close db
  • lxd/storage/btrfs: Workaround permission issue
  • lxd/cluster: add RemoveRaftNode() to force removing a raft node
  • api: Add "DELETE /internal/cluster/raft/
    " endpoint
  • Increase timeout when calling dqlite.Client.Add() to join the cluster
  • lxd/storage/drivers/driver/zfs/volumes: Comment
  • lxd/storage/drivers/driver/lvm/volumes: Always return -1/ErrNotSupported for snapshot usage
  • lxd/storage/drivers/driver/dir/volumes: Always return -1/ErrNotSupported for snapshot usage
  • lxd/storage/drivers/driver/zfs/volumes: Always used 'used' property for ZFS snapshot usage
  • lxd/storage/drivers/driver/cephfs/volumes: Always return -1/ErrNotSupported for snapshot usage
  • lxd/storage/drivers/driver/btrfs/volumes: Return -1/ErrNotSupported when no quota available
  • lxd/instance: Fix typo in comment
  • lxc/action: Fix typo in help message
  • i18n: Update translation templates
  • lxd: Add "lxd cluster remove-raft-node" recovery command
  • doc: Add paragraph about "lxd cluster remove-raft-node"
  • test: Add test exercising "lxd cluster remove-raft-node"
  • lxd/storage/lvm: Always call vgchange on mount
  • lxd/patches: Fix snapshot migration
  • tests: Fix btrfs storage usage
  • lxd/storage/drivers/volume: Only chmod if needed in EnsureMountPath
  • lxd/storage/drivers/volume: Removes unnecessary variable
  • lxd/storage/drivers/driver/zfs/volumes: Ensure volumes created from copy have correct perms
  • lxd/storage/drivers: Call EnsureMountPath() in MountVolume()
  • lxd/storage/drivers: Call EnsureMountPath() in MountVolumeSnapshot()
  • lxd/storage/drivers/driver/btrfs/volumes: Adds revert to CreateVolume
  • lxd/storage/drivers/driver/btrfs/volumes: Comment in CreateVolumeFromCopy
  • lxd/storage/drivers/driver/lvm/utils: EnsureMountPath after copying thin volume
  • lxd/storage/drivers/driver/cephfs/volumes: typo
  • lxd/storage/drivers/driver/cephfs/volumes: Calls vol.EnsureMountPath after filling
  • lxd/storage/drivers/driver/ceph/volumes: Calls EnsureMountPath to fix perms after copying volume
  • lxd/storage/drivers/driver/lvm/volumes: Fixes temporary snapshot volume cleanup for VMs
  • lxd/storagr/drivers/driver/ceph/volumes: Adds support for snapshot usage reporting
  • lxd/storage/drivers/driver/lvm/volumes: Clarifies comments on LVM volume usage reporting
  • shared/osarch: Coding style
  • shared/osarch: Don't fail on missing os-release
  • shared/api: Add OS information
  • lxd/api: Add OS information
  • api: Add api_os
  • lxc: Use natural string sorting
  • lxc: Group snapshot and parent
  • lxd/main: Move forkzfs mntns to cgo
  • doc/networks: Adds note about firewalld and DHCP/DNS
  • lxd/device/nic/routed: Improves validation of sysctl settings when using vlan option
  • lxd/device/nic/routed: Corrects misleading error message when setting sysctls
  • lxd/storage/drivers/generic/vfs: Log when creating snapshots
  • lxd/storage/drivers/driver/zfs/volumes: Fix migrating VM block volumes in MigrateVolume
  • lxd/storage/memorypipe: Adds context support for cancellation
  • lxd/storage/backend/lxd: memorypipe cancellation usage
  • lxd/device/nic/sriov: Updates networkGetVirtFuncInfo to use json output from ip tool
  • doc: Add missing os_api extension
  • lxd/storage/drivers/driver/dir/utils: Removes default project quota
  • forkexec: mark fd cloexec so the attaching process doesn't inherit it
  • forkexec: close all inherited fds
  • forkexec: log unexpected fds
  • lxd/daemon: Ignore .zfs in volumes
  • lxd/network: Push MTU over DHCP
  • shared/api: Drop invalid Managed key in NetworksPost
  • lxd: Drop invalid use of Managed property
  • lxd/devices/disk: Prevent recursive & readonly
  • lxc/instance/drivers: Set new name before renaming backups
  • test: Extend backup rename
  • lxd/instance/drivers: Add revert steps when renaming instance
  • lxd/instance/drivers/driver/qemu: Allow up to 8 NIC devices
  • lxd/instance/drivers/driver/qemu/templates: Note that lxd_ disk device name prefix should not be changed
  • doc/instances: Clarify config conditions
  • doc/index: Clarify bind-mount in FAQ
  • lxd/instances: Better use userRequested on Update
  • lxd/device/nic/routed: Fix sysctl command suggestion when using vlans
  • lxd/device/nic/ipvlan: Improve validation of sysctl settings when vlan setting used
  • test/clustering: increase timing to detect offline node
  • shared/version/api: Add resources_system API extension
  • doc/api-extensions: Add resources_system
  • shared/api/resource: Add system resources
  • lxd/resources: Add new system resources
  • lxd/resources: Retrieve system information
  • shared/util: Never look into the snap
  • lxd/resources: serial/uuid may not be accessible
  • doc/instances: Fixes default ceph.cluster_name value
  • lxd/device/disk: Adds support to use ceph: prefix for disk source for VMs
  • firewalld & lxd : how to let Firewalld control the LXD's iptables rules this is related to https://github.com/lxc/lxd/pull/7195 but this a bit more generic
  • Update networks.md
  • doc/networks: Fix typo
  • i18n: Update translations from weblate
  • Update networks.md
  • lxd/storage/ceph: Suppport alternate conf syntax
  • lxd/init: Try to bind LXD network address when running interactively
  • lxd/instance/drivers/driver/qemu/templates: Use static PCIe address prefix for 9p devices
  • lxd/instance/drivers/drivers/qemu: Adds support for 9p disk device PCIe indexes
  • lxd/device/nic/bridged: Dont load br_netfilter
  • doc/instances: Fix swapped description
  • index.md: add PATH env variable to sudo command example
  • shared/simplestreams: Fix VM image preference
  • lxd/devoce/device/utils/disk: Comment on diskCephfsOptions
  • lxd/device/disk: Adds cephfs support for VMs
  • lxd/device/proxy: Check for br_netfilter enabled and log warning if not
  • lxd/firewall/drivers/driver/xtables: Adds MASQUERADE hairpin proxy NAT rule
  • lxd/firewall/drivers/drivers/xtables: comments
  • lxd/device/proxy: Sets bridge port hairpin mode on when br_netfilter loaded
  • lxd/firewall/drivers/drivers/xtables: Renames toDest to connectDest
  • lxd/firewall/drivers/drivers/nftables: Renames toDest to connectDest
  • lxd/init: Improve error messages when failing to bind an address
  • lxd/firewall/drivers/drivers/nftables: Adds MASQUERADE hairpin proxy NAT rule
  • test/suites/container/devices/proxy: Updates tests for checking hairpin rule
  • lxd/instance/drivers/driver/qemu: Wait for onStop when restarting
  • lxd/instance/drivers/driver/qemu: Makes onStop unexported
  • lxd/instance/drivers/driver/qemu: Comment
  • lxd/instance/lxc: Don't crash in setNetworkPriority
  • lxd/instances: Export type to templates
  • lxd-agent: Reboot after cloud-init seed
  • lxd/util: Tweak NetworkInterfaceAddress to only return global
  • lxd/net/util: Updates comment on NetworkInterfaceAddress behaviour change
  • shared/usbid: Use system database

Try it for yourself

This new LXD release is already available for you to try on our demo service.

Downloads

The release tarballs can be found on our download page.

Binary builds are also available for:

  • Linux: snap install lxd
  • MacOS: brew install lxc
  • Windows: choco install lxc

LXD 4.0 LTS has been released

31st of March 2020

Introduction

The LXD team is very excited to announce the release of LXD 4.0 LTS!

This is the 3rd LTS release for LXD and a very busy and exciting one! The changelog below is split so that both users of LXD 3.23 and LXD 3.0 can see what we have in store for them.

As with all our other LTS releases, this one will be supported for 5 years (June 2025) and will receive a number of bugfix and security point releases over that time.

As for LXD 3.0, we're hoping to release one last bugfix release as 3.0.5 in the near future before we enter security-only maintenance mode for its remaining 3 years.

Enjoy!

Breaking changes

Removal of --container-only, replaced by --instance-only

Our only CLI breaking changes with this release is the replacement of --container-only by --instance-only. Those following the feature releases will have had both supported for a few months now. With the 4.0 release, we're removing the deprecated ones.

Highlights for 3.23 users

virtual machines: Support for backup (import/export)

It is now possible to use lxc export and lxc import with virtual machines.

A word of caution however. Virtual machines, unlike containers are only accessible as a large block device. This means that several GB of data will need to be read and compressed, no matter how much is actually used inside the VM.

This can lead to long export times and similarly long import times.

Doing so with --optimized on a backend like ZFS should considerably reduce the export time, assuming the backup is to be imported on a storage pool of the same type.

resources: PCI and USB devices in the resource API

The resources API (/1.0/resources) has been extended with a list of all PCI and USB devices on the system. This is of particular use when dealing with VFIO passthrough to virtual machines or passing through USB devices to containers.

stgraber@castiana:~$ lxc query /1.0/resources | jq .pci
{
  "devices": [
    {
      "driver": "skl_uncore",
      "driver_version": "5.4.0-18-generic",
      "numa_node": 0,
      "pci_address": "0000:00:00.0",
      "product": "Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers",
      "product_id": "5904",
      "vendor": "Intel Corporation",
      "vendor_id": "8086"
    },
    {
      "driver": "i915",
      "driver_version": "5.4.0-18-generic",
      "numa_node": 0,
      "pci_address": "0000:00:02.0",
      "product": "HD Graphics 620",
      "product_id": "5916",
      "vendor": "Intel Corporation",
      "vendor_id": "8086"
    },
    {
      "driver": "",
      "driver_version": "",
      "numa_node": 0,
      "pci_address": "0000:00:08.0",
      "product": "Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th/8th Gen Core Processor Gaussian Mixture Model",
      "product_id": "1911",
      "vendor": "Intel Corporation",
      "vendor_id": "8086"
    },
    {
      "driver": "xhci_hcd",
      "driver_version": "5.4.0-18-generic",
      "numa_node": 0,
      "pci_address": "0000:00:14.0",
      "product": "Sunrise Point-LP USB 3.0 xHCI Controller",
      "product_id": "9d2f",
      "vendor": "Intel Corporation",
      "vendor_id": "8086"
    },
    {
      "driver": "intel_pch_thermal",
      "driver_version": "5.4.0-18-generic",
      "numa_node": 0,
      "pci_address": "0000:00:14.2",
      "product": "Sunrise Point-LP Thermal subsystem",
      "product_id": "9d31",
      "vendor": "Intel Corporation",
      "vendor_id": "8086"
    },
    {
      "driver": "mei_me",
      "driver_version": "5.4.0-18-generic",
      "numa_node": 0,
      "pci_address": "0000:00:16.0",
      "product": "Sunrise Point-LP CSME HECI #1",
      "product_id": "9d3a",
      "vendor": "Intel Corporation",
      "vendor_id": "8086"
    },
    {
      "driver": "pcieport",
      "driver_version": "5.4.0-18-generic",
      "numa_node": 0,
      "pci_address": "0000:00:1c.0",
      "product": "Sunrise Point-LP PCI Express Root Port #1",
      "product_id": "9d10",
      "vendor": "Intel Corporation",
      "vendor_id": "8086"
    },
    {
      "driver": "pcieport",
      "driver_version": "5.4.0-18-generic",
      "numa_node": 0,
      "pci_address": "0000:00:1c.2",
      "product": "Sunrise Point-LP PCI Express Root Port #3",
      "product_id": "9d12",
      "vendor": "Intel Corporation",
      "vendor_id": "8086"
    },
    {
      "driver": "pcieport",
      "driver_version": "5.4.0-18-generic",
      "numa_node": 0,
      "pci_address": "0000:00:1c.4",
      "product": "Sunrise Point-LP PCI Express Root Port #5",
      "product_id": "9d14",
      "vendor": "Intel Corporation",
      "vendor_id": "8086"
    },
    {
      "driver": "pcieport",
      "driver_version": "5.4.0-18-generic",
      "numa_node": 0,
      "pci_address": "0000:00:1d.0",
      "product": "Sunrise Point-LP PCI Express Root Port #9",
      "product_id": "9d18",
      "vendor": "Intel Corporation",
      "vendor_id": "8086"
    },
    {
      "driver": "",
      "driver_version": "",
      "numa_node": 0,
      "pci_address": "0000:00:1f.0",
      "product": "Sunrise Point LPC Controller/eSPI Controller",
      "product_id": "9d4e",
      "vendor": "Intel Corporation",
      "vendor_id": "8086"
    },
    {
      "driver": "",
      "driver_version": "",
      "numa_node": 0,
      "pci_address": "0000:00:1f.2",
      "product": "Sunrise Point-LP PMC",
      "product_id": "9d21",
      "vendor": "Intel Corporation",
      "vendor_id": "8086"
    },
    {
      "driver": "snd_hda_intel",
      "driver_version": "5.4.0-18-generic",
      "numa_node": 0,
      "pci_address": "0000:00:1f.3",
      "product": "Sunrise Point-LP HD Audio",
      "product_id": "9d71",
      "vendor": "Intel Corporation",
      "vendor_id": "8086"
    },
    {
      "driver": "i801_smbus",
      "driver_version": "5.4.0-18-generic",
      "numa_node": 0,
      "pci_address": "0000:00:1f.4",
      "product": "Sunrise Point-LP SMBus",
      "product_id": "9d23",
      "vendor": "Intel Corporation",
      "vendor_id": "8086"
    },
    {
      "driver": "e1000e",
      "driver_version": "3.2.6-k",
      "numa_node": 0,
      "pci_address": "0000:00:1f.6",
      "product": "Ethernet Connection (4) I219-LM",
      "product_id": "15d7",
      "vendor": "Intel Corporation",
      "vendor_id": "8086"
    },
    {
      "driver": "rtsx_pci",
      "driver_version": "5.4.0-18-generic",
      "numa_node": 0,
      "pci_address": "0000:02:00.0",
      "product": "RTS525A PCI Express Card Reader",
      "product_id": "525a",
      "vendor": "Realtek Semiconductor Co., Ltd.",
      "vendor_id": "10ec"
    },
    {
      "driver": "iwlwifi",
      "driver_version": "5.4.0-18-generic",
      "numa_node": 0,
      "pci_address": "0000:04:00.0",
      "product": "Wireless 8265 / 8275",
      "product_id": "24fd",
      "vendor": "Intel Corporation",
      "vendor_id": "8086"
    },
    {
      "driver": "nvme",
      "driver_version": "1.0",
      "numa_node": 0,
      "pci_address": "0000:05:00.0",
      "product": "SSD 600P Series",
      "product_id": "f1a5",
      "vendor": "Intel Corporation",
      "vendor_id": "8086"
    },
    {
      "driver": "pcieport",
      "driver_version": "5.4.0-18-generic",
      "numa_node": 0,
      "pci_address": "0000:06:00.0",
      "product": "JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016]",
      "product_id": "15d3",
      "vendor": "Intel Corporation",
      "vendor_id": "8086"
    },
    {
      "driver": "pcieport",
      "driver_version": "5.4.0-18-generic",
      "numa_node": 0,
      "pci_address": "0000:07:00.0",
      "product": "JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016]",
      "product_id": "15d3",
      "vendor": "Intel Corporation",
      "vendor_id": "8086"
    },
    {
      "driver": "pcieport",
      "driver_version": "5.4.0-18-generic",
      "numa_node": 0,
      "pci_address": "0000:07:01.0",
      "product": "JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016]",
      "product_id": "15d3",
      "vendor": "Intel Corporation",
      "vendor_id": "8086"
    },
    {
      "driver": "pcieport",
      "driver_version": "5.4.0-18-generic",
      "numa_node": 0,
      "pci_address": "0000:07:02.0",
      "product": "JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016]",
      "product_id": "15d3",
      "vendor": "Intel Corporation",
      "vendor_id": "8086"
    },
    {
      "driver": "pcieport",
      "driver_version": "5.4.0-18-generic",
      "numa_node": 0,
      "pci_address": "0000:07:04.0",
      "product": "JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016]",
      "product_id": "15d3",
      "vendor": "Intel Corporation",
      "vendor_id": "8086"
    },
    {
      "driver": "thunderbolt",
      "driver_version": "5.4.0-18-generic",
      "numa_node": 0,
      "pci_address": "0000:08:00.0",
      "product": "JHL6540 Thunderbolt 3 NHI (C step) [Alpine Ridge 4C 2016]",
      "product_id": "15d2",
      "vendor": "Intel Corporation",
      "vendor_id": "8086"
    },
    {
      "driver": "pcieport",
      "driver_version": "5.4.0-18-generic",
      "numa_node": 0,
      "pci_address": "0000:09:00.0",
      "product": "JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016]",
      "product_id": "15d3",
      "vendor": "Intel Corporation",
      "vendor_id": "8086"
    },
    {
      "driver": "pcieport",
      "driver_version": "5.4.0-18-generic",
      "numa_node": 0,
      "pci_address": "0000:0a:00.0",
      "product": "JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016]",
      "product_id": "15d3",
      "vendor": "Intel Corporation",
      "vendor_id": "8086"
    },
    {
      "driver": "pcieport",
      "driver_version": "5.4.0-18-generic",
      "numa_node": 0,
      "pci_address": "0000:0a:01.0",
      "product": "JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016]",
      "product_id": "15d3",
      "vendor": "Intel Corporation",
      "vendor_id": "8086"
    },
    {
      "driver": "pcieport",
      "driver_version": "5.4.0-18-generic",
      "numa_node": 0,
      "pci_address": "0000:0a:02.0",
      "product": "JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016]",
      "product_id": "15d3",
      "vendor": "Intel Corporation",
      "vendor_id": "8086"
    },
    {
      "driver": "pcieport",
      "driver_version": "5.4.0-18-generic",
      "numa_node": 0,
      "pci_address": "0000:0a:04.0",
      "product": "JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016]",
      "product_id": "15d3",
      "vendor": "Intel Corporation",
      "vendor_id": "8086"
    },
    {
      "driver": "ahci",
      "driver_version": "3.0",
      "numa_node": 0,
      "pci_address": "0000:0b:00.0",
      "product": "",
      "product_id": "0622",
      "vendor": "ASMedia Technology Inc.",
      "vendor_id": "1b21"
    },
    {
      "driver": "xhci_hcd",
      "driver_version": "5.4.0-18-generic",
      "numa_node": 0,
      "pci_address": "0000:0c:00.0",
      "product": "FL1100 USB 3.0 Host Controller",
      "product_id": "1100",
      "vendor": "Fresco Logic",
      "vendor_id": "1b73"
    },
    {
      "driver": "atlantic",
      "driver_version": "5.4.0-18-generic-kern",
      "numa_node": 0,
      "pci_address": "0000:0d:00.0",
      "product": "AQC107 NBase-T/IEEE 802.3bz Ethernet Controller [AQtion]",
      "product_id": "87b1",
      "vendor": "Aquantia Corp.",
      "vendor_id": "1d6a"
    }
  ],
  "total": 32
}

stgraber@castiana:~$ lxc query /1.0/resources | jq .usb
{
  "devices": [
    {
      "bus_address": 1,
      "device_address": 4,
      "interfaces": [
        {
          "class": "Wireless",
          "class_id": 224,
          "driver": "btusb",
          "driver_version": "0.8",
          "number": 0,
          "subclass": "Radio Frequency",
          "subclass_id": 1
        },
        {
          "class": "Wireless",
          "class_id": 224,
          "driver": "btusb",
          "driver_version": "0.8",
          "number": 1,
          "subclass": "Radio Frequency",
          "subclass_id": 1
        }
      ],
      "product": "",
      "product_id": "0a2b",
      "speed": 12,
      "vendor": "Intel Corp.",
      "vendor_id": "8087"
    },
    {
      "bus_address": 1,
      "device_address": 3,
      "interfaces": [
        {
          "class": "Video",
          "class_id": 14,
          "driver": "uvcvideo",
          "driver_version": "1.1.1",
          "number": 0,
          "subclass": "Video Control",
          "subclass_id": 1
        },
        {
          "class": "Video",
          "class_id": 14,
          "driver": "uvcvideo",
          "driver_version": "1.1.1",
          "number": 1,
          "subclass": "Video Streaming",
          "subclass_id": 2
        }
      ],
      "product": "Integrated Camera",
      "product_id": "b5ce",
      "speed": 480,
      "vendor": "Chicony Electronics Co., Ltd",
      "vendor_id": "04f2"
    },
    {
      "bus_address": 3,
      "device_address": 2,
      "interfaces": [
        {
          "class": "Audio",
          "class_id": 1,
          "driver": "snd-usb-audio",
          "driver_version": "5.4.0-18-generic",
          "number": 0,
          "subclass": "Control Device",
          "subclass_id": 1
        },
        {
          "class": "Audio",
          "class_id": 1,
          "driver": "snd-usb-audio",
          "driver_version": "5.4.0-18-generic",
          "number": 1,
          "subclass": "Streaming",
          "subclass_id": 2
        },
        {
          "class": "Audio",
          "class_id": 1,
          "driver": "snd-usb-audio",
          "driver_version": "5.4.0-18-generic",
          "number": 2,
          "subclass": "Streaming",
          "subclass_id": 2
        },
        {
          "class": "Human Interface Device",
          "class_id": 3,
          "driver": "usbhid",
          "driver_version": "5.4.0-18-generic",
          "number": 3,
          "subclass": "",
          "subclass_id": 0
        }
      ],
      "product": "TX42C500",
      "product_id": "4933",
      "speed": 12,
      "vendor": "Realtek Semiconductor Corp.",
      "vendor_id": "0bda"
    },
    {
      "bus_address": 3,
      "device_address": 13,
      "interfaces": [
        {
          "class": "Video",
          "class_id": 14,
          "driver": "uvcvideo",
          "driver_version": "1.1.1",
          "number": 0,
          "subclass": "Video Control",
          "subclass_id": 1
        },
        {
          "class": "Video",
          "class_id": 14,
          "driver": "uvcvideo",
          "driver_version": "1.1.1",
          "number": 1,
          "subclass": "Video Streaming",
          "subclass_id": 2
        },
        {
          "class": "Audio",
          "class_id": 1,
          "driver": "snd-usb-audio",
          "driver_version": "5.4.0-18-generic",
          "number": 2,
          "subclass": "Control Device",
          "subclass_id": 1
        },
        {
          "class": "Audio",
          "class_id": 1,
          "driver": "snd-usb-audio",
          "driver_version": "5.4.0-18-generic",
          "number": 3,
          "subclass": "Streaming",
          "subclass_id": 2
        }
      ],
      "product": "HD Pro Webcam C920",
      "product_id": "082d",
      "speed": 480,
      "vendor": "Logitech, Inc.",
      "vendor_id": "046d"
    },
    {
      "bus_address": 3,
      "device_address": 16,
      "interfaces": [
        {
          "class": "Human Interface Device",
          "class_id": 3,
          "driver": "usbhid",
          "driver_version": "5.4.0-18-generic",
          "number": 0,
          "subclass": "",
          "subclass_id": 0
        },
        {
          "class": "Chip/SmartCard",
          "class_id": 11,
          "driver": "usbfs",
          "driver_version": "5.4.0-18-generic",
          "number": 1,
          "subclass": "",
          "subclass_id": 0
        }
      ],
      "product": "YubiKey FIDO+CCID",
      "product_id": "0406",
      "speed": 12,
      "vendor": "Yubico.com",
      "vendor_id": "1050"
    },
    {
      "bus_address": 3,
      "device_address": 17,
      "interfaces": [
        {
          "class": "Human Interface Device",
          "class_id": 3,
          "driver": "usbhid",
          "driver_version": "5.4.0-18-generic",
          "number": 0,
          "subclass": "Boot Interface Subclass",
          "subclass_id": 1
        },
        {
          "class": "Human Interface Device",
          "class_id": 3,
          "driver": "usbhid",
          "driver_version": "5.4.0-18-generic",
          "number": 1,
          "subclass": "Boot Interface Subclass",
          "subclass_id": 1
        }
      ],
      "product": "ThinkPad Compact USB Keyboard with TrackPoint",
      "product_id": "6047",
      "speed": 12,
      "vendor": "Lenovo",
      "vendor_id": "17ef"
    }
  ],
  "total": 6
}

network: Support for multiple ipvlan NIC devices

Multiple ipvlan devices can now be added to the same container provided that one of them has ipv4.gateway and/or ipv6.gateway set to none.

network: Support for host addresses on routed NIC

The host side address on routed nics can now be configured through the ipv4.host_address and ipv6.host_address properties.

clustering: Support for editing cluster roles

A new lxc cluster edit command allows for editing clustering roles.

It's worth noting that there currently are no writable roles, but we expect to be adding some in the near future which will then be manageable through this API and command.

instances: Disk usage for custom volumes

Containers with custom storage volumes attached to them will now report those volume's usage in the state API (and through lxc info):

stgraber@castiana:~$ lxc launch images:ubuntu/bionic c1
Creating c1
Starting c1

stgraber@castiana:~$ lxc storage volume create default vol1
Storage volume vol1 created
stgraber@castiana:~$ lxc storage volume create default vol2
Storage volume vol2 created

stgraber@castiana:~$ lxc storage volume attach default vol1 c1 vol1 /mnt/vol1
stgraber@castiana:~$ lxc storage volume attach default vol2 c1 vol2 /mnt/vol2

stgraber@castiana:~$ lxc info c1
Name: c1
Location: none
Remote: unix://
Architecture: x86_64
Created: 2020/04/01 00:00 UTC
Status: Running
Type: container
Profiles: default
Pid: 1439012
Ips:
  eth0: inet    10.166.11.66    veth12c5ea18
  eth0: inet6   fd42:4c81:5770:1eaf:216:3eff:fee2:43b6  veth12c5ea18
  eth0: inet6   fe80::216:3eff:fee2:43b6    veth12c5ea18
  lo:   inet    127.0.0.1
  lo:   inet6   ::1
Resources:
  Processes: 14
  Disk usage:
    root: 1.11MB
    vol1: 98.30kB
    vol2: 98.30kB
  CPU usage:
    CPU usage (in seconds): 0
  Memory usage:
    Memory (current): 46.94MB
  Network usage:
    eth0:
      Bytes received: 3.06kB
      Bytes sent: 2.93kB
      Packets received: 22
      Packets sent: 28
    lo:
      Bytes received: 0B
      Bytes sent: 0B
      Packets received: 0
      Packets sent: 0

instances: Disk usage for snapshots

The API now exposes the size of each individual snapshots.

stgraber@castiana:~$ lxc snapshot c1
stgraber@castiana:~$ lxc query /1.0/instances/c1/snapshots/snap0 | jq .size
61440

This will soon be displayed in lxc info once it's gone through a redesign.

auth: Support for passwordless PKI mode

For those using LXD with a managed PKI, it is now possible to configure LXD to automatically trust any client certificate signed by the CA.

This is done with core.trust_ca_certificates.

To handle revocation, LXD also now accepts a CRL which should be placed alongside server.ca as server.crl.

Highlights for 3.0 users

In addition to the features and changes listed above, those who were using the LXD 3.0 LTS branch have the following "new" features to look forward to:

Virtual machines

LXD can now run both containers and virtual machines.

The experience and configuration works in much the same way though some device types and configuration options aren't available for virtual machines yet.

Some operations are performed through an agent running in the virtual machine (lxc exec and lxc file). The agent comes pre-installed in the majority of our images.

To create a virtual machine rather than a container, simply pass --vm to lxc launch

VM images are now available for most commonly used Linux distributions with plans to add more in the future.

stgraber@castiana:~$ lxc launch images:centos/8 centos-8 --vm
Creating centos-8
Starting centos-8

stgraber@castiana:~$ lxc info centos-8
Name: centos-8
Location: none
Remote: unix://
Architecture: x86_64
Created: 2020/03/31 23:48 UTC
Status: Running
Type: virtual-machine
Profiles: default
Pid: 1426453
Ips:
  enp5s0:   inet    10.166.11.125
  enp5s0:   inet6   fd42:4c81:5770:1eaf:1c5b:d0a1:d892:5464
  enp5s0:   inet6   fe80::9bbf:7460:2ad0:6a9
  lo:   inet    127.0.0.1
  lo:   inet6   ::1
Resources:
  Processes: 12
  Disk usage:
    root: 6.65MB
  CPU usage:
    CPU usage (in seconds): 5
  Memory usage:
    Memory (current): 123.94MB
    Memory (peak): 115.95MB
  Network usage:
    enp5s0:
      Bytes received: 2.55kB
      Bytes sent: 2.32kB
      Packets received: 21
      Packets sent: 20
    lo:
      Bytes received: 0B
      Bytes sent: 0B
      Packets received: 0
      Packets sent: 0

stgraber@castiana:~$ lxc exec centos-8 bash
[root@centos-8 ~]# cat /etc/redhat-release 
CentOS Linux release 8.1.1911 (Core) 
[root@centos-8 ~]# uname -a
Linux centos-8 4.18.0-147.5.1.el8_1.centos.plus.x86_64 #1 SMP Thu Feb 6 10:31:58 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
[root@centos-8 ~]#

Projects

Projects are a way to segment your LXD server. Each project can contain its own set of instances, images, profiles and storage volumes.

Those various features can be enabled/disabled on a per-project basis. If disable, the project inherit from the default project.

On top of this, there is support for both restrictions (disabling particular device types, privileged containers, ...) and limits (limiting the amount of CPU, memory and instance count).

Instances

  • System call interception on containers
  • Allows for limited mknod in containers
  • Allows for limited setxattr in containers
  • Can be used to allow mounting of privileged filesystems
  • Can be used to redirect some filesystem mounts to FUSE
  • Addition of a backup/restore feature (lxc export and lxc import)
  • Copy/move instances between storage pools
  • Refresh of an instance copy (local or remote) with lxc copy --refresh
  • Protection against accidental deletion and shift (security.protection.delete and security.protection.shift)
  • shiftfs is now supported and used when available (replaces traditional shifting)
  • Automated snapshots and expiration
  • New unix-hotplug device type (similar to unix-char and unix-block)
  • usb device improvements:
  • The add/remove uevent is now forwarded to the container
  • It is possible to pass all USB devices
  • proxy device improvements:
  • Privileged dropping options (security.uid and security.gid)
  • Socket ownership options (uid, gid, mode)
  • Support for HAProxy type header (proxy_protocol)
  • Fast proxying using NAT when available (nat)
  • Support for unix socket, udp and port ranges on udp and tcp
  • disk device improvements:
  • Direct attach of Ceph rbd/fs disks to containers
  • Custom mount options
  • shift property to translate uid/gid into container-readable ones
  • nic device improvements:
  • New ipvlan nictype
  • New routed nictype
  • ipv4.routes and ipv6.routes properties
  • network property to easily connect to LXD managed networks
  • Scurity filtering options
  • VLAN & MAC filtering on SR-IOV devices

Network

  • Configurable NAT source address (ipv4.nat.address and ipv6.nat.address)
  • DHCP leases API and lxc network list-leases command
  • Network state API and lxc network info command
  • Configurable MAC address on managed networks (bridge.hwaddr)
  • Control on firewall rule application order (ipv4.nat.order and ipv6.nat.order)

Storage

  • New internal storage layer rewritten from scratch
  • New cephfs storage backend
  • Backups and images can now be stored inside a storage pool
  • Custom storage volume snapshots (including scheduling & expiry)
  • LVM striping support
  • Separate metadata and data pools for Ceph
  • Quotas on dir backend through ext4/xfs "project quotas"
  • security.shifted property on custom storage volumes

Images

  • API for nested LXD to fetch images from the host (security.devlxd.images)
  • squashfs compression support for new images
  • Profiles can now be tied to images
  • Image expiry can now be changed

Clustering improvements

  • Support for standby database nodes
  • Configurable number of database & standby nodes
  • Mixed architecture clustering
  • Clustering roles
  • New simplified cluster join API
  • Separate addresses for client and cluster traffic
  • Automatic image replication

CLI

  • New columns in lxc list and lxc image list
  • New lxc alias command
  • Consistent list commands including --format support
  • All set commands now accept multiple key=value
  • exec now accepts --uid, --gid and --cwd
  • Config overrides on lxc copy and lxc move
  • More commands now support the --target option for clustering

Future proofing

  • Support for nftables as an alternative to xtables
  • Support for limits through Cgroup2

API

  • Support for RBAC (Role Based Access Control) through Canonical RBAC
  • Default TLS key is now EC384
  • New /1.0/instances endpoint replacing /1.0/containers
  • Addition of server-side collection filtering on /1.0/instances and /1.0/images
  • Much more comprehensive resources API at /1.0/resources
  • Kernel features are now exposed in /1.0
  • LXC features are now exposed in /1.0
  • Built-in debug server (pprof) configurable through core.debug_address
  • Additional bulk-query (recursion) options for high demand endpoints
  • Events and Operations in a clustered environment now have a Location field

Complete changelog

Here is a complete list of all changes in this release:

  • shared/version/api: Add trust_ca_certificates
  • doc: Add core.trust_ca_certificates
  • lxd/cluster/config: Add core.trust_ca_certificates
  • *: Add parameters to CheckTrustState
  • shared/cert: Add CRL to CertInfo
  • lxd/util/http: Check CRL for revoked clients
  • test: Extend PKI test
  • lxd/etag: Quote generated etag values
  • lxd/apparmor: Apparently the order matters
  • shared/version/api: Add snapshot_disk_usage API extension
  • doc: Add snapshot_disk_usage
  • lxd/storage/drivers/btrfs: Fix quota
  • lxd/backup: Removes Privileged field from backup.Info struct
  • lxd/backup: Adds new fields in index.yaml
  • lxd/instances/post: bInfo.OptimizedStorage pointer usage
  • lxd/storage/backend/lxd: CreateInstanceFromBackup OptimizedStorage pointer usage
  • lxd/backup: Updates backupWriteIndex index.yaml fields
  • lxd/backup: Removes Project field from index.yaml
  • test/suites/storage: Add btrfs quota tests
  • shared/api: Add size to InstanceSnapshot
  • lxd/instance/drivers: Get snapshot usage
  • lxd/storage/drivers/btrfs: Don't destroy qgroups
  • lxd/storage/drivers: Moves functions from generic.go to generic_vfs.go
  • lxd/storage/drivers: Generic VFS function usage after move &rename
  • lxd/instance/drivers: Add custom volumes to disk state
  • lxd/instance/drivers: Fix lxd-agent running order
  • lxc: Deprecate --container-only
  • i18n: Update translation templates
  • tests: Move away from container-only
  • lxc: Drop flagContainerOnly
  • lxd/storage/zfs: Fix deleted VM images restoration
  • lxc/storage/drivers/driver/btrfs/volumes: CreateVolumeFromBackup to use tar reader for optimized volume restore
  • lxc/storage/drivers/driver/zfs/volumes: CreateVolumeFromBackup to use tar reader for optimized volume restore
  • shared/archive: Adds CompressedTarReader function
  • lxd/backup/backup: shared.CompressedTarReader usage
  • test/suites/static/analysis: Reinstates checks for shared/instancewriter
  • lxd/instance/post: InstanceID usage
  • lxd/db/containers: Renames ContainerID to InstanceID
  • lxd/instances/post: Logging in createFromBackup
  • lxd/instances/post: Logging message change from container to instance
  • lxd/instances/post: Switches to revert package in createFromBackup
  • lxd: Merges instanceCreateFromBackup into createFromBackup
  • lxd/storage/drivers/utils: Adds blockDevSizeBytes function
  • lxd/storage/drivers/driver/ceph/volumes: Updates SetVolumeQuota to use blockDevSizeBytes
  • shared/instancewriter/instance/file/info: Adds FileInfo for os.FileInfo implementation
  • shared/instancewriter/instance/tar/writer: Adds WriteFileFromReader function
  • lxd/backup: Switches index.yaml file generation to use WriteFileFromReader in backupCreate
  • lxd/api/internal: d.cluster.InstanceID usage
  • lxd/storage/backend/lxd: Better error msg context in CreateInstanceFromBackup
  • lxd/backup: Removes volume type restriction in backupCreate
  • lxd/storage/drivers/generic/vfs: Adds VM support to genericVFSBackupVolume
  • lxd/storage/drivers: Uses sourcePath logging for consistency in BackupVolume
  • lxd/storage/drivers/driver/zfs/volumes: Adds optimised VM backup to BackupVolume
  • lxd/storage/drivers/driver/btrfs/volumes: Adds optimised VM backup to BackupVolume
  • lxd/storage/backend/lxd: Adds volume type logic for VMs to CreateInstanceFromBackup
  • lxd/api/internal: makes internalImport VM aware
  • lxd/storage/drivers/generic/vfs: Adds VM support to genericVFSBackupUnpack
  • lxd/storage/drivers/driver/zfs/volumes: MountVolume comment improvements
  • lxd/storage/drivers/driver/zfs/volumes: UnmountVolume improvements
  • lxd/storage/drivers/driver/zfs/volumes: Adds VM support to generic mode in MigrateVolume
  • lxd/storage/drivers/driver/zfs/volumes: Adds VM support to MountVolumeSnapshot
  • lxd/storage/drivers/driver/zfs/volumes: Adds VM support to UnmountVolumeSnapshot
  • lxd/storage/drivers/driver/zfs/volumes: Adds support for VM optimized backup restore
  • lxd/storage/drivers: Adds existing volume check to optimized backup restore
  • lxd/storage/drivers/driver/btrfs/volumes: Adds support for VM optimized backup restore
  • lxd/storage/backend/lxd: Updates CheckInstanceBackupFileSnapshots to be VM aware
  • lxd/storage/backend/lxd/patches: Ignores snapshots when retrieving list of custom volumes to be renamed
  • lxd/containers: Emit lifecycle event on user shutdown
  • lxd/storage/drivers: Adds OptimizedBackups driver Info flag
  • lxd/backup: Ignore requests for optimized backups when pool driver doesn't support it
  • lxd/instances/post: Ensure optimized backup imports only import into same storage driver pools
  • lxd/instance/exec: Adds protection against clients reconnecting after exec has started
  • doc: Fix escaping
  • lxd/cluster: Tweak errors
  • api: clustering_edit_roles
  • shared/api: Add ClusterMemberPut
  • lxd/cluster: Make ClusterMember editable
  • client: Add UpdateClusterMember
  • lxc/cluster: Add edit sub-command
  • i18n: Update translation templates
  • lxd/firewall/drivers/drivers/consts: Adds FilterIPv6All constant
  • cgroup/init: close controllers file
  • doc/networks: Add missing maas.subnet.ipv4/maas.subnet.ipv6
  • scripts/bash: Add maas.subnet.ipv4/maas.subnet/ipv6 to network
  • client: Fix bad description for UpdateClusterMember
  • lxd/device/nic/bridged: Allow security.ipv6_filtering to be used on networks without IPv6
  • lxd/firewall/drivers/drivers/xtables: Adds FilterIPv6All support
  • lxd/firewall: Dont use compact function arg definitions
  • lxd/firewall/drivers/drivers/nftables: Adds FilterIPv6All support
  • lxd/network/network/utils: Adds support for bridged NIC network property when rebuilding dnsmasq static config
  • lxd/network/network/utils: Comment consistency
  • lxd/device/nic/bridged: Allow security.ipv4_filtering to be used on networks without IPv4
  • lxd/firewall/drivers/drivers/consts: Adds FilterIPv4All constant
  • lxd/firewall/drivers/drivers/xtables: Adds Adds FilterIPv4All support
  • lxd/firewall/drivers/drivers/nftables: Adds FilterIPv4All support
  • test: Adds bridged NIC tests for total protocol filtering
  • lxd/device/nic: Adds ipv4.host_address and ipv6.host_address keys
  • lxd/device/nic/routed: Adds ability to specify host-side veth interface IP address
  • api: Adds container_nic_routed_host_address API extension
  • doc/instances: Updates routed nic doc with ipv4.host_address and ipv6.host_address keys
  • scripts/bash/lxd-client: Updates bash device keys for routed NIC
  • lxd/device/nic/ipvlan: Adds ipv4.gateway and ipv6.gateway support
  • api: Adds container_nic_ipvlan_gateway API extension
  • doc/instances: Adds ipvlan ipv4.gateway and ipv6.gateway docs
  • lxd/device/nic/routed: Sets accept_ra=0 on host interface
  • lxc: Fix for current cobra
  • lxd/device/nic_routed: Don't fail on missing IPv6
  • lxd/device/nic_routed: Set rp_filter=1
  • forkexec: rework
  • forkexec: tweak
  • lxd/firewall/firewall/interface: Adds InstanceSetupRPFilter and InstanceClearRPFilter
  • lxd/firewall/drivers/drivers/xtables: Improves proxy NAT rule removal errors
  • lxd/firewall/drivers/drivers/xtables: Renames iptablesConfig to iptablesAdd
  • lxd/firewall/drivers/drivers/xtables: Implements reverse path filters
  • lxd/device/nic/routed: Applies firewall based reverse path filter for IPv4 and IPv6
  • lxd/storage/drivers/ceph: Re-create image snapshot
  • lxd/storage/drivers: Update comment on readonly snapshot
  • lxd/firewall/drivers/drivers/nftables: Implements reverse path filters
  • shared/instancewriter/instance/tar/writer: Adds ignoreGrowth arg to WriteFile
  • lxd/storage/drivers/generic/vfs: Sets ignoreGrowth arg true in WriteFile usage
  • lxd: Existing WriteFile usage updated to set ignoreGrowth to false
  • lxd/device/nic/bridged: Disables IPv6 on bridged host side interface
  • lxd/exec: Fix forwarding for VMs
  • lxd: Rename forwarding functions
  • i18n: Update translations from weblate
  • lxd/networks: Fix network leases list for instances using "network" option
  • lxd/instance/drivers/driver/qemu: Restart on failure
  • shared/idmap: Better root fallback
  • lxd/instance/drivers/driver/qemu: Fixes dependencies for lxd-agent
  • lxd-agent/main/agent: Better logging
  • shared/version/api: Add resources_usb_pci API extension
  • doc: Add resources_usb_pci
  • shared/api: Add USB and PCI resources
  • shared/usbid: Add USB vendor and devices
  • lxd/resources: Add USB resource
  • lxd/resources: Add PCI resource
  • test/suites/static_analysis: Skip shared/usbid/load_data.go

Try it for yourself

This new LXD release is already available for you to try on our demo service.

Downloads

The release tarballs can be found on our download page.

Binary builds are also available for:

  • Linux: snap install lxd
  • MacOS: brew install lxc
  • Windows: choco install lxc

LXD 3.23 has been released

20th of March 2020

Introduction

The LXD team is very excited to announce the release of LXD 3.23!

This should be the last release of the 3.x series with LXD 4.0 planned to be released next week with very minimal changes on top of that (a few backward-incompatible CLI tweaks).

This is also a rather feature packed release, especially for those using custom storage volumes, projects or virtual machines.

Enjoy!

Highlights

Custom storage volumes in projects

A new project feature (features.storage-volumes) is now available to all new projects and ties custom storage volumes to the project.

This allows projects to have their own separate set of custom storage volumes without risk of conflicts. When combined with Canonical RBAC, this also now properly isolates storage between diferent projects.

stgraber@castiana:~$ lxc storage volume list default | grep custom
+--------+----------+-------------+---------+
|  TYPE  |   NAME   | DESCRIPTION | USED BY |
+--------+----------+-------------+---------+
| custom | backups  |             | 1       |
+--------+----------+-------------+---------+
| custom | blah     |             | 0       |
+--------+----------+-------------+---------+
| custom | images   |             | 1       |
+--------+----------+-------------+---------+

stgraber@castiana:~$ lxc project create blah
Project blah created
stgraber@castiana:~$ lxc project switch blah

stgraber@castiana:~$ lxc storage volume create default foo
Storage volume foo created
stgraber@castiana:~$ lxc storage volume list default | grep custom
+--------+------+-------------+---------+
|  TYPE  | NAME | DESCRIPTION | USED BY |
+--------+------+-------------+---------+
| custom | foo  |             | 0       |
+--------+------+-------------+---------+
stgraber@castiana:~$

Schedule snapshots for custom storage volumes

Similar to instances, the snapshots.schedule and snapshots.pattern configuration keys are now available to custom volumes too.

They can be set directly using lxc storage volume set POOL VOL KEY VALUE.

Expiry for custom storage volumes

With automatic snapshots now being possible on custom storage volumes, an expiry mechanism is a good idea. Matching what's available in instances, this can be configured through snapshots.expiry.

Editing the expiry on existing snapshots can be done with lxc storage volume edit POOL VOL/SNAP.

Limits for projects

Some limits can now be applied on a per-project basis. The limits available at this time are:

  • limits.containers for the total number of containers allowed
  • limits.virtual-machines for the total number of virtual-machines allowed
  • limits.cpu for the number virtual CPUs that may be used
  • limits.memory for the total amount of memory that can be given
  • limits.processes for the total number of processes that can be used

Note that the last 3 require all instances in the project to have the matching configuration key set on them. The limit applies to the total configured limit on the instances rather than to the live usage.

Restrictions for projects

Additionally, some feature restrictions can now be applied to projects too.

The full list of options can be found at https://linuxcontainers.org/lxd/docs/master/projects

This is designed so that marking a project as restricted using restricted=true should default to it being safe for untrusted users. Restrictions can then be relaxed to allow potentially more dangerous or less confined configuration and devices.

Combined with Canonical RBAC, this can be used to run a shared LXD server or cluster with mostly untrusted users having the ability to spawn containers and virtual-machines wihout effectively having to trust them with full privileges on the hosts.

Improved backup/export logic

The backup/export logic as used by lxc export has been updated to reduce the amount of disk space needed during an export. The container files are now directly written to the compressed tarball, without any intermediate copy being made on disk.

This should significantly reduce the amount of disk space used by an export as well as speed up the process quite a bit.

VM: Support for migration

Virtual machines can now be copied and moved between local storage pools as well as to remote LXD servers.

Note that this is only "cold" migration, that is, virtual machines must be stopped prior to being moved. Live migration is planned for a later stage.

VM: Support for publishing

It is now possible to lxc publish a virtual machine, resulting in a functional image which can be used to spawn more virtual machines or transfer it to another server.

While this all works like it does for containers, we do have to highlight the fact that virtual machine disks are much larger than containers and as our images require the disk be repacked to qcow2 during the publishing process, you will need a significant amount of free disk space on the system in order to handle large virtual machines.

Complete changelog

Here is a complete list of all changes in this release:

  • lxd/storage/zfs: Fix usage calculation
  • Add go 1.14.x check
  • lxd: Cleanup error messages
  • lxd: Rename container files to instance
  • tests: Update for rename
  • production-setup: add net.core.bpf_jit_limit and kernel.keys.maxbytes
  • doc/instances: Adds missing host_name key on routed nic device
  • doc/instances: Documents ipv4.gateway and ipv6.gateway routed NIC keys
  • lxd/device/device/utils/network: Adds NetworkValidGateway helper
  • lxd/device/nic: Adds ipv4.gateway and ipv6.gateway validation
  • lxd/device/nic/routed: Adds support for not adding automatic default gateway
  • api: Adds extension container_nic_routed_gateway
  • lxd/util/fs: Fixes go vet conversion from int64 to string yields a string of one rune error
  • lxd/device/disk: Only unmounts non-root volumes attached
  • lxd/daemon: Adds comment to AllowAuthenticated
  • lxc/storage/volumes: Adds API permission check for permission "manage-storage-volumes"
  • lxd/project/project: Comment tweak to Instance()
  • lxd/project/project: Adds StorageVolume()
  • lxd/project/project/test: Adds StorageVolume() test
  • lxd/project/project: Adds StorageVolumeParts function
  • lxd/project/project: Adds StorageVolumeProject function
  • lxc/project: Adds STORAGE VOLUMES col to projects list
  • doc/projects: Documents features.storage.volumes flag
  • lxd/api/project: Adds features.storage.volumes to API
  • lxd/db/migration: Adds features.storage.volumes true to default project on importPreClusteringData
  • lxd/db/cluster/open: Adds features.storage.volumes true to default project in EnsureSchema
  • scripts/bash/lxd-client: Adds features.storage.volumes to bash autocomplete
  • lxd/daemon/storage: Error message quoting
  • lxd/daemon/storage: Updates storage custom volume functions to pass project.Default
  • lxd/daemon/storage: Adds support for custom volume projects
  • lxd/device/disk: Updates custom volume disks to support projects
  • lxd/patches: Updates patchStorageApiPermissions to use project.Default for custom volumes
  • lxd/storage/backend/mock: Updates custom volume signatures to support projectName
  • lxd/storage/pool/interface: Updates custom volume functions to support projectName
  • lxd/storage/volumes: Error message quoting and comment tweaks
  • lxd/storage/volumes: Improve volume type checks
  • lxd/storage/volumes: Add custom volume project support
  • lxd/storage/volumes: Migration project aware
  • lxd/storage/volumes/snapshots: Improve volume type validation
  • lxd/storage/volumes/snapshot: Error message quoting
  • lxd/storage/volumes/snapshot: Adds project support for custom volumes
  • lxd/storage/backend/lxd: Updates custom volume functions to support projects
  • lxd/db/storage/pools: Removes incorrect assumption about custom vol projects in storagePoolVolumeGetType
  • lxd/db/storage/pools: Comment and error msg tweaks
  • lxd/db/storage/pools: Removes incorrect filter for project default when vol type is StoragePoolVolumeTypeCustom
  • lxd/db/storage/pools: Updates StoragePoolVolumeSnapshotsGetType to filter by project
  • lxd/db/storage: Removes StoragePoolNodeVolumeGetType
  • lxd/db/storage: Fixes StoragePoolVolumeSnapshotsGetType to be project aware
  • lxd/patches: Switches to using storageDrivers.GetVolumeMountPath
  • lxd/storage/storage: Removes unused GetStoragePoolVolumeMountPoint
  • lxd/api: Updates projectParam to use project.Default
  • lxd: project.Default usage
  • lxd/images: Comment weaks
  • lxd/images: golint fixes
  • lxd/project/limits: Default const usage
  • lxd/storage/load: Adds support for custom vol projects to volIDFuncMake
  • lxd/storage/load: Error msg quoting tweaks
  • lxd/storage/volumes/utils: Error msg tweaks
  • lxd/storage/volumes/utils: Removes unused supportedVolumeTypesExceptImages
  • lxd/storage/volumes/utils: Updates storagePoolVolumeUpdateUsers to be project aware
  • lxd/storage/volumes/utils: Removes storagePoolVolumeUsedByRunningInstancesWithProfilesGet and old link var
  • lxd/container: Removes unused function instanceLoadAll
  • lxd/storage/backend/lxd: Updates use of database functions to use projectName
  • lxd/storage/utils: Adds VolumeUsedByRunningInstancesWithProfilesGet and removes old link var
  • lxd/storage/utils: Makes VolumeSnapshotsGet project aware
  • lxd/storage/utils: Makes VolumeUsedByInstancesGet project aware
  • lxd/migrate/storage/volumes: Makes custom volume project aware
  • lxd/storage/backend/lxd: b.state.Cluster.StoragePoolNodeVolumeGetTypeByProject usage
  • lxd/storage/backend/lxd: Updates migration functions to be project aware
  • lxd/storage/backend/mock: Updates migration functions to be storage aware
  • lxd/storage/pool/interface: Updates migration functions to be project aware
  • test: Updates tests for custom storage volume projects
  • lxd/db/storage/pools: Makes StoragePoolNodeVolumesGetType project aware
  • lxd/db/storage/pools: Removes StoragePoolNodeVolumeGetTypeID function
  • lxd/patches: StoragePoolNodeVolumeGetTypeIDByProject usage
  • lxd/patches: Improves error messages context
  • lxd/storage/backend/lxd/patches: Adds custom volume rename patch to add project prefix
  • lxd/storage/drivers/utils: Captures error context from e2fsck
  • lxd/storage/drivers/utils: Dont use TryCommand when resizing
  • i18n: Update translation templates
  • lxd: Replaces == "true" with shared.IsTrue() for projects and profiles
  • lxc: Replaces == "true" with shared.IsTrue() for project features
  • lxd/firewall: Don't create zombies
  • lxd/patches: Adds concept of stage to patch system
  • lxd/daemon: Applies pre daemon storage patches
  • lxd/storage/backend/lxd/patches: Skip already renamed volumes
  • lxd/db/images: Removes unnecessary whitespace
  • lxd/db/images: Updates ImagesGetExpired to return ExpireImage struct with projectName
  • lxd/images: Updates pruneExpiredImages to support removing expired images from non-default projects
  • driver_qemu: delete vm id from vmConsole
  • ExecReaderToChannel: Prevent endless loops
  • lxd/daemon/storage: Removes daemonStorageUsed function
  • lxd/storage/utils: Adds VolumeUsedByDaemon function
  • lxd: storagePools.VolumeUsedByDaemon usage
  • lxd/storage/backend/lxd/patches: Adds daemon storage symlink update to lxdPatchStorageRenameCustomVolumeAddProject
  • lxd/firewall/nft: Flush chain on delete
  • lxd/firewall/nft: Handle json errors
  • lxd/firewall/nft: Refuse to run on old kernels
  • lxd/project: Rename limits.go to permissions.go
  • shared/util/linux: Updates ExecReaderToChannel to accept a finisher chan as struct{}
  • lxd-agent/exec: Updates usage of ExecReaderToChannel channel definitions
  • shared/network: Removes logging internal state of websocket in WebsocketRecvStream
  • shared/netutils/network/linux: Updates WebsocketExecMirror to use struct{} exited indicator channel
  • lxd/instance/exec: Fixes VM read loop when agent not started
  • lxd/project: Rename CheckLimitsUponInstanceCreation to AllowInstanceCreation
  • lxd/project: Rename CheckLimitsUponInstanceUpdate to AllowInstanceUpdate
  • lxd/project: Rename CheckLimitsUponProfileUpdate to AllowProfileUpdate
  • lxd/project: Rename ValidateLimitsUponProjectUpdate to AllowProjectUpdate
  • lxd/project: Rename checkAggregateInstanceLimits to checkRestrictionsAndAggregateLimits
  • lxd/project: Extract checkAggregateLimits from checkRestrictionsAndAggregateLimits
  • lxd/project: Honor the "restricted.containers.nesting" config
  • lxd/project: Prevent using low-level container options
  • lxd/project: Check if restrictions are consistent when updating a project config
  • lxd/project: Honor the "restricted.containers.lowlevel" config
  • lxd/project: Honor the "restricted.containers.privilege" config
  • lxd/project: Also expand instance devices
  • lxd/project: Add machinery to perform checks on instance devices
  • lxc/project: Honor the "restricted.devices.unix-char" config
  • lxd/project: Perform restrictions checks also on profiles config and devices
  • lxc/project: Honor the "restricted.devices.unix-block" config
  • lxc/project: Honor the "restricted.devices.unix-hotplug" config
  • lxc/project: Honor the "restricted.devices.infiniband" config
  • lxc/project: Honor the "restricted.devices.nic" config
  • lxd/project: Honor the "restricted.devices.disk" config
  • lxc/project: Honor the "restricted.devices.gpu" config
  • lxc/project: Honor the "restricted.devices.usb" config
  • lxc/project: Honor the "restricted.virtual-machines.lowlevel" config
  • lxd/project: Pass current configuration to AllowInstanceUpdate
  • lxd/project: Check restrictions for volatile config keys
  • lxd/project: Adjust import order
  • lxd/project: Drive-by lint fixes
  • api: Add new restrict.* config keys to projects
  • shared/version: Add "projects_restrictions" API extension
  • doc/projects.md: Document project restrictions
  • test: Add projects restrictions tests
  • scripts: Update bash completion profile with new project config keys
  • lxd/images: Allow virtual-machine and instance as source
  • lxd/images: Set right image type on publish
  • lxd/vm: Implement Export
  • lxd/instance: Fix expiry check
  • lxd/storage: Unpack unified VM images
  • lxd/migration: Rebuilds migrate.pb.go
  • lxd/migration: Adds BLOCK_AND_RSYNC migration transport type
  • lxd/instances/post: Adds VM support to createFromMigration
  • lxd/migrate/instance: Adds VM support to migrationSourceWs.Do
  • lxd/rsync: Adds support for passing arguments to rsync send command
  • lxd/storage/drivers/utils: Error quoting
  • lxd/storage/drivers/driver/common: Updates MigrationTypes to support block volumes for VMs
  • lxd/storage/drivers/driver/dir/volumes: Updates migration to support VMs
  • lxd/storage/drivers/driver/dir/utils: Skips initial quota for VM block migration
  • lxd/storage/drivers: Switches to ErrNotSupported for non-block volume paths
  • lxd/storage/drivers/generic/vfs: Adds VM migration support to genericVFSMigrateVolume
  • lxd/storage/drivers/generic: Adds VM migration support to genericCreateVolumeFromMigration
  • lxd/storage/drivers: Removes dupe checks using genericVFSMigrateVolume
  • lxd/storage/drivers/generic: Adds volume type specific migration transport type checks
  • lxd/storage/drivers/driver/lvm/volumes: Removes dupe check done in genericCreateVolumeFromMigration
  • lxd/migrate/storage/volumes: whitespace
  • lxd/storage/drivers/driver/btrfs: Adds block migration negotiation
  • lxd/storage/drivers/driver/btrfs/volumes: Adds VM migration support
  • lxd/storage/backend/lxd: Improve delete error messages
  • lxd/storage/utils: Adds FallbackMigrationType function
  • lxd: Replaces hardcoded instances of migration.MigrationFSType_RSYNC
  • lxd/storage/drivers/driver/zfs: Adds block migration negotiation
  • lxd/storage/drivers/driver/zfs/volumes: Adds VM migration support
  • lxd/storage/drivers/driver/ceph: Adds block migration negotiation support
  • lxd/storage/drivers/driver/ceph/volumes: Adds VM migration support
  • lxd/migrate/instance: Prevent live migrations for VMs
  • lxd: Add "instance" string where necessary
  • lxd/instances/snapshot: Fix expiration in profiles
  • lxd/images: Fix source type handling
  • lxc/export: Make API call more correct
  • lxd/storage/drivers/driver/btrfs/volumes: Dont activate quotas if not used
  • lxd/storage/drivers/driver/ceph/volumes: Adds VM block resize support
  • doc/security: Adds network security section
  • lxd: Unexport NewMigrationSource
  • lxd/storage: Fix crash on VM unpack
  • lxd: Unexport NewDaemon
  • lxd: Unexport RestServer
  • lxd: Unexport DefaultDaemonConfig and DefaultDaemon
  • lxd: Unexports AllowAuthenticated and AllowProjectPermission
  • lxd: Unexports DevLxdServer
  • lxd: Unexports daemon feature functions
  • lxd: Unexports migration setup functions
  • lxd: Unexports forwarded response helpers
  • client: Removes nullReadWriteCloser
  • client: Removes unused proxyInstanceMigration function
  • lxc-to-lxd: Removes unused vars
  • lxc-to-lxd: Removes unused connectTarget
  • lxc-to-lxd: Removes unused setupSource
  • lxd/cluster: Removes unused flagForce
  • lxc: Removes unused profile
  • lxc/console: Removes unused getStdout
  • lxd-agent: Removes unused rootUID and rootGID
  • lxc: Removes unused func showByDefault
  • lxd/cgroup: Removes unused cgCgroup2SuperMagic
  • lxd-agent: Unexports NewDaemon
  • memory_utils: align lxc + lxd
  • tree-wide: consistently initialize raw fds to -EBADF instead of -1 in cgo
  • lxd/storage/ceph: Fix ext4 shrinking
  • lxc/remote: Use helpers
  • lxc/remote: Validate remote name
  • i18n: Update translation templates
  • doc: Update requirements
  • lxd/init: Don't offer dir as a remote backend
  • lxc/config: Fix behaviour of instance snapshot expiry
  • db/cluster: Bump the value of sqlite_sequence for storage_volumes
  • po: Update translations
  • shared/version/api: Add custom_volume_snapshot_expiry extension
  • doc: Add custom_volume_snapshot_expiry
  • lxd/db: Add expiry_date to storage_volumes_snapshots
  • shared/api: Add expiry fields to StorageVolumeSnapshot*
  • lxd/storage: Add expiry to volume snapshot pool functions
  • lxd: Add snapshots.expiry config key for storage volumes
  • lxd/db: Add custom volume snapshot functions
  • lxd: Handle volume snapshot expiry
  • lxd/storage: Add expiry date to VolumeDBCreate
  • lxd/storage: Update expiry date when updating volume snapshots
  • lxd/db: Add ProjectName to StorageVolumeArgs
  • lxd/db: Add new OperationCustomVolumeSnapshotsExpire
  • lxd/db: Add StorageVolumeSnapshotsGetExpired
  • lxd: Remove expired custom volume snapshots
  • *: Remove snapshot code from StoragePoolVolumeCreate
  • lxc: Add --no-expiry for volume snapshots
  • test: Add volume snapshot expiry test
  • doc: Add keys to volume config
  • po: Update translations
  • lxd/storage/drivers/driver/lvm/volumes: Fixes LVM VM snapshot list
  • lxd/cluster: Ignore CEPH custom volumes on removal
  • shared/version: Add volume_snapshot_scheduling API extension
  • lxd/storage: Add snapshots.* config keys
  • lxd/db: Extend StorageVolumeArgs
  • lxd: Support patterns in StorageVolumeNextSnapshot
  • lxd/db: Add StoragePoolVolumesGetAllByType
  • lxd: Add volume snapshot scheduling
  • doc: Add volume snapshot scheduling
  • lxd: Clean up logging for expired volume snapshots
  • doc/networks: describe how to notify systemd-resolved of lxd nameserver
  • lxd/storage/utils: Add missing comments
  • lxd/storage/utils: Add forceRemoveAll
  • lxd/storage/dir: Use forceRemoveAll
  • lxd/api/cluster/test: Removes unused DISABLED_TestCluster_Failover
  • lxd/api/cluster/test: Removes unused FLAKY_TestCluster_LeaveAndPromote
  • lxd/cluster/gateway: Removes unused cachedRaftNodes
  • lxd/cluster/heartbeat/test: Removes unused DISABLE_TestHeartbeat_MarkAsDown
  • lxd/cluster/membership/test: Removes unused FLAKY_TestPromote
  • lxd/db/containers: Removes unused snapshotIDsAndNames
  • lxd/db/db/internal/test: Removes unused dir var
  • lxd/db/testing: Removes unused var
  • lxd/device/device/utils/unix: Removes unused unixDeviceInstanceAttributes
  • lxd/device/nic/bridged: Removes unused dhcpAllocation
  • lxd/firewall: Removes unused constants
  • lxd/instance/drivers/driver/lxc: Removes unused cgroup2 var
  • lxd/main/forkproxy: Removes unused udpConn var
  • lxd/storage/drivers/driver/common: Removes unused load
  • shared/generate/file/buffer: Removes unused varDeclSliceToString
  • shared/generate/db/parse: Removes unused simpleTypeNames
  • shared/generated/file/path: Removes unused absPath
  • lxd/db/node: Tweaks LEFT JOIN to just JOIN in NodeIsEmpty()
  • lxd/sys: Don't fail chmod on unresolvable symlinks
  • shared/containerwriter: Renames to instancewriter
  • lxd/instance/drivers: instancetarwriter usage
  • shared/instancewriter/instance/tar/writer: Modifies WriteFile to accept a file name arg
  • shared/instancewriter/instance/tar/writer: Adds ResetHardLinkMap function
  • lxd/instance/drivers: instancetarwriter.WriteFile name arg usage
  • lxd/db/containers: Renames ContainerBackupCreate and ContainerBackupRemove
  • i18n: Update translations from weblate
  • lxd/backup: Removes backupCreateTarball function
  • lxd/backup: Updates instance backup to use tar writer rather than tar cmd
  • lxd/backup: InstanceBackupRemove usage
  • lxd/storage/drivers/utils: Minor tweak to copyDevice error message
  • lxd/stroage/drivers/generic: Tweak error message of genericCreateVolumeFromMigration
  • lxd/storage/drivers/generic/vfs: Switches genericVFSBackupVolume to tar writer
  • lxd/images: Fixes unhandled error
  • lxd/storage/backend/lxd: Adds tarWriter to BackupInstance function
  • lxd/storage/backend/mock: Adds tarWriter to BackupInstance function
  • lxd/storage/drivers/driver/ceph/volumes: Adds tarWriter arg to BackupVolume
  • lxd/storage/drivers/driver/cephfs/volumes: Adds tarWriter arg to BackupVolume
  • lxd/storage/drivers/driver/dir/volumes: Adds tarWriter arg to BackupVolume
  • lxd/storage/drivers/driver/lvm/volumes: Adds tarWriter arg to BackupVolume
  • lxd/storage/drivers/drivers/mock: Adds tarWriter arg to BackupVolume
  • lxd/storage/drivers/interface: Adds tarWriter arg to BackupVolume
  • lxd/storage/pool/interace: Adds tarWriter arg to BackupInstance
  • lxd/storage/drivers/driver/btrfs/volumes: Adds tarWriter arg to BackupVolume
  • lxd/storage/drivers/driver/zfs/volumes: Adds tarWriter arg to BackupVolume
  • lxd/internal: Log some memory stats
  • shared: Drop Pipe function
  • lxd/containers: Add configfs and tracefs
  • btrfs quota to simulate total disk size

Try it for yourself

This new LXD release is already available for you to try on our demo service.

Downloads

The release tarballs can be found on our download page.

Binary builds are also available for:

  • Linux: snap install lxd
  • MacOS: brew install lxc
  • Windows: choco install lxc

LXD 3.22 has been released

6th of March 2020

Introduction

The LXD team is very excited to announce the release of LXD 3.22!

This release comes with quite a few improvements for containers and virtual machines alike. The addition of the nftables support also makes it much more compatible with some modern Linux distributions that have now switched away from xtables.

Somewhat separate from this release, we have also now added quite a few VM images to our image server. You'll now find VM images for Ubuntu, Debian, Fedora, CentOS, OpenSUSE and ArchLinux.

Enjoy!

Highlights

Resource limits for projects

Projects grew a new set of configuration keys that can be used to restrict the amount of resources used by a project:

  • limits.containers
  • limits.virtual-machines
  • limits.cpu
  • limits.memory
  • limits.processes

There are a few special restrictions that apply when using the limits for cpu, memory or processes. More details can be found here: https://linuxcontainers.org/lxd/docs/master/projects#project-limits

nftables backend for firewalling

Recent LXD releases introduced an internal abstraction layer for firewalling requests. This covers anything from LXD networks firewalling and NAT, proxy devices for containers, IP and MAC filtering, ...

With this release of LXD, a new backend, nft joins our existing xtables implementation. On startup, LXD will detect which is currently in use by your system and then go on using that one.

The existing backend can be found in lxc info.

stgraber@castiana:~$ lxc info | grep firewall:
  firewall: nftables

Container: Hugepages in unprivileged containers

It is now possible to allow unpriivleged containers access to hugepages. This is done with two things:

  • Mount interception of the hugetlbfs filesystem
  • New limits for hugepages

A configuration on x86_64 would look something like:

  • security.syscalls.intercept.mount=true
  • security.syscalls.intercept.mount.allowed=hugetlbfs
  • limits.hugepages.1MB=1GB

Note the the allocation of hugepages is in addition to whatever regular memory the container already has access too. Also note that similar to other limits, not setting the limit will allow an unlimited amount of hugepages to be used.

root@edfu:~# lxc init ubuntu:18.04 c1
Creating c1
root@edfu:~# lxc config set c1 security.syscalls.intercept.mount true
root@edfu:~# lxc config set c1 security.syscalls.intercept.mount.allowed hugetlbfs
root@edfu:~# lxc config set c1 limits.hugepages.2MB 1GB
root@edfu:~# lxc start c1

root@edfu:~# lxc exec c1 bash
root@c1:~# mkdir /dev/hugepages ; mount -t hugetlbfs hugetlbfs /dev/hugepages
root@c1:~# ls -lh /dev/hugepages/
total 0

VM: Support for 9p disk devices

One long awaited feature of LXD virtual machines was the ability to pass arbitrary paths from the host into the virtual machine.

LXD 3.22 now supports that through a combination of logic in LXD itself and in the agent.

This can then be used by both containers and virtual machines through profiles.

root@edfu:~# lxc profile create shared-data
Profile shared-data created
root@edfu:~# lxc profile device add shared-data home disk source=/home path=/mnt/home
Device home added to shared-data
root@edfu:~# lxc profile device add shared-data srv disk source=/srv path=/mnt/srv
Device srv added to shared-data

root@edfu:~# lxc launch images:fedora/31 f31-ctn -p default -p shared-data
Creating f31-ctn
Starting f31-ctn
root@edfu:~# lxc launch images:fedora/31 f31-vm -p default -p shared-data --vm
Creating f31-vm
Starting f31-vm

root@edfu:~# lxc exec f31-ctn -- df -ah | grep /mnt
/dev/sdb1                   220G   12G  197G   6% /mnt/home
/dev/sdb1                   220G   12G  197G   6% /mnt/srv
root@edfu:~# lxc exec f31-vm -- df -ah | grep /mnt
lxd_home        220G   12G  197G   6% /mnt/home
lxd_srv         220G   12G  197G   6% /mnt/srv

VM: File templating support

The template files in images are now used for virtual machines too. The templates are rendered by LXD on the host using the metadata available in the configuration, the rendered files are then passed on to the agent for installation into the virtual machine.

Adding templates to custom images now works identicallty to containers and can be seen in use by our own VM images on the images: remote.

Complete changelog

Here is a complete list of all changes in this release:

  • lxc-to-lxd: golint fix
  • lxd/cluster: golint fixes
  • lxd/migration: golint fixes
  • shared/containerwriter: golint fixes
  • shared/generate: golint fixes
  • shared/netutils: golint fixes
  • tests: Update golint list
  • shared: Fix HostPathFollow for stdin/stdout
  • Allow build with GNU Make 4.3
  • add mips architectures
  • doc: tweak markdown format
  • lxd/vm: Use -sandbox
  • lxd/firewall/firewall/interface: Adds String() and Compat()
  • lxd/network/network: Handle errors during firewall setup
  • lxd/firewall/drivers/drivers/xtables: Changes XTables to Xtables for consistency
  • lxd/firewall/drivers/drivers/xtables: Better validation in InstanceSetupProxyNAT
  • lxd/firewall/drivers/drivers/xtables: Adds String() and Compat()
  • lxd/firewall/firewall/load: Detect which firewall driver to use
  • lxd/daemon: Log which firewall driver as selected
  • api: API extension firewall_driver
  • lxd/firewall/drivers/drivers/nftables: Adds nftables driver
  • test: Updates container devices nic bridged filtering tests for nftables
  • test: Updates proxy tests for nftables
  • add riscv architecture definitions
  • rv->riscv
  • correct mips names (le->el), no aliases required
  • lxd/storage/backend/lxd: Adds logging for CreateInstanceFromBackup post hook
  • lxd/storage/backend/lxd: Refuse to create storage pool if dir exists on disk
  • as the kernel only reports mips/mips64, specify 32 and 64bit arch and el as aliases
  • lxd/main/import: Adds --project flag support to lxd import
  • lxd/api/internal: Updates error messages in internalImport
  • shared/util: Fix relative paths in HostPathFollow
  • lxd/api/internal: Removes duplicate storage package import
  • lxd/storage: Adds InstanceImportingFilePath function
  • lxd/api/internal: storagePools.InstanceImportingFilePath usage
  • lxd/container/lxc: storagePools.InstanceImportingFilePath usage
  • lxd/api: projectParam comments
  • lxd/api/internal: Uses StoragePoolNodeVolumeGetTypeByProject for project support
  • lxd/storage/drivers/driver/lvm: Adds lvm.vg.force_reuse config option
  • lxd/storage/pools/config: Adds lvm.vg.force_reuse option
  • doc/api: Adds API extension storage_lvm_vg_force_reuse
  • doc/storage: Adds lvm.vg.force_reuse option to storage pool config
  • lxd/images: Removes hardcoded default project arg for ImageGet in autoUpdateImage
  • lxd/images: Golint and comments
  • lxd/instances: Pick correct default type from URL
  • lxd/db: Set ceph.user.name if missing
  • lxd/vm: Fix disk files and snap
  • lxd/db: Fix ceph username in patch
  • lxd/db: Revert 3da5aea1 fix, since in turn testify reverted the change
  • lxd/db: un-export StorageVolumeNodeGet
  • lxd/db: un-export StoragePoolVolumesGetType
  • lxd/db: un-export StoragePoolVolumeGetTypeID
  • lxd/db: un-export StoragePoolVolumeGetType
  • lxd/db: un-export StorageVolumeConfigGet
  • lxd/db: un-export StoragePoolVolumeTypeToName
  • lxd/db: un-export StorageVolumeDescriptionUpdate
  • lxd/db: un-export StorageVolumeConfigAdd
  • lxd/db: un-export StorageVolumeConfigClear
  • lxd/db/cluster: add new storage volume snapshots table
  • lxd/db/cluster: drop snapshot column from storage_volumes table
  • lxd/db/cluster: add storage_volumes_all view
  • lxd/db/schema: include triggers when generating SQL for fresh schemas
  • lxd/db/cluster: add triggers to check that volume IDs don't overlap
  • lxd/db: change StoragePoolVolumeSnapshotsGetType to query the snapshots table
  • lxd/db: change StorageVolumeNextSnapshot to query the snapshot table
  • lxd/db: update StorageVolumeNodeAddresses to use storage_volumes_all
  • lxd/db: update storagePoolVolumeGetTypeID to use storage_volumes_all
  • lxd/db: update storageVolumeNodeGet to use storage_volumes_all
  • lxd/db: update StorageVolumeDescriptionGet to use storage_volumes_all
  • lxd/db: update storageVolumeIDsGet to use storage_volumes_all
  • lxd/db: update StoragePoolVolumesGetNames to use storage_volumes_all
  • lxd/db: update StoragePoolVolumesGet to use storage_volumes_all
  • lxd/db: update storagePoolVolumesGetType to use storage_volumes_all
  • lxd/db: update InstancePool to use storage_volumes_all
  • lxd/db: update instancePoolSnapshot to use storage_volumes_all
  • lxd/db: make StoragePoolVolumeDelete differentiate between regular volumes and snapshots
  • lxd/db: make storageVolumeConfigGet differentiate between regular volumes and snapshots
  • lxd/db: make storageVolumeDescriptionUpdate differentiate between regular volumes and snapshots
  • lxd/db: make storageVolumeConfigAdd differentiate between regular volumes and snapshots
  • lxd/db: make storageVolumeConfigClear differentiate between regular volumes and snapshots
  • lxd/db: make StoragePoolVolumeRename differentiate between regular volumes and snapshots
  • lxd/db: consider snapshots in StorageVolumeMoveToLVMThinPoolNameKey
  • lxd/db: add ClusterTx.storagePoolVolumeGetTypeID() method
  • lxd/db: make StoragePoolVolumeCreate differentiate between regular volumes and snapshots
  • lxd/db: no need to update snapshot names in ContainerNodeMove
  • lxd/db: copy volume snapshots in StoragePoolNodeJoinCeph
  • lxd: no need to rename snapshot volumes when renaming a container
  • lxd/db/cluster: migrate existing volume snapshots to the new table
  • tests: some runs of "lxd import" don't fail anymore due to improved data integrity
  • lxd/logging: Handle projects in log expiry
  • doc: Fix escaping
  • shared/api: Fix ServerEnvironment ordering
  • lxd/vm: Fix snapshots
  • lxd/storage/ceph: Fix leftover rbd
  • lxd/storage/ceph: Fix zombie handling
  • lxd/init: Use new network syntax
  • tests: Check UUIDs while running
  • Increase timeout of standalone SQL statements
  • lxd/storage/ceph: Improve error reporting on map
  • lxd/containers: Have findIdmap look at projects
  • lxd/storage: Remove legacy dir implementation
  • lxd/storage: Remove legacy btrfs implementation
  • lxd/storage: Remove legacy zfs implementation
  • lxd/storage: Remove legacy lvm implementation
  • lxd/storage: Removes unused getPoolMountLockID
  • lxd/storage/pools/utils: Comment on storagePoolDBCreate
  • lxd/api/internal: Removes legacy storage pool loading
  • lxd/api/internal: Consistent comment style
  • lxd/api/internal: Stops using backup pkg name as variable
  • lxd/api/internal: Switches internalImport to use pool.CheckInstanceBackupFileSnapshots
  • lxd/storage/pool/interface: Adds CheckInstanceBackupFileSnapshots
  • lxd/storage/errors: Adds ErrBackupSnapshotsMismatch error
  • lxd/storage/backend/mock: Adds CheckInstanceBackupFileSnapshots
  • lxd/storage/backend/lxd: Adds CheckInstanceBackupFileSnapshots implementation
  • lxd/patches/utils: Removes unused functions
  • lxd/api/internal: Adds sanity check for instance name in internalImport
  • lxd/backup: Have tar not transform symlink targets
  • lxd/storage/drivers/driver/lvm/volumes: Updates VolumeSnapshots to use lvs for snapshot list
  • lxd/backup: Removes old storage loader
  • lxd/container/lxc: Removes old storage loader
  • lxd/storage: Removes unused storagePoolVolumeContainerCreateInit
  • lxd/container: Removes old storage loader
  • lxd/containers/post: Removes old storage loader
  • lxd/daemon/storage: Consistent comment ending
  • lxd/daemon/storage: Removes old storage loader
  • lxd/images: Removes old storage loader
  • lxd/migrate/container: Removes old storage loader
  • lxd/migrate/storage/volumes: Removes old storage loader
  • lxd/resources: Removes old storage loader
  • lxd/storage/pools/utils: Removes old storage loader
  • lxd/storage/pools: Removes old storage loader
  • lxd/storage/volumes/snapshot: Removes old storage loader
  • lxd/storage/volumes: Removes old storage loader
  • lxd/storage: Removes old storage loader
  • lxd/instance/drivers/driver/qemu: Removes storage layer transition workaround
  • lxd/container/lxc: Makes Delete pool load logic same as VM type
  • lxd: Storage loader comments
  • lxd/storage: Removes unused functions
  • lxd/storage/drivers/drivers/mock: Adds mock driver
  • lxd/storage: Adds mock driver loading
  • lxd/storage: Additional error checking
  • lxd/storage/zfs: Set volmode=none for VM datasets
  • lxd/logging: Updates log rotate to only remove .log files
  • lxd/db: Rename ContainerListExpanded to instanceListExpanded
  • lxd/db: Make instanceListExpanded account for projects without "features.profiles" enabled
  • Removed Erroneous Space
  • i18n: Update translation templates
  • scripts: Update Project Tab Complete Script
  • lxd/storage/drivers/driver/zfs/volumes: Create block volumes with volmode=none
  • lxd/storage/drivers/driver/zfs/volumes: Use MountTask with CreateVolume
  • lxd/storage/drivers/zfs/volumes: Makes MountVolume and UnmountVolume more thorough in detecting mounts
  • lxd/storage/drivers/driver/lvm/volumes: Always ensure mount path after mount in CreateVolume
  • lxd/storage/drivers/driver/common: Adds moveGPTAltHeader
  • lxd/storage/drivers/driver/lvm/volumes: Adds moveGPTAltHeader usage
  • lxd/storage/drivers/driver/zfs/volumes: Adds moveGPTAltHeader usage
  • lxd/storage/drivers/driver/dir/volumes: Adds moveGPTAltHeader usage
  • lxd/storage/drivers/driver/btrfs/volumes: Adds moveGPTAltHeader usage
  • lxd/storage/drivers/driver/ceph/volumes: Adds moveGPTAltHeader usage
  • lxd/storage/drivers/utils: Separates block file rounding logic into own function
  • lxd/storage/drivers/generic/vfs: Adds genericVFSResizeBlockFile
  • lxd/storage/drivers/driver/btrfs/volumes: ensureVolumeBlockFile usage
  • lxd/storage/drivers/driver/dir/volumes: Adds block resize support to SetVolumeQuota
  • lxd/storage/drivers/driver/btrfs/volumes: Adds block resize support to SetVolumeQuota
  • lxd/storage/drivers/driver/zfs/volumes: Call SetVolumeQuota from CreateVolumeFromCopy
  • lxd/storage/drivers/driver/zfs/volumes: Apply block size changes in SetVolumeQuota
  • lxd/storage/drivers/driver/btrfs/volumes: Calls SetVolumeQuota when creating/updating volumes
  • lxd/storage/drivers: SetVolumeQuota falls back to defaultBlockSize
  • lxd/patches: Updates patches to use new storage driver mount/unmount
  • lxd/patches: Replaces s.StoragePoolCreate with new storage framework
  • lxd/storage: Removes storagePoolInit
  • scripts: Fix syntax errror
  • lxd/main/init: Removes legacy storage drivers from availableStorageDrivers
  • lxd/patches: Updates patchStorageApiPermissions to use new storage drivers
  • lxd/storage: Removes storageCoreInit function
  • lxd/storage: Removes legacy drivers from storagePoolDriversCacheUpdate
  • lxd/db: Start-up check ignores pending nodes with out-of-date schema
  • lxd/patches: Removes old storage layer from upgradeFromStorageTypeLvm
  • lxd/container/lxc: Removes some calls to the old storage layer
  • lxd/migrate/container: Removes calls to old storage layer
  • lxd/migrate/storage/volumes: Removes calls to old storage layer
  • lxd/patches: Switches upgradeFromStorageTypeLvm to use new storage layer
  • lxd/storage/migration: Removes unused functions
  • lxd/instance: Extract LoadInstanceDatabaseObject from fetchInstanceDatabaseObject
  • lxd/project: Add initial CheckLimitsUponInstanceCreation
  • lxd/project: Check that the project's "limits.memory" is honored when creating an instance
  • lxd/project: Add CheckLimitsUponInstanceUpdate
  • lxd/project: Add initial ValidateLimitsUponProjectUpdate
  • lxd/project: Validate changes to the project's "limits.memory" value
  • lxd/project: Add CheckLimitsUponProfileUpdate
  • lxd/project: Check that the project's "limits.processes" config is honored
  • lxd/project: Don't allow percentage values for limits.memory
  • lxd/project: Skip limit checks if the project has no limits configured
  • lxd/project: Check that the project's "limits.cpu" config is honored
  • api: Use project.Config as etag field, without specifiying individual keys.
  • api: Properly detect which project config keys were specified in a PATCH request
  • api: Add helper logic to detect if a project config key has changed
  • api: Add new "limits.*" project configuration keys
  • api: Plug ValidateLimitsUponProjectUpdate into projectChange
  • api: Plug CheckLimitsUponInstanceCreation into containersPost
  • api: Plug CheckLimitsUponInstanceUpdate into containerPut and containerPatch
  • api: Plug CheckLimitsUponProfileUpdate into profilePut and profilePatch
  • test: Add project limits tests
  • shared/version: Add "projects_limits" API extension
  • doc: Add documentation about projects limits
  • lxd/storage/drovers/driver/lvm/utils: Dont format block volumes with filesystem
  • lxd/storage/zfs: Skip volmode on 0.6
  • lxd/storage: Removes unused files
  • lxd/container: Removes containerCreateEmptySnapshot
  • lxd/container/lxc: Removes legacy storage functions
  • lxd/main/init: Refactors availableStorageDrivers to not use old storage layer
  • lxd/main/init/auto: Removes dep on supportedStoragePoolDrivers
  • lxd/migrate: Removes old storage type reference
  • lxd/migrate/storage/volumes: Removes reference to old storage type
  • lxd/storage: Removes legacy storage interface and unused functions
  • lxd/storage/drivers/load: Adds AllDriverNames
  • lxd/storage/migration: Removes unused functions
  • lxd/storage/pools/config: Removes ref to supportedStoragePoolDrivers
  • lxd/storage/utils: Remove unused functions
  • lxd/storage/volumes/utils: Removes unused function
  • lxd/storage: Removes unused files
  • lxd/main/test: Removes legacy mock storage references
  • lxd/migrate: Removes unused struct
  • lxd/storage: Removes unused functions
  • lxc/containers: Fix cgns-less fallback
  • lxd/storage/drivers/driver/ceph/volume: Don't format block volumes with a filesystem
  • lxd/storage/drivers: Don't use named temporary dirs
  • lxd/instance/drivers/driver/lxc: Removes temporary lxc placeholder
  • lxd/container/lxc: Moves to instance/drivers package
  • lxd/container/lxc/exec/cmd: Moves to instance/drivers package
  • lxd/api/internal: instance.Container usage
  • lxd/container: instance.CriuMigrationArgs, inst.Migrate() and instance.Container usage
  • lxd/container/console: instance.Container usage
  • lxd/container/exec: instance.Container usage
  • lxd/container/lxc/utils: Removes idmapsetFromString
  • lxd/container/test: instance.Container usage
  • lxd/devices: inst.RegisterDevices usage
  • lxd/devlxd: Removes devlxdEventSend
  • lxd/devlxd: instance.Container usage
  • lxd/instance/drivers/driver/lxc: Renames containerLXC to lxc
  • lxd/instance/drivers/driver/lxc: Removes temporary loader placeholders
  • lxd/instance/drivers/driver/lxc: Renames lxc to liblxc
  • lxd/instance/drivers/driver/lxc: db.StoragePoolVolumeTypeContainer usage
  • lxd/instance/drivers/driver/lxc: Adds devLxdSendEvent
  • lxd/instance/drivers/driver/lxc: Updates use of instance.CriuMigrationArgs
  • lxd/instance/drivers/driver/lxc: Adds RegisterDevices function
  • lxd/instance/drivers/driver/lxc: Moves storage util functions and updates usage
  • lxd/instance/drivers/driver/lxc: Adds SaveConfigFile function
  • lxd/instance/drivers/driver/lxc/cmd: Renames ContainerLXCCmd to lxcCmd
  • lxd/instance/drivers/driver/qemu: Adds RegisterDevices as a no-op
  • lxd/instance/instance/interface: Adds RegisterDevices
  • lxd/instance/drivers/load: LXC loader functions renamed
  • lxd/migrate/container: instance.CriuMigrationArgs and instance.Container usage
  • lxd/patches: Updates patchContainerConfigRegen to use LXC.SaveConfigFile()
  • lxd/patches: BTRFS storage functions usage
  • lxd/patches/utils: storageDrivers.BTRFSSubVolumesGet and removes unused functions
  • lxd/storage: instance.Container usage
  • lxd/storage: storageDrivers util functions usage
  • lxd/storage/drivers/utils: Adds util functions moved from main pkg
  • lxd/apparmor/apparmor: Removes dependency on c.DaemonState()
  • lxd/container/snapshot: Removes dependency on sc.DaemonState()
  • lxd/instance/drivers/driver/test/utils: Adds PrepareEqualTest function
  • lxd/container/test: instanceDrivers.PrepareEqualTest usage to fix crash
  • lxd/instance/drivers/driver/lxc: golint fixes
  • lxd/instance/drivers/driver/lxc: Removes DaemonState function
  • lxd/instance/drivers/driver/qemu: Removes DaemonState function
  • lxd/instance/instance/interface: Removes DaemonState function
  • lxd/instance/instance/interface: Adds SaveConfigFile
  • lxd/migrate/container: Removes s.instance.DaemonState dependency
  • lxd/profiles/utils: Removes use of containerLXC type
  • lxd/seccomp/seccomp: Removes c.DaemonState dependency
  • lxd/storage/drivers/utils: golint fixes
  • lxd/instance/instance/interface: Adds Container interface
  • lxd/instance/instance/interface: Adds CriuMigrationArgs type
  • lxd/backup/backup: Comment clarifying existence of Instance interface
  • lxd/seccomp/seccomp: Comment clarifying existence of Instance interface
  • lxd/daemon: Moves shared mount state to use daemon.SharedMountsSetup var
  • lxd/instance/drivers/driver/lxc: Updates to use daemon.SharedMountsSetup var
  • lxd/instance/instance/interface: Adds Migrate function
  • lxd/instance/drivers/qemu: Adds Migrate placeholder function
  • lxd: Ensure gopkg.in/lxc/go-lxc.v2 is consistently imported as liblxc
  • lxd/instanc/instance/errors: Adds ErrNotImplemented error
  • lxd/instance/drivers/driver/qemu: instance.ErrNotImplemented usage
  • lxd/instance/drivers/driver/qemu: Adds SaveConfigFile placeholder
  • lxd/instance/instance/interface: Adds OnHook function to interface and adds hook constants
  • lxd/instance/drivers/driver/lxc: Implements OnHook function
  • lxd/instance/drivers/driver/qemu: Implements OnHook placeholder function
  • lxd/api/internal: Updates hook usage to OnHook
  • shared/idmap/idmapset/linux: Adds JSONUnmarshal function
  • lxd/storage: idmap.JSONUnmarshal usage
  • lxd/daemon: Import instance/drivers package so init() function runs
  • lxd/vm: Generate the template files
  • lxd-agent: Put templates in place
  • doc: Typo and formatting improvements
  • shared/idmap: Adds JSONMarshal function
  • lxd/device/disk: Replaces call to StorageVolumeMount with functions on disk device
  • lxd/storage: Removes storageVolumeMount and storagePoolVolumeAttachPrepare
  • lxd/storage/utils: Adds VolumeUsedByInstancesGet
  • lxd/storage/volumes/utils: storagePools.VolumeUsedByInstancesGet usage
  • lxd/storage: Removes unused functions
  • lxd/device: Removes usage of StorageRootFSApplyQuota, StorageVolumeMount and StorageVolumeUmount
  • lxd: Removes old storagePoolVolumeType constants
  • lxd: Removes storagePoolVolumeType constants
  • lxd/container/lxc/utils: Removes unused file
  • lxd/instance: Removes CGroupGet as is unused
  • seccomp: handle hugetlbfs mount syscall interception
  • lxd/device/disk: Validation error message quoting consistency
  • Promote nodes if for whatever reason the n of voters drop below 3
  • api: add container_syscall_intercept_hugetlbfs
  • cgroup: add support for the hugetlb controller
  • containers: add support for hugepage limits
  • api: add limits_hugepages api extension
  • doc: add limits.hugepages.* keys
  • lxd/vm: Set gic-version on arm64
  • lxd/device/disk: Adds support for adding directory source for VM 9p sharing
  • lxd/device/disk: Adds support for disk 9p directory share
  • lxd/instance/instance/type: Adds VMAgentMount type
  • lxd/instance/drivers/driver/qemu: Removes unused architecture var
  • lxd/instance/drivers/driver/qemu: Adds support for passing through unix socket FD to qemu
  • lxd/instance/drivers/driver/qemu: Adds openUnixSocket function
  • lxd/instance/drivers/driver/qemu: Adds addFileDescriptor function
  • lxd/instance/drivers/driver/qemu: Adds addDriveDirConfig function
  • lxd/instance/drivers/driver/qemu/templates: Adds 9p directory disk device template
  • lxd-agent/main/agent: Adds support for mounting 9p shares
  • lxd/instance/drivers/driver/qemu: Tweaks template whitespace removal to leave newline between sections
  • lxd/project/project: Renames Prefix() to Instance()
  • lxd: project.Instance() usage
  • lxd/project/project/test: Updates for project.Instance rename
  • lxd/instance/drivers: Add trans=virtio to 9p mount
  • Missing bootstrap error check
  • lxd-agent: Load vhost module
  • lxd/storage/zfs: Fix default VM size
  • lxd/vm: Tweak to mount field names
  • lxd-agent: Create mount path if missing
  • doc: Tweak markdown format for itemization
  • lxd/storage/ceph: Implement GetVolumeUsage
  • lxd/device/disk: Adds mountPoolVolume function
  • lxd/device/disk: Error message quoting
  • lxd/device/disk: Adds pool volume support for VMs
  • lxd/device/disk: Switches createDevice to use d.mountPoolVolume for containers
  • lxd/device/disk: Renames storagePoolVolumeAttachPrepare to storagePoolVolumeAttachShift
  • lxd/device/disk: Ensures custom pool volumes are unmounted on VM device stop
  • unix-hotplug: fix device removal and zero padding
  • i18n: Update translations from weblate

Try it for yourself

This new LXD release is already available for you to try on our demo service.

Downloads

The release tarballs can be found on our download page.

Binary builds are also available for:

  • Linux: snap install lxd
  • MacOS: brew install lxc
  • Windows: choco install lxc

LXD 3.21 has been released

13th of February 2020

Introduction

The LXD team is very excited to announce the release of LXD 3.21!

This was another shorter two weeks development cycle for us, full of storage, VM and network bugfixes and refactoring.

On the feature side of things, we have a new easier way to attach network interfaces, clustering database configurations and a variety of virtual machine improvements.

Enjoy!

Highlights

New way to attach to LXD managed networks

When using a bridge network that's directly managed by LXD (see lxc network list), you can now attach instances to it directly by using:

eth0:
    type: nic
    network: lxdbr0
    name: eth0

Or lxc config device add c1 eth0 nic network=lxdbr0 name=eth0

No need to set nictype: bridged or the parent: lxdbr0 property. Instead just set network to the name of the LXD network and you're done.

In this mode, the bridge MTU is automatically inherited by the network interface, IPv4/IPv6 addresses are validated against the network's configured subnets and the MAAS IPv4 and IPv6 subnets can now be configured through the network rather than the individual interfaces.

Ceph ported to new storage driver infrastructure

The Ceph storage driver is the latest and last storage driver to be ported to the new storage infrastructure. This should be an invisible change to users, but we would recommend users of Ceph on LXD try upgrading non-critical systems to 3.21 first and promptly report any issue related to storage.

With this last driver ported, we can now begin the work of removing all the old storage infrastructure from the LXD codebase, which should make things significantly easier to maintain going forward.

Clustering: Configurable number of active and standby database members

Two new configuration options have been added for clusters.

  • cluster.max_voters configures the expected number of active database cluster members (voting)
  • cluster.max_standby configures the expected number of standby database cluster members (non-voting)

The default configuration is for 3 voting members and 2 standby members. When a voting member goes down, a standby immediately gets promoted to voting and a spare idle member may then get promoted to standby.

Increasing the number of voting members will slow down the database performance as more members will need to agree on a change. Increasing the number of standby members will not affect database performance but will increase network load as more members will need to get the database binary stream.

Only the largest of clusters where loosing 2 or 3 members almost immediately is a possibility should consider increasing those default values.

VM: CPU pinning and topology

The limits.cpu key can now be set to specific CPU IDs just as is supported for containers. An example would be limits.cpu: 0,2 or limits.cpu: 0-3.

On top of pinning the VM's virtual CPUs to those listed physical CPUs (or threads), LXD also attempts to match up the CPU topology of the VM.

In the example above, limits.cpu: 0,2, on a dual-core Intel system with hyper-threading, this refers to the first core and its hyper-thread. The resulting virtual machine will therefore be configured with a single socket, single core, hyper-threaded CPU and have both threads be pinned to match the physical hardware.

The same logic supports, multi-socket, multi-core systems with or without hyperthreading. So long as the CPUs listed in limits.cpu correspond to a realistic hardware configuration (same number of cores coming from each socket, same number of threads on all cores, ...), then LXD will make the VM configuration match and will ensure that the pinning is done to match too.

If the requested configuration isn't correct (doesn't line up with hardware), LXD will fallback to providing a single socket, multi-core VM without hyperthreading, treating each of the list CPU IDs as a core. This obviously isn't ideal and a warning will be logged to the LXD log when this happens.

VM: Network and storage optimizations

For improved network performance, LXD now uses vhost_net for its network devices.

On the storage front, discard is now enabled on our virtio-scsi drives, allowing for blocks to be discarded, shrinking the underlying file storage or allowing backing drives to better manage their blocks.

VM: Agent-less reporting of IPv6 addresses

Up until now, virtual-machine IP addresses were retrieved only from LXD's DHCP server. This works quite reliably for IPv4, but most IPv6 deployments use SLAAC which doesn't come with a DHCPv6 lease and so wouldn't be reported by LXD.

One way around this was to rely on the LXD agent as when it's running inside the VM, it will be used to retrieve the network information for the virtual machine.

But for cases where that's not possible, LXD now also looks at the IPv6 neighborhood records for any matching IPv6 addresses.

stgraber@castiana:~$ lxc list win10
+-------+---------+----------------------+----------------------------------------------+-----------------+-----------+
| NAME  |  STATE  |         IPV4         |                     IPV6                     |      TYPE       | SNAPSHOTS |
+-------+---------+----------------------+----------------------------------------------+-----------------+-----------+
| win10 | RUNNING | 10.166.11.118 (eth0) | 2001:470:b368:4242:9dff:908:98a9:c0c3 (eth0) | VIRTUAL-MACHINE | 0         |
+-------+---------+----------------------+----------------------------------------------+-----------------+-----------+

Complete changelog

Here is a complete list of all changes in this release:

  • lxd/migrate/container: Fixes migrate refresh final sync snapshot bug
  • lxd/migration/migration/volumes: Comment on Data property of VolumeSourceArgs
  • lxd/storage/drivers/driver/zfs/volumes: Explain use of volSrcArgs.Data for migration
  • lxd/instance/drivers/load: Pass copy of device config to device.Validate
  • lxd/device/nic/bridged: Updates use of network pkg functions
  • lxd/device/nic/bridged: Uses network.LoadByName to access n.HasDHCPvX() helpers
  • lxd/device: networkRandomDevName usage
  • lxd/network/network/load: Adds LoadByName function
  • lxd/network: Adds network type in network pkg
  • lxd/network/network/utils: Moves network utils from main pkg
  • lxd/instance/instance/utils: Removes NetworkUpdateStatic function link
  • lxd/instance/instance/utils: Adds more instance load functions
  • lxd/container: Removes instance load functions moved to instance pkg
  • container/lxc: network.UpdateDNSMasqStatic usage
  • lxd: instance.LoadNodeAll usage
  • lxd: instance.LoadByProject usage
  • lxd: instance.LoadByProjectAndName usage
  • lxd/device/device/utils/network: Updates network package usage
  • lxd/device/device/utils/network: Unexports some non-shared functions
  • lxd/network/utils: Removes network utils functions used by network type
  • lxd/networks/config: Removes networkFillAuto function
  • lxd/networks: Removes network type and networkLoadByName function
  • lxd/device: networkCreateVlanDeviceIfNeeded and networkRandomDevName usage
  • lxd: network package usage
  • test: static analysis of network pkg
  • lxd/instance/drivers/driver/qemu: network.GetLeaseAddresses usage
  • lxd/instance/instance/utils: Removes linked function NetworkGetLeaseAddresses var
  • lxd/network/network/utils: Adds GetMACSlice and GetLeaseAddresses functions
  • lxd/networks: Removes networkGetLeaseAddresses functions
  • lxd/networks/utils: Removes networkGetMacSlice function
  • lxd/instances: Fix URLs to use /1.0/instances
  • seccomp: make device number checking more robust
  • Define MS_LAZYTIME for compatibility with old glibc
  • lxd/vm: Use vhost_net
  • lxd/vm: Enable block discard
  • shared/archive: Fix out of space logic
  • lxd/vm: Set Documentation in systemd units
  • lxd/vm: Silence writeback warning for config drive
  • lxd/device/nic/bridged: Load br_netfilter kernel module when using IPv6 filtering
  • lxd/networks/configs: Adds maas.subnet.ipv{4,6} to allowed network keys
  • lxd: Device name quoting in device errors
  • lxd/device/nic: Adds network as valid nic property
  • lxd/networks: Uses HasDHCPv6 function and updates comment
  • lxd/network: Adds DHCP range parsing functions
  • lxd/device/nic/bridged: Updates to use network type DHCP ranges functions and types
  • lxd/device/nic/bridged: Adds support for network property
  • doc: Adds API extension for instance_nic_network
  • shared/version/api: Adds API extension for instance_nic_network
  • test/suites/container/devices/nic/bridged: Adds network property tests
  • doc: Adds network property to instance NIC bridged device
  • lxd/storage/zfs: Fix argument ordering
  • unix hotplug: skip devices without associated devpath or major/minor
  • lxd: Switches to simpler conn.WriteMessage function
  • lxd/storage/drivers: Add MountedRoot to Info
  • lxd/storage: Honor MountedRoot in pool actions
  • lxd/networks: Consider IPv6 neighborhood entries
  • lxd: Uses gorilla WriteJSON where possible
  • lxd/storage/drivers: Set MountedRoot option
  • lxd/main_checkfeature: add explicit _exit() even if it's not needed
  • lxd/main_checkfeature: s/exit()/_exit()/g
  • cgo: export wait_for_pid() helper
  • lxd/main_checkfeature: close listener
  • lxd/main_checkfeature: don't depend on kcmp header
  • lxd/device: Async CEPH unmap
  • lxd/storage/drivers/driver/lvm: Uses d.thinpoolName() rather than d.config["lvm.thinpool_name"]
  • lxd/patches: setupStorageDriver usage
  • lxd/storage: Renames SetupStorageDriver to setupStorageDriver for consistency
  • lxd/storage/drivers/driver/zfs: Adds zfs kernel module load fail detection
  • lxd/daemon: setupStorageDriver usage
  • lxd/daemon: Comment consistency
  • lxd/storage/drivers/driver/lvm: Makes lvm.vg_name required for mounting
  • lxd/db/cluster/update: Adds updateFromV23 for ensuring lvm.vg_name key is set
  • lxd/db/cluster/update: Superfluous trailing whitespace
  • lxd/db/cluster/schema: v24 update
  • lxd/device/config/devices: Adds NICType function on Device type
  • lxd: Device.NICType usage
  • lxd/device/nic/bridged: Bans use of nictype when using network property
  • test: Updates nic bridged tests for NICType logic
  • lxd/network/network/utils: Fix network in use detection
  • lxd-agent/exec: Logs signal forwarding as info rather than error
  • lxd/container/exec: Only log finished mirror websocket when go routine exits
  • lxd/instance/drivers/driver/qemu: Fix go routine leak and hanging lxc clients
  • shared: Upper case first character of some debug messages
  • lxd/device/nic/bridged: Switches to dnsmasq.DHCPAllocatedIPs()
  • lxd/device/nic/bridged: Switches to dnsmasq.DHCPStaticIPs()
  • test/suites/container/devices/nic/bridged: Adds test to detect leaked filters
  • lxd/device/nic/bridged: Fixes bug that leaks ebtables filters
  • lxd/project: Adds InstanceParts() function for separating project prefixed Instance name
  • lxd/storage/load: Updates volIDFuncMake to use project.InstanceParts()
  • lxd/util: Fix IP/host tests on other distros
  • lxd/storage/drivers: Add Ceph driver
  • lxd: Use new storage code for Ceph clustering
  • Unlock when isLeader failure
  • lxd/storage/ceph: Function ordering and comments
  • lxd/storage/ceph: Properly handle os.Remove
  • lxd/storage/ceph: Comment consistency
  • lxd/storage/ceph: Set DirectIO
  • lxd/storage/ceph: Unwrap if statement
  • lxd/storage/ceph: Unwrap function signatures
  • lxd/storage/ceph: Rework MountVolume
  • lxd/patches: Re-run VM path creation
  • tests: Add ceph to list of new drivers
  • lxd/firewall: Moves iptables/xtables implementation into firewall/drivers package
  • Consider the default port when checking address overlap
  • lxd/firewall: Updates interface and loader for new pkg
  • lxd: firewall/drivers pkg usage
  • lxd/device/config/device/proxyaddress: Moves ProxyAddress type
  • lxd/main/forkproxy: Updates use of ProxyAddress type
  • lxd/device/proxy: Switches to use firewall.InstanceSetupProxyNAT()
  • lxd/firewall/firewall/interface: Reworks firewall interface
  • Re-disable clustering upgrade test
  • lxd: Fix error message when deleting storage pools
  • lxd/firewall/drivers/drivers/xtables: Implements xtables driver
  • lxd/network/network/utils: Adds UsesIPv4Firewall and UsesIPv6Firewall functions
  • lxd/device/nic/bridged: Switches to firewall.InstanceSetupBridgeFilter and InstanceClearBridgeFilter
  • lxd/network/network: firewall.NetworkSetupForwardingPolicy usage
  • lxd/network: firewall.NetworkSetupOutboundNAT usage
  • lxd/network: Updates firewall DHCP/DNS function usage
  • lxd/firewall/drivers/consts: Removes unused constants
  • lxd/network: Updates to use firewall helper functions
  • lxd/dnsmasq: Makes DHCPStaticIPs project aware
  • lxd/device/nic/bridged: dnsmasq.DHCPStaticIPs project usage
  • lxd/network/network/utils: dnsmasq.DHCPStaticIPs project usage
  • test: Removes old iptables package from static analysis
  • test: Fixes iptables rule leak in clustering test
  • shared: Add HostPathFollow
  • lxc/file: Follow symlinks on individual file transfers
  • lxd/container: Protect file push/pull from shift
  • Add cluster.n_voters and cluster.n_standby configuration keys
  • Load configuration keys when checking for n of voters/stand-by
  • doc/clustering.md: describe usage of clustering size config keys
  • Drive-by: fix check for degraded cluster
  • doc/server.md: add cluster.max_voters/max_standby
  • api: Add clustering_sizing extension
  • Revert "lxd/instance/drivers/driver/qemu: Fix go routine leak and hanging lxc clients"
  • lxd/instance: Move ParseCpuset
  • lxd/vm/qmp: Allow retrieving vCPU pids
  • lxd/vm: Implement CPU pinning
  • shared: get_poll_revents(): handle EAGAIN in addition to EINTR
  • lxc: send SIGTERM when there's no controlling terminal
  • shared: Add Uint64InSlice
  • lxd/vm: Template sockets/cores/threads config
  • lxd/vm: Attempt to line up CPU topology
  • lxd init: Don't allow empty strings for the cluster host name
  • node/config.go: Don't allow wild card addresses for cluster.https_address
  • idmap:acl: don't add but update the acls
  • shared/util: Tweak HostPathFollow to use readlink
  • lxc/file: Expand complex symlink chains
  • i18n: Update translations from weblate

Try it for yourself

This new LXD release is already available for you to try on our demo service.

Downloads

The release tarballs can be found on our download page.

Binary builds are also available for:

  • Linux: snap install lxd
  • MacOS: brew install lxc
  • Windows: choco install lxc

LXD 3.20 has been released

30th of January 2020

Introduction

The LXD team is very excited to announce the release of LXD 3.20!

We purposefully accelerated our normal monthly release cycle to just two weeks as a way to quickly integrate the many enhancements and bugfixes that followed the release of LXD 3.19. We intend to keep up this pace until the release of LXD 4.0 at which point we'll resume the monthly cadence.

This release includes 3 features/improvements contributed by students at the University of Texas in Austin:

  • Server side support of API collections
  • New unix-hotplug device type
  • Reworked background process management

On top of integrating those, we've also been focusing on filling in some of the current gaps in our VM story, fixing many bugs since 3.19 came out and now completing its network interface handling, adding support for ppc64le and support for boot device ordering.

Enjoy!

Highlights

Server side support of API collections

As our users are dealing with increasingly larger sets of instances and images, filtering all those records on the client side can become quite expensive. With this release, we're now adding the infrastructure and initial implementation of server side filtering.

This looks like:

stgraber@castiana:~/data/code/lxc/lxd (lxc/master)$ lxc query '/1.0/instances?filter=config.image.os%20eq%20ubuntu'
[
    "/1.0/instances/snapcraft",
    "/1.0/instances/ups-monitor",
    "/1.0/instances/v1",
    "/1.0/instances/maas01",
    "/1.0/instances/steam",
    "/1.0/instances/lxd-build"
]

This is using config.image.os eq ubuntu as a filter using URL encoding. More details on the filtering options can be found here.

New unix-hotplug device type

This device type is a bit of a cross between usb and unix-char and unix-block.

It allows specifying a specific vendorid/productid and have any resulting unix-char/unix-block devices be automatically passed to the container.

An example with a USB drive:

stgraber@castiana:~$ lxc config device add c1 kingston unix-hotplug vendorid=0951 productid=1666
Device kingston added to c1

stgraber@castiana:~$ lxc exec c1 bash
root@c1:~# ls -lh /dev/
total 0
crw--w---- 1 root   tty     136,   0 Jan 30 23:00 console
lrwxrwxrwx 1 root   root          11 Jan 30 22:59 core -> /proc/kcore
lrwxrwxrwx 1 root   root          13 Jan 30 22:59 fd -> /proc/self/fd
crw-rw-rw- 1 nobody nogroup   1,   7 Jan 13 03:59 full
crw-rw-rw- 1 nobody nogroup  10, 229 Jan 30 22:59 fuse
lrwxrwxrwx 1 root   root          25 Jan 30 22:59 initctl -> /run/systemd/initctl/fifo
lrwxrwxrwx 1 root   root          28 Jan 30 22:59 log -> /run/systemd/journal/dev-log
drwxr-xr-x 2 nobody nogroup       60 Jan 30 22:46 lxd
drwxrwxrwt 2 nobody nogroup       40 Jan 13 03:59 mqueue
drwxr-xr-x 2 root   root          60 Jan 30 22:59 net
crw-rw-rw- 1 nobody nogroup   1,   3 Jan 13 03:59 null
crw-rw-rw- 1 root   root      5,   2 Jan 30 22:59 ptmx
drwxr-xr-x 2 root   root           0 Jan 30 22:59 pts
crw-rw-rw- 1 nobody nogroup   1,   8 Jan 13 03:59 random
drwxrwxrwt 2 root   root          40 Jan 30 22:59 shm
lrwxrwxrwx 1 root   root          15 Jan 30 22:59 stderr -> /proc/self/fd/2
lrwxrwxrwx 1 root   root          15 Jan 30 22:59 stdin -> /proc/self/fd/0
lrwxrwxrwx 1 root   root          15 Jan 30 22:59 stdout -> /proc/self/fd/1
crw-rw-rw- 1 nobody nogroup   5,   0 Jan 30 21:23 tty
crw-rw-rw- 1 nobody nogroup   1,   9 Jan 13 03:59 urandom
crw-rw-rw- 1 nobody nogroup   1,   5 Jan 13 03:59 zero

root@c1:~# ls -lh /dev/
total 1.0K
drwxr-xr-x 3 root   root          60 Jan 30 23:01 bus
crw--w---- 1 root   tty     136,   0 Jan 30 23:00 console
lrwxrwxrwx 1 root   root          11 Jan 30 22:59 core -> /proc/kcore
lrwxrwxrwx 1 root   root          13 Jan 30 22:59 fd -> /proc/self/fd
crw-rw-rw- 1 nobody nogroup   1,   7 Jan 13 03:59 full
crw-rw-rw- 1 nobody nogroup  10, 229 Jan 30 22:59 fuse
lrwxrwxrwx 1 root   root          25 Jan 30 22:59 initctl -> /run/systemd/initctl/fifo
lrwxrwxrwx 1 root   root          28 Jan 30 22:59 log -> /run/systemd/journal/dev-log
drwxr-xr-x 2 nobody nogroup       60 Jan 30 22:46 lxd
drwxrwxrwt 2 nobody nogroup       40 Jan 13 03:59 mqueue
drwxr-xr-x 2 root   root          60 Jan 30 22:59 net
crw-rw-rw- 1 nobody nogroup   1,   3 Jan 13 03:59 null
crw-rw-rw- 1 root   root      5,   2 Jan 30 22:59 ptmx
drwxr-xr-x 2 root   root           0 Jan 30 22:59 pts
crw-rw-rw- 1 nobody nogroup   1,   8 Jan 13 03:59 random
brw-rw---- 1 root   root      8,   0 Jan 30 23:01 sda
brw-rw---- 1 root   root      8,   1 Jan 30 23:01 sda1
drwxrwxrwt 2 root   root          40 Jan 30 22:59 shm
lrwxrwxrwx 1 root   root          15 Jan 30 22:59 stderr -> /proc/self/fd/2
lrwxrwxrwx 1 root   root          15 Jan 30 22:59 stdin -> /proc/self/fd/0
lrwxrwxrwx 1 root   root          15 Jan 30 22:59 stdout -> /proc/self/fd/1
crw-rw-rw- 1 nobody nogroup   5,   0 Jan 30 21:23 tty
crw-rw-rw- 1 nobody nogroup   1,   9 Jan 13 03:59 urandom
crw-rw-rw- 1 nobody nogroup   1,   5 Jan 13 03:59 zero
root@c1:~# exit

Above you'll notice sda and sda1 showing up when I plug my USB key.

And with a yubikey:

stgraber@castiana:~$ lxc config device add c1 yubikey unix-hotplug vendorid=1050
Device yubikey added to c1

stgraber@castiana:~$ lxc exec c1 bash
root@c1:~# ykman info
Device type: YubiKey 5C
Serial number: 11576019
Firmware version: 5.2.4
Form factor: Keychain (USB-C)
Enabled USB interfaces: FIDO+CCID

Applications
OTP         Disabled    
FIDO U2F    Enabled     
OpenPGP     Enabled     
PIV         Enabled     
OATH        Disabled    
FIDO2       Enabled     
root@c1:~#

Support for standby cluster members

The dqlite-based cluster database logic was extended to make use of newly supported standby and idle roles in dqlite.

With this change in place, all cluster members will now be integrated with dqlite, they will then each hold one of the following three roles:

  • voting member
  • standby member
  • idle member

The configuration is for 3 voting members, followed by 2 standby members with the rest of the members being idle. In the event of a loss of a voting member, after a short timeout a non-voting member will get auto-promoted to voting. Idle members will be promoted to non-voting as needed to keep the set number of voting and standby members.

The end result is a much more resilient LXD cluster which will better handle cluster members going offline for maintenance or power failure.

VM: Extended NIC support

With this release, nic devices for virtual machines now support:

  • macvlan (using macvtap)
  • sriov
  • physical
  • p2p

Both SR-IOV and physical NIC passthrough rely on PCI passthrough to the virtual machines. This requires a properly configured IOMMU setup as well as adequate PCI setup.

VM: boot priority

A new boot.priority option is now present on all disk and nic type devices for use with virtual machines. The higher the priority, the more likely the VM is to boot from the device.

This is of particular use when one wants a VM to always boot from the network rather than use the default behavior of booting from its root disk.

VM: ppc64le host support

Initial support for ppc64le hosts has been added. This behaves in much the same way as x86_64 and aarch64 except for the fact that a regular PCI bus is used rather than PCIe and the firmware is SLOF rather than UEFI.

Complete changelog

Here is a complete list of all changes in this release:

  • Fix typo
  • Add role column to raft_nodes table
  • Make db.RaftNode an alias for dqlite.NodeInfo, which has a Role field
  • lxd/cluster: rename raft.go to info.go
  • Drop legacy newRaft() function, leftover from the hashicorp/raft time
  • Replace raftAddressProvider intefrace with a simple raftAddress() method
  • Gateway.currentRaftNodes(): return only voting nodes
  • Use the ID from the cluster nodes table as raft ID
  • Make RaftNodesReplace() skip non-voters
  • Include role when exchanging nodes in join/rebalance internal APIs
  • Always join the dqlite cluster, possibly as non-voter
  • Attempt to probe to a member which is considered offline
  • Connect to the target node before spanwing the image replication goroutine
  • Only contact voter nodes when searching for the cluster leader
  • Configure the dqlite client store to only connect to voter nodes
  • Load the role column of raft_nodes in db.RaftNodes()
  • Store the role of a node in RaftNodesReplace
  • Only start the dqlite engine for voter nodes
  • Include role information in heartbeat messages
  • Return also non-voter nodes in currentRaftNodes
  • Fix ineffective heartbeat upon join
  • Drop unused target variable in Join/Promote/Leave cluster functions
  • Start the dqlite engine also on non-voter nodes
  • Add cluster.Handover which finds a node eligible to become voter
  • Extract logic to POST a promote request into a new changeMemberRole() function
  • Attempt to transfer leadership to another member when shutting down
  • Add /internal/cluster/handover endpoint to transfer voter role
  • Add handoverMemberRole() helper to transfer the responsibilities of a member
  • Update gateway's identify info upon role change
  • Rename cluster.Promote to cluster.Assign
  • Rename /internal/cluster/promote to /internal/cluster/assign
  • Remove database role when demoting
  • When a voter is shutdown, handover the role to another member
  • Assign up to 2 StandBy roles beyond the initial 3 voters
  • Return only voter nodes in cluster.ListDatabaseNodes()
  • When leaving, use currentRaftNodes() instead of querying the raft_nodes table
  • Redirect member delete requests to the leader
  • Serialize membership-related requests on the leader
  • Drop clusterRebalance helper, since it is used only once
  • Drop ineffective post-join heartbeat
  • Add rebalanceMemberRoles() helper and use it in the delete member API handler
  • Drop unused tryClusterRebalance()
  • Test shutting down two members concurrently
  • Close dqlite clients after use
  • Automatically demote offline nodes when running cluster.Rebalance
  • Automatically promote spare nodes if a voter goes offline
  • Assign roles to members not part of the raft configuration
  • Export MaxVoters and MaxStandBys
  • Trigger rebalance also if there are not enough voters or standbys
  • Downgrade rebalance error to warning, it should not block node removal
  • lxd/container: Improves error messages in instanceValidDevices
  • lxd/container: instance.ValidDevices usage
  • lxd/container/lxc: instance.ValidDevices usage
  • lxd/device/config/devices: Improves error messages
  • lxd/device/disk: Adds support for VM disk devices
  • lxd/instance/instance/interface: Comment ending consistency
  • lxd/instance/qemu/vm/qemu: Fixes driver index loop bug
  • lxd/instance/instance/utils: Introduces constant to indicate profile validation in instance name
  • lxd/profiles: Switches to use instance.ProfileValidationName during profile validation
  • lxd/device/disk: Updates Stop device to understand VM disks
  • Make cluster.Rebalance fail immediately if not leader
  • Export cluster.ErrNotLeader
  • Silence warning about failing to rebalance when not leader
  • lxd/storage/drivers/driver/common: Removes generic vfs functions as not common to all driver types
  • Re-enable clustering upgrade test
  • lxd/storage/drivers/generic/vfs: Moves generic VFS drivers into standalone file
  • lxd/storage/drivers: Updates usage of generic VFS functions
  • Add upgrade test for an 8-member cluster
  • Make upgrade notifications more robust
  • Wait for leadership to settle before running lxc cluster list
  • lxd/instance: Moves vm qemu pkg into instance/drivers pkg
  • lxd/instance/drivers/container/lxc: Adds placeholder for future lxc implementation
  • lxd/instance/drivers/load: Adds instance load functions
  • lxd/container: Removes unused functions
  • lxd/db/containers: Renames ContainerToArgs to InstanceToArgs
  • lxd/container: db.InstanceToArgs usage
  • lxd/profiles/utils: db.InstanceToArgs usage
  • lxd/profiles/utils: Updates use of containerLXCInstantiate
  • lxd/container/lxc: Push containerLXC load functions into instance/drivers package
  • lxd/container/lxc: containerLXCInstantiate usage
  • lxd/container/lxc: Makes containerLXCInstantiate compatiable with generic instance load functions
  • lxd/containers: instance.Load usage
  • lxd/containers/post: instance.Load usage
  • lxd/instance/drivers/vm/qemu: Unexport and rename load functions
  • lxd/instance/instance/utils: Load function comments
  • lxd/instance/instance/utils: Adds Create instance function placeholder
  • lxd/instance/instance/utils: db.InstanceToArgs usage
  • lxd/instance/drivers/vm/qemu: Unexports qemu implementation
  • lxd/exec: Pass full req through
  • lxd/exec: Forward control messages
  • lxd/containers: Fix error handling on stop
  • lxd/vm: Fix stop race condition
  • lxd/vm: Add locking for stop and shutdown
  • lxd/vm: Don't crash on vm-initiated reboots
  • lxd/storage: Remove legacy volume.size check
  • lxc/init: Consider image type for instance type
  • i18n: Update translation templates
  • tests: Update volume.size tests
  • lxd/vm: Store qemu log
  • [Makefiles] Whitelist ldflags in libcap pkgconfig
  • lxd/vm: Fix incorrect bootindex
  • lxd/vm: Implement snapshot restore
  • lxd/instance: Move LoadAllInternal
  • lxd/vm: Implement Snapshots
  • lxd/storage/drivers/utils: Updates ensureVolumeBlockFile to use minimum block boundary size of 8192 bytes
  • lxd/storage/drivers/driver/lvm/utils: Avoid repetition of 512 bytes in roundedSizeBytesString
  • doc: Corrects lvm striping options
  • lxd/instance: Renames driver files for consistency
  • lxd/instance: Comment clarification
  • lxd-agent: Fixes bug when agent not seen as started if LXD restarted
  • lxd/device/device/utils/network: Adds host MTU support for VM tap devices
  • lxd/device/nic/bridged: Makes VM host side TAP interface name prefixed with "tap"
  • lxd/instance/drivers/qemu: Switch to template pkg to generate qemu conf
  • doc/api-extensions: Fix syntax
  • api: vm_boot_priority
  • lxd/vm: Add boot.priority
  • lxd/container/logs: Makes log file retrieval project aware
  • lxd/container/lxc: Adds devName skipping for startCommon
  • lxd/device/config/device/runconfig: Adds DevName to MountEntryItem
  • lxd/device/disk: Adds DevName to MountEntryItem
  • lxd/device: Adds devName property to network interface run config
  • lxd/instance/drivers/driver/qemu: Adds support for Disk and NIC device boot.priority setting
  • Use a light TCP/TLS connection attempt instead of a client request
  • lxd/container/exec: Removes duplication of env map now its being stored back into post data
  • Revert "lxd/exec: Forward control messages"
  • lxd/instance/drivers/driver/qemu/cmd: Makes qemu cmd struct qemu specific
  • lxd/instance/drivers/driver/qemu: Simplifies Exec with revert
  • lxd/container/exec: Cleaned up logging
  • lxd/container/exec: Switches to use instance command for resizing window
  • lxd/container/lxc/exec/cmd: Adds WindowResize
  • lxd/instance/instance/exec/cmd: Adds WindowResize function to signature
  • lxd/instance/drivers/driver/qemu: Reworks command control
  • lxd/instance/drivers/driver/qemu/cmd: Adds WindowResize support
  • lxd/instance/drivers/driver/qemu: Sets PID to 0 for VM commands
  • lxd/instance/drivers/driver/qemu: comment on forwardControlCommand
  • lxd/device/nic/p2p: Adds VM support
  • Fix translation of hard-coded address of first node
  • Close http transports since they might keep connections around
  • lxd/daemon: Ignore SIGHUP
  • lxd/instance/drivers/driver/qemu: Switch to unsafe async I/O mode on ZFS pools backed by loop files
  • lxd/storage: Improves pool init failure messages
  • lxd/storage/drivers: Indicates DirectIO support for most storage drivers
  • lxd/storage/drivers/driver/types: Adds DirectIO indicator to driver info struct
  • shared/version/version: Quotes malformed version string in error message
  • lxd/storage/drivers/driver/zfs: Adds DirectIO detection based on version
  • lxd/instance/drivers/driver/qemu: Unmounts volume on start failure if needed
  • lxd/device: Relaxes requirement for name property when not using containers
  • lxd/device/nic/macvlan: Clean up valid fields
  • lxd/device/nic/macvlan: Adds VM support and improves revert
  • lxd/instance/drivers/driver/qemu: Adds macvtap support
  • lxd/instance/drivers/driver/qemu/templates: Moves templates to separate file
  • lxd/instance/drivers/driver/qemu: Updates template usage
  • lxd/storage/drivers/driver/dir: Adds HostPath support
  • storage: Fix xfs_growfs command for older versions
  • shared/simplestreams: Fix architecture filtering
  • lxd/patches: Reset ZFS mountpoint/canmount
  • shared/simplestreams: Fix inconsistent sorting
  • lxd/instances: Don't rquire type on copy
  • lxc/config: Tweak argument processing
  • lxd/vm: Prevent attaching directory as disk
  • lxd/storage/zfs: Ignore bookmarks
  • lxd/storage/btrfs: Skip missing quota
  • doc/instance: Clarifies disk path not available for VMs
  • lxd/instance/drivers/qmp/monitor: Prevent crashes with races closing closed channel
  • lxd/instance/drivers/driver/qemu: Improve clean up on start failure
  • Fix request redirect when removing a cluster member
  • lxd/storage/backend/lxd: Only detect volume.block.filesystem changes on block backed pool FS volumes
  • lxd/migration/migration/volumes: Adds support for pre-bidirectional negotiation targets
  • lxd/container/lxc: Removes VM specific NIC config ignoring
  • lxd/device: Only return devName NIC config item for VMs
  • lxd/device/nic/physical: Improves revert and deletion of created VLAN devices
  • lxd/instance/drivers/driver/qemu/templates: Clarifies qemuNetdevPhysical variables
  • lxd/device/nic/macvlan: Differentiates config parent from actual parent
  • lxd/device/device/utils/network: Adds networkGetDevicePCIDevice function
  • lxd/device/nic/sriov: Updates networkGetVFDevicePCISlot to use networkGetDevicePCIDevice
  • lxd/instance/drivers/driver/qemu: Adds physical NIC passthrough support
  • shared/instance: Updates config key checker to allow ".driver" keys
  • doc/instance: Documents which device types can be used with which instance types
  • lxd/device/device/utils/network: Adds generic PCI device bind/unbind functions
  • lxd/device/device/utils/network: Adds networkVFIOPCIRegister
  • lxd/device/nic/sriov: Switches PCI device bind/unbind to generic functions
  • lxd/device/nic/physical: Adds VM PCI passthrough support
  • lxd/device: Unexports NetworkRemoveInterfaceIfNeeded
  • lxd/instance: Add NetworkUpdateStatic
  • Add maasRename to VM
  • lxd/storage/generic: Don't fail rename on missing path
  • lxd/storage/zfs: Fix block mounts
  • lxd/storage/zfs: Fix renames
  • lxd/vm: Implement Rename
  • lxd/device/nic/sriov: Adds VM support
  • lxd/instance/drivers/driver/qemu: Mount VM config vol before generating NVRAM file
  • lxd/device: Add unix_hotplug device type
  • lxd/device: Add support for listening to unix char and block udev events
  • lxd/storage: Pass config when deleting images
  • lxd/devices: Remove dead xtables code
  • lxd/iptables: Fix matching of IPv6 link-local
  • lxd: Updates usage of migration.MatchTypes
  • lxd/migration/migration/volumes: Updates MatchTypes to return all supported migration types
  • lxd/migration/migration/volumes: Break after first rsync transport features extracted
  • shared/subprocess: Cleanup test script
  • shared/subprocess: Fix Wait, tty and ignore stdin
  • shared/subprocess: Better handle not running
  • lxd/networks: Avoid dnsmasq reload on start
  • lxd: Switch to using the new subprocess module
  • lxd/patches: Convert PID files
  • shared/subprocess: Cleanup tests
  • shared/subprocess: Use channel for Wait
  • lxd/apparmor: Allow ro,remount,noatime,bind
  • lxd/storage/drivers: Pass mountPath to xfs_growfs
  • lxd/container: Removes containerValidName function
  • lxd/container: Switches to instance.ValidName
  • lxd/instance/instance/utils: Adds ValidName function
  • shared/util: Modifies ValidHostname to return specific error
  • shared/instance: InstanceGetParentAndSnapshotName comments
  • lxd/storgage/locking/lock: Fixes concurrent access race to map
  • global: Replace Fatalf by Errorf in tests
  • shared/generate: Fix regression caused by Fatalf fix
  • devices: retrieve vendor and product for hidraw devices
  • lxd/db: Fix for new testify
  • lxd/main: Adds cmdGlobal.rawArgs function
  • lxd: Adds forklimits command
  • lxd/instance/drivers/driver/qemu: Switches to launching qemu via forklimits
  • devices: substract libudev header
  • lxd/db: adds unix-hotplug device type to database
  • lxd/instance/drivers/driver/qemu: Adds qemu binary path lookup
  • lxd/main/forklimits: Switches forklimits to use syscall.Exec
  • shared/cert: Replace default IPs with localhost
  • shared/subprocess: Improve error in test
  • spelling: yaml should be YAML
  • spelling: Busybox should be BusyBox
  • i18n: Update translation templates
  • doc/storage: Update for snap package
  • api: Add extension for new device type unix hotplug
  • doc/instances: added new device type unix hotplug
  • doc: Add libudev-dev dependency
  • lxd/vm: Record architecture name
  • lxd/vm: Cleanup qemu config
  • lxd/vm: Add ppc64el support
  • lxd/device/device/common: Splits device common into own file
  • lxd/device/device: Removes original device.go file
  • lxd/device/device/interface: Splits device interfaces into own file
  • lxd/device/device/load: Separates device load functions into own file
  • lxd/instance/drivers/driver/common: Adds common driver type
  • lxd/instance/instance/interface: Adds ConfigRead interface
  • lxd/instance/drivers/load: Updates validDevices() to use device.Validate function
  • lxd/instance/instance/utils: Removes instanceName from validateDevices function
  • lxd/instance/drivers/driver/qemu: Embeds common type and removes dupe functionality
  • lxd: instance.ValidDevices usage
  • lxd/device/device/utils/instance: Adds instanceSupported function
  • lxd/device: Updates device validateConfig to support instance.ConfigReader argument
  • api: Add api_filtering extension
  • lxd/filter: Add API filtering package
  • lxd/instance: Add instance list filtering functions
  • lxd: Make use of filtering for instances and images
  • doc/rest-api: Document filtering
  • tests: Add tests for API filtering
  • lxd/filter: Workaround gofmt bug
  • lxd/device/disk: Adds a check for mkisofs tool for qemu config drive
  • lxd/device/nic/sriov: Loads vfio-pci module
  • tests: Fix BusyBox spelling for filtering
  • lxd/vm: Fix bad bus name on ppc64el
  • lxd/vm: Don't specify addresses for pci on ppc64
  • i18n: Update translations from weblate

Try it for yourself

This new LXD release is already available for you to try on our demo service.

Downloads

The release tarballs can be found on our download page.

Binary builds are also available for:

  • Linux: snap install lxd
  • MacOS: brew install lxc
  • Windows: choco install lxc

LXD 3.19 has been released

16th of January 2020

Introduction

The LXD team is very excited to announce the release of LXD 3.19!

This is a jam packed release, including one huge feature we've been working on for the past few months, virtual machine support! It's now possible to run LXD on a system and manage both containers and virtual machines through the exact same CLI, API or even as part of a cluster deployment!

We also have a lot of other features, user experience improvements and fixes in this release, quite possibly making it our busiest release yet!

Enjoy!

PS: This release took quite a bit longer than our usual one month development cycle. This delay was caused by us wanting to complete the majority of our storage layer re-implementation as well as landing the virtual machine support based on top of it. We expect the next couple of LXD releases to come out on an accelerated cadence ahead of the big LXD 4.0 release in March/April.

Highlights

Virtual machine support

No doubt the main highlight of this release is the initial support for running virtual machines through LXD.

This is exactly what it sounds like. You can now mix and match system containers and virtual machines. Those virtual machines are also created from images, stored on the same storage pools as containers, connected to the same networks and even share configuration through profiles.

Interacting with a running virtual machine can be made almost identical to interacting with a container thanks to the LXD agent which when running inside a virtual machine allows the use of the standard exec, file and info features.

This is early work and we have a lot more pieces yet to be implemented, but as it stands, virtual machines can be created from Ubuntu images (with more distributions to come) or PXE booted.

All virtual machines run UEFI with secure boot enabled and we have support for configuring the number of cores and memory allocation as well as whether to use dedicated hugepages for memory backing. Cloud-init configuration can be exposed to the VM through a config drive or by using the agent if backed into an image.

Here is a basic example of creating an Ubuntu 18.04 VM, installing the agent and querying details and getting a shell inside it:

stgraber@castiana:~$ lxc profile create vm
stgraber@castiana:~$ lxc profile edit vm
stgraber@castiana:~$ lxc profile show vm
config:
  user.user-data: |
    #cloud-config
    ssh_pwauth: yes
    apt_mirror: http://us.archive.ubuntu.com/ubuntu/
    users:
      - name: ubuntu
        passwd: "$6$s.wXDkoGmU5md$d.vxMQSvtcs1I7wUG4SLgUhmarY7BR.5lusJq1D9U9EnHK2LJx18x90ipsg0g3Jcomfp0EoGAZYfgvT22qGFl/"
        lock_passwd: false
        groups: lxd
        shell: /bin/bash
        sudo: ALL=(ALL) NOPASSWD:ALL
description: VM specific configuration
devices:
  config:
    source: cloud-init:config
    type: disk
name: vm
used_by:

stgraber@castiana:~$ lxc launch ubuntu:18.04 v1 --vm --profile default --profile vm
Creating v1
Starting v1

stgraber@castiana:~$ lxc console v1
To detach from the console, press: <ctrl>+a q

Ubuntu 18.04.3 LTS v1 ttyS0

v1 login: ubuntu
Password: 
Welcome to Ubuntu 18.04.3 LTS (GNU/Linux 4.15.0-74-generic x86_64)

ubuntu@v1:~$ sudo -i
root@v1:~# mount -t 9p config /mnt/
root@v1:~# cd /mnt/
root@v1:/mnt# ./install.sh 
Created symlink /etc/systemd/system/multi-user.target.wants/lxd-agent.service → /lib/systemd/system/lxd-agent.service.
Created symlink /etc/systemd/system/multi-user.target.wants/lxd-agent-9p.service → /lib/systemd/system/lxd-agent-9p.service.

LXD agent has been installed, reboot to confirm setup.
To start it now, unmount this filesystem and run: systemctl start lxd-agent-9p lxd-agent
root@v1:/mnt# reboot

stgraber@castiana:~$ lxc info v1
Name: v1
Location: none
Remote: unix://
Architecture: x86_64
Created: 2020/01/17 02:23 UTC
Status: Running
Type: virtual-machine
Profiles: default, vm
Pid: 2490333
Ips:
  enp5s0:   inet    10.166.11.3
  enp5s0:   inet6   2001:470:b368:4242:216:3eff:fed2:cd5
  enp5s0:   inet6   fe80::216:3eff:fed2:cd5
  lo:   inet    127.0.0.1
  lo:   inet6   ::1
Resources:
  Processes: 22
  Disk usage:
    root: 23.51MB
  CPU usage:
    CPU usage (in seconds): 6
  Memory usage:
    Memory (current): 179.20MB
    Memory (peak): 201.19MB
  Network usage:
    enp5s0:
      Bytes received: 1.71kB
      Bytes sent: 1.94kB
      Packets received: 14
      Packets sent: 18
    lo:
      Bytes received: 6.19kB
      Bytes sent: 6.19kB
      Packets received: 84
      Packets sent: 84

stgraber@castiana:~$ lxc exec v1 bash
root@v1:~# ps aux | grep lxd
root       787  1.5  1.6 747700 16300 ?        Ssl  02:25   0:00 /run/lxd_config/9p/lxd-agent
root      1024  0.0  0.0  14856  1004 pts/0    S+   02:26   0:00 grep --color=auto lxd

Reworked storage layer

As part of the virtual machine work, we have completely rewritten our storage layer. This was done partly to add support for storing the block devices backing the virtual machines and to cleanup a lot of cruft that's been accumulating over the years and evolution of the storage layer.

This has no user visible repercussions, if it works properly, the new logic should be acting exactly like the old one, though possibly with quite a few less bugs.

It is now easier than ever to add support for a new storage driver and thanks to good abstractions having been put in place, the vast majority of the storage operations now use shared logic, significantly reducing code duplication and risk of duplicated bugs throughout the codebase.

As with any work of this magnitude, there will be bugs. We will try to be as reactive as we can to address any issue reported to us and would strongly recommend testing LXD 3.19 on some less important systems through the candidate channel ahead of it hitting stable.

Contributions by students of the University of Texas

A number of group of students from the University of Texas in Austin have been contributing LXD features as part of an assignment in their virtualization class.

For this release, this includes:

  • Multi architecture clustering
  • Direct attach of Ceph rbd/fs volumes
  • Attaching profiles to images
  • Custom mount options for disk devices
  • LVM striping (partial work superseded by the re-implementation of the storage layer)

A number more are currently being polished and will be included in the next LXD release.

The LXD team really enjoyed those contributions and interacting with new contributors to the project and are wishing all the best to the participating students!

Other new features

Device keys as lxc list columns

It is now possible to define additional columns in lxc list to show the value of device configuration keys.

For example:

stgraber@castiana:~$ lxc list -c nst,config:image.os:OS,devices:eth0.parent:BRIDGE
+--------+---------+-----------------+--------+--------+
|  NAME  |  STATE  |      TYPE       |   OS   | BRIDGE |
+--------+---------+-----------------+--------+--------+
| maas01 | STOPPED | CONTAINER       | ubuntu | lxdbr0 |
+--------+---------+-----------------+--------+--------+
| v1     | STOPPED | VIRTUAL-MACHINE | ubuntu | lxdbr0 |
+--------+---------+-----------------+--------+--------+
| v2     | STOPPED | VIRTUAL-MACHINE | ubuntu | lxdbr0 |
+--------+---------+-----------------+--------+--------+
| v3     | STOPPED | VIRTUAL-MACHINE |        | lxdbr0 |
+--------+---------+-----------------+--------+--------+

Routed networking mode

A new routed mode (nictype) for network interfaces is now supported. This requires a very recent feature of underlying liblxc and will effectively setup a point to point link between the container and host and will then route an IP to the container over it.

stgraber@castiana:~$ lxc config device add c1 eth0 nic nictype=routed ipv4.address=10.255.243.155
Device eth0 added to c1
stgraber@castiana:~$ lxc start c1
stgraber@castiana:~$ lxc list c1
+------+---------+-----------------------+------+-----------+-----------+
| NAME |  STATE  |         IPV4          | IPV6 |   TYPE    | SNAPSHOTS |
+------+---------+-----------------------+------+-----------+-----------+
| c1   | RUNNING | 10.255.243.155 (eth0) |      | CONTAINER | 0         |
+------+---------+-----------------------+------+-----------+-----------+

Direct attach of Ceph RBD or FS to containers

For those users who have existing RBD or FS volumes on Ceph which aren't managed by LXD itself and so cannot be attached through a traditional disk device, it is now possible to attach such a volume directly to a container.

This is done with special values for the source config key of disk devices.

Examples include: - source=ceph-rbd:pool/volume - source=ceph-fs:fs/path

Additionally some configuration keys were added to select the Ceph cluster and user.

  • ceph.cluster_name
  • ceph.user_name

Custom mount options for disk devices

A new raw.mount_options config key was added to disk devices. It takes an arbitrary list of comma separated mount options to be used when attaching the disk to the container.

Attaching profiles to images

A set of profiles can now be attached to profiles. Any new instance created from that image will be using that set of profiles rather than the default profile.

This is configured through lxc image edit and is kept as images auto-update.

stgraber@castiana:~$ lxc image show a722a8eb4d31
auto_update: true
properties:
  architecture: amd64
  description: Alpine 3.8 amd64 (20200116_13:00)
  os: Alpine
  release: "3.8"
  serial: "20200116_13:00"
  type: squashfs
public: false
expires_at: 1969-12-31T19:00:00-05:00
profiles:
- default

stgraber@castiana:~$ lxc image edit a722a8eb4d31

stgraber@castiana:~$ lxc image show a722a8eb4d31
auto_update: true
properties:
  architecture: amd64
  description: Alpine 3.8 amd64 (20200116_13:00)
  os: Alpine
  release: "3.8"
  serial: "20200116_13:00"
  type: squashfs
public: false
expires_at: 1969-12-31T19:00:00-05:00
profiles:
- blah

stgraber@castiana:~$ lxc launch a722a8eb4d31 a1
Creating a1
Starting a1

stgraber@castiana:~$ lxc info a1 | grep Profiles
Profiles: blah

Interception of the mount system call

Our system call interception layer has been extended to support intercepting the mount syscall.

This can be used to allow normally restricted filesystems to be mounted inside unprivileged containers, but maybe more importantly, it allows for transparent redirection of mount calls to FUSE drivers.

The new configuration options are: - security.syscalls.intercept.mount (enable/disable the feature) - security.syscalls.intercept.mount.allowed (list of filesystems to allow mounting) - security.syscalls.intercept.mount.fuse (list of filesystems to redirect to FUSE) - security.syscalls.intercept.mount.shift (whether to automatically setup a shiftfs layer)

WARNING: You should never grant the allowed permission to a container that you don't completely trust. This directly exposes your container to the kernel superblock parser and can be used to attack the kernel, crashing the host or even breaking out of the container.

Here is an example of both mounting through by allowing ext4 as well as then using FUSE as a much safer alternative:

root@vm02:~# lxc launch ubuntu:18.04 c1
Creating c1
Starting c1

root@vm02:~# mkfs.ext4 /dev/sdb
mke2fs 1.44.1 (24-Mar-2018)
Discarding device blocks: done                            
Creating filesystem with 2621440 4k blocks and 655360 inodes
Filesystem UUID: 134bc6d4-e7d3-4db1-a3aa-a398c1acff85
Superblock backups stored on blocks: 
    32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done

root@vm02:~# lxc config device add c1 sdb unix-block path=/dev/sdb
Device sdb added to c1

root@vm02:~# lxc exec c1 -- mount /dev/sdb /mnt
mount: /mnt: permission denied.

root@vm02:~# lxc config set c1 security.syscalls.intercept.mount true
root@vm02:~# lxc config set c1 security.syscalls.intercept.mount.shift true
root@vm02:~# lxc config set c1 security.syscalls.intercept.mount.allowed ext4
root@vm02:~# lxc restart c1

root@vm02:~# lxc exec c1 -- mount /dev/sdb /mnt
root@vm02:~# lxc exec c1 -- ls -lh /mnt
total 16K
drwx------ 2 root root 16K Jan 17 01:56 lost+found

root@vm02:~# lxc exec c1 -- apt-get install -y fuse2fs
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following package was automatically installed and is no longer required:
  libfreetype6
Use 'apt autoremove' to remove it.
The following NEW packages will be installed:
  fuse2fs
0 upgraded, 1 newly installed, 0 to remove and 4 not upgraded.
Need to get 28.8 kB of archives.
After this operation, 143 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 fuse2fs amd64     1.44.1-1ubuntu1.2 [28.8 kB]
Fetched 28.8 kB in 0s (117 kB/s)
Selecting previously unselected package fuse2fs.
(Reading database ... 28654 files and directories currently installed.)
Preparing to unpack .../fuse2fs_1.44.1-1ubuntu1.2_amd64.deb ...
Unpacking fuse2fs (1.44.1-1ubuntu1.2) ...
Setting up fuse2fs (1.44.1-1ubuntu1.2) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...

root@vm02:~# lxc config unset c1 security.syscalls.intercept.mount.allowed
root@vm02:~# lxc config set c1 security.syscalls.intercept.mount.fuse ext4=/usr/sbin/fuse2fs
root@vm02:~# lxc restart c1

root@vm02:~# lxc exec c1 -- mount /dev/sdb /mnt
root@vm02:~# lxc exec c1 -- ls -lh /mnt
total 128K
drwx------ 2 root root 16K Jan 17 01:56 lost+found
root@vm02:~# lxc exec c1 -- ps aux | grep fuse
root       304  0.0  0.0 170172   788 ?        Ssl  02:00   0:00 /usr/sbin/fuse2fs /dev/sdb /mnt -o dev,suid
root@vm02:~#

Additions to the resources API

Two new fields have been added to the disk entries in the resources API.

  • FirmwareVersion exposes the firmware revision of the network card
  • DeviceID shows a device identifier suitable for lookup under /dev/disk/by-id

An example for a NVME drive now looks like:

stgraber@castiana:~$ lxc query /1.0/resources | jq .storage.disks[0]
{
  "block_size": 512,
  "device": "259:0",
  "device_id": "nvme-eui.0000000001000000e4d25cafae2e4c00",
  "device_path": "pci-0000:05:00.0-nvme-1",
  "firmware_version": "PSF121C",
  "id": "nvme0n1",
  "model": "INTEL SSDPEKKW256G7",
  "numa_node": 0,
  "partitions": [
    {
      "device": "259:1",
      "id": "nvme0n1p1",
      "partition": 1,
      "read_only": false,
      "size": 52428800
    },
    {
      "device": "259:2",
      "id": "nvme0n1p2",
      "partition": 2,
      "read_only": false,
      "size": 1073741824
    },
    {
      "device": "259:3",
      "id": "nvme0n1p3",
      "partition": 3,
      "read_only": false,
      "size": 254933278208
    }
  ],
  "read_only": false,
  "removable": false,
  "rpm": 0,
  "serial": "BTPY63440ARH256D",
  "size": 256060514304,
  "type": "nvme",
  "wwn": "eui.0000000001000000e4d25cafae2e4c00"
}

Multi-architecture clustering

It is now possible to mix cluster members of different architectures. LXD will automatically place containers on the right systems based on image architecture.

As a bit of an extreme example, here is a cluster made of 3 different non-Intel architectures:

root@cluster:~# lxc cluster list
+---------------+----------------------------+----------+--------+-------------------+--------------+
|     NAME      |            URL             | DATABASE | STATE  |      MESSAGE      | ARCHITECTURE |
+---------------+----------------------------+----------+--------+-------------------+--------------+
| bos01-arm64   | https://240.0.200.92:8443  | YES      | ONLINE | fully operational | aarch64      |
+---------------+----------------------------+----------+--------+-------------------+--------------+
| bos01-ppc64el | https://240.0.202.246:8443 | YES      | ONLINE | fully operational | ppc64le      |
+---------------+----------------------------+----------+--------+-------------------+--------------+
| bos01-s390x   | https://240.0.203.11:8443  | YES      | ONLINE | fully operational | s390x        |
+---------------+----------------------------+----------+--------+-------------------+--------------+
| bos02-arm64   | https://240.0.204.139:8443 | NO       | ONLINE | fully operational | aarch64      |
+---------------+----------------------------+----------+--------+-------------------+--------------+
| bos02-ppc64el | https://240.0.206.145:8443 | NO       | ONLINE | fully operational | ppc64le      |
+---------------+----------------------------+----------+--------+-------------------+--------------+
| bos02-s390x   | https://240.0.207.35:8443  | NO       | ONLINE | fully operational | s390x        |
+---------------+----------------------------+----------+--------+-------------------+--------------+

Improved clustering setup logic

Prior to this release, when building up a LXD cluster, the first 3 servers to be part of the cluster would act as database nodes, receiving a full copy of the database and starting to vote on database transactions.

This behavior led many to believe that a cluster of just 2 servers was safe to operate despite the number of database members being even, preventing a proper quorum and effectively taking down the entire database should either of the servers go offline.

The new behavior is to keep operating with a single database server until the 3rd server is joined, at which point all 3 servers become database servers.

This will be further improved in LXD 3.20 with the introduction of standby database nodes allowing for multiple database nodes to go offline without the cluster itself going offline.

MAC filtering on unmanaged bridge

The security.mac_filtering configuration key can now be used with nic devices attached to network bridges that aren't managed by LXD itself.

Configurable Ceph data pool name

For those wanting separate OSD pools for their data and metadata, a new configuration key ceph.osd.data_pool_name was added allowing control of where the data should be stored. The metadata will be stored at the pool referenced by ceph.osd.pool_name.

LVM striping support

LVM striping is now supported, it can be configured through the volume.lvm.stripes and volume.lvm.stripes.size.

Initial CGroup2 resource restrictions

A new CGroup abstraction layer was added to LXD as well as an initial mapping for v2 resource controlers. This combined with recent improvements to liblxc should allow for most resource constraints to function in a CGroup V2 environment.

Configurable backup compression at creation time

The compression algorithm used for backups can be configured through backups.compression_algorithm but this is a global setting which will apply to all new backups.

In line with instance publishing (lxc publish), it is now possible to override the compression algorithm of backups at the time of their creation. This is exposed through lxc export --compression-algorithm.

Support for compressing backups and images using squashfs

squashfs can now be selected as compression algorithm for both images and backups. Prior to this, LXD could consume images compressed through squashfs but couldn't create them itself.

Complete changelog

Here is a complete list of all changes in this release:

  • lxd/cgroup: Adds cgroup package with CPU task balancing functions
  • lxd: Updates to use cgroup package
  • lxd: Changes instance and containerLXC function Id() to ID()
  • lxd: Updates error handling of MakeFSType after stderr split of RunCommand
  • api: Add resources_network_firmware extension
  • shared/api: Add FirmwareVersion to ResourcesNetworkCard
  • lxd/resources/network: Add FirmwareVersion retrieval
  • lxd/container: Adds instanceLoad function
  • lxd: Replaces use of containerLXCLoad with instanceLoad
  • lxc: Changes lxc list and lxc info Type field to show instance type
  • i18n: Update translation templates
  • lxc/{list,info}: Fix type on older LXD
  • lxd/device/disk: Apply limits through post hook
  • lxd/main_migratedumpsuccess: Use fast connection
  • lxd/main_sql: Use fast connection
  • lxd/daemon: Allow internal queries during startup
  • test: Adds host-side MTU veth checks
  • lxd/device/disk: Improvements in disk limits
  • lxd: Fix backup expiry
  • lxd: Fix backup expiry check
  • api: Add backup_compression_algorithm API extension
  • shared/api: Add CompressionAlgorithm to InstanceBackupsPost
  • lxc/export: Add --compression option
  • i18n: Update translation templates
  • lxd/backups: Add support for CompressionAlgorithm
  • lxd: Fix container restore with projects in Ceph
  • test: Add container restore with projects
  • lxd/daemon: Adds daemon package
  • lxd: Updates use of debug and verbose vars in daemon pkg
  • lxd/rsync: Moves rsync functions to own package
  • lxd: Updates usage of moved rsync functions
  • doc: Add ceph.osd.data_pool_name
  • storage/ceph: Implement --data-pool argument
  • scripts: Add ceph.osd.data_pool_name to bash completion
  • api: Add ceph_data_pool_name extension
  • doc: Add commit structure to contributing.md
  • lxd/cluster: Process upgrade notifications on all members
  • lxd/cluster: Relax upgrade notification target
  • lxd/db: Export GetNodeID
  • lxd/daemon: Skip heartbeat processing during startup
  • lxd/db: Backward compat code for Nodes()
  • lxd/daemon: Set gateway.Cluster during WaitUpgradeNotification
  • lxd/storage/ceph: Fix to work on older releases
  • lxd: Move backup to separate package
  • test: Add backup package to static analysis
  • test: Add project testing to backup
  • lxd/device/nic: Pass --concurrent to ebtables
  • tests: Update ebtables calls
  • fix debugging.md rendering
  • lxd/sys: Enforce directory permissions
  • lxd/daemon: Bump NOFILE to max on startup
  • lxd/list: Modify parseColumns to allow for the config:KEY:NAME:WIDTH syntax
  • lxd/list: Modify TestColumns to allow for the config:KEY:NAME:WIDTH syntax
  • lxd/cluster: Tweak joining error messages
  • lxd/cluster: Fix already-clustered test
  • lxd/list: Add support for devices:KEY:NAME:WIDTH to parseColumns
  • lxd/list: Add tests to check support for devices:KEY:NAME:WIDTH and config:KEY:NAME:WIDTH in parseColumns
  • lxd/list: Add description in command help section about devices:KEY:NAME:WIDTH and config:KEY:NAME:WIDTH support
  • i18n: Update translation templates
  • lxc/storage/volume: Fix panic when invalid snapshot rename argument supplied
  • shared/util: Removes ExtractSnapshotName
  • lxd: Changes use of ExtractSnapshotName to ContainerGetParentAndSnapshotName
  • lxd/storage/volumes: Removes unused snapshot logic from storagePoolVolumeTypePost
  • seccomp: test for syscall continuation support
  • seccomp: implement syscall continuation for mknod(), mknodat(), and setxattr()
  • unixfd: split into unixfd.{c,h}
  • unixfd: hide symbols
  • Makefile: Switch to tsenart/deadcode
  • lxd/include: Don't include missing file
  • Revert "unixfd: hide symbols"
  • tree-wide: handle _GNU_SOURCE ifdefs correctly
  • Makefile: add "nocache" target
  • tree-wide: rework cgo compilation
  • Add step to trigger reread on loopback device when resizing BTRFS storage pool.
  • lxd/db/storage/pools: StoragePoolVolumeSnapshotsGetType returns StorageVolumeArgs slice
  • lxd/db/storage/pools: Makes StoragePoolVolumeSnapshotsGetType return in volume ID order
  • lxd: Updates use of StoragePoolVolumeSnapshotsGetType return type change
  • seccomp: log syscall arguments
  • package: lxd: add cgo.go
  • package: lxd-p2c: add cgo.go
  • package: seccomp: add cgo.go
  • package: quota: add cgo.go
  • package: storage: add cgo.go
  • package: ucred: add cgo.go
  • package: idmap: add cgo.go
  • package: netutils: add cgo.go
  • package: termios: add cgo.go
  • package: shared: add cgo.go
  • lxd: add cgo hardening flags and fix minor bugs found by them
  • lxd/storage/utils: Add common helpers to utils
  • lxd/storage/volumes/config: Removes functions moved to storage package
  • lxd: Updates use of funcs/vars moved to storage pkg
  • lxd/storage/drivers/utils: Add common functions
  • lxd/storage/drivers/utils: Adds GetVolumeMountPoint and GetPoolMountPoint functions
  • lxd/storage/drivers/utils: Adds DeleteParentSnapshotDirIfEmpty
  • lxd/storage/drivers/utils: Add GetVolumeSnapshotDir
  • lxd/storage/drivers/volume: Adds VolumeType and ContentType definitions
  • lxd/storage/storage: Deprecates pool path function
  • lxd/storage/drivers/errors: Adds storage drivers errors
  • lxd/storage/errors: Adds shared errors for storage
  • lxd/db/storage/pools: Improves comments on StoragePoolVolumeSnapshotsGetType
  • tests: Fixes zfs snapshot restore bug in tests
  • lxd/migration/migration/volumes: Adds migration volume arg types
  • lxd/storage: Removes progress wrapper functions
  • lxd: Update use of migration progress functions
  • seccomp: protect against syscall supervision override
  • client/lxd/storage/volumes: Fixes bug where migration errors were ignored
  • lxc/storage/volume: Adds volume snapshot rename check for same parent volume
  • lxd/storage/quota: Fix bad typing
  • lxd/containers: Return disk usage when stopped
  • lxd/storage/utils: Removes default empty "size" property for dir volumes
  • lxd/storage/utils: Makes dir driver allowed to translate the size property
  • tree-wide: cgo: add -Wunused and fix errors detected by this option
  • tree-wide: cgo: mark some global variables ro
  • lxc/config: Handle config/profile in examples
  • i18n: Update translation templates
  • forksyscall: add acquire_final_creds()
  • seccomp: implement mount syscall interception
  • api: add container_syscall_intercept_mount extension
  • doc: add security.syscalls.intercept.mount
  • scripts: add security.syscalls.intercept.mount to bash completion
  • client: Ignore unresolvable addresses
  • lxd/include: Fix definition of SECCOMP_USER_NOTIF_FLAG_CONTINUE
  • api: Add compression_squashfs extension
  • lxd/cluster: Validate squashfs-tools-ng executables
  • lxd: Modify compressFile() to support SquashFS
  • lxd/networks: Nicer error on misisng IPv6
  • global: Drop -Wcast-align (breaks armhf)
  • lxd: Support SquashFS compressed backup imports
  • lxd: Add SquashFS compressed image publish/export support
  • lxd/device/nic/bridged: Allow MAC filtering on unmanaged bridges
  • test: Adds test for using security.mac_filtering with unmanaged parent
  • doc: fix link to security.md from README.md
  • doc: use HTTPS links for criu and #lxcontainers (they have STS preload)
  • lxd/rsync: Switch to using io.ReadWriteCloser
  • shared: Implement a WebsocketIO ReadWriteCloser abstraction
  • lxd/migration: Introduce ProgressTracker
  • lxd/migration: Switch over to ReadWriteCloser for rsync
  • lxd/devlxd: Fixes event socket close on client disconnect during wait
  • lxd/events/events: Adds context to event listener Wait() function
  • lxd/events: Fixes event socket close on client disconnect during wait
  • lxd/migrate: Close control web socket on disconnect()
  • lxd/migrate/storage/volunes: Always close web socket after migration
  • lxd/storage: Adds interfaces
  • lxd/storage/load: Adds storage pool loader functions
  • lxd/storage/drivers/driver: Adds storage driver load functions
  • lxd/storage/backend/lxd: Adds lxd backend implementation
  • lxd/storage/backend/mock: Adds mock backend implementation
  • lxd/storage/drivers/driver/common: Adds common driver
  • lxd/storage/drivers/driver/dir: Add dir backend
  • lxd/storage/volumes: Links doVolumeCreateOrCopy to use storage pkg
  • test/suites/static/analysis: Updates to recurse storage package
  • lxd/storage/volumes: Links volume delete function to use new storage pkg
  • lxd/storage/utils: Adds VolumeTypeToDBType function
  • lxd/storage/utils: Modifies VolumeValidateConfig to hook into new storage API
  • lxd/storage/utils: Deprecates SupportedPoolTypes
  • lxd/storage/drivers/volume: Adds Volume struct type
  • lxd/storage/volumes: Re-works storagePoolVolumeTypePost into sub-actions
  • lxd/storage/volumes/snapshot: Renames driver import to storagePools
  • lxd/storage/volumes/snapshot: Links rename snapshot volume to new storage pkg
  • lxd/storage/volumes/snapshot: Links snapshot delete to new storage pkg
  • lxd/storage/volumes/snapshot: Links create custom snapshot to new storage pkg
  • lxd/storage/volumes: Moves DB lookup into migration function
  • lxd/migrate/storage/volumes: Links volume migrate functions to new storage pkg
  • lxd/storage/volumes: Linking volume move to new storage pkg
  • lxd/storage/volumes: Adds existing volume checks to storagePoolVolumeTypePost and storagePoolVolumesTypePost
  • lxd/storage/drivers/utils: Adds GetSnapshotVolumeName function
  • lxd/storage/drivers/utils: Renames GetVolumeMountPath and GetPoolMountPath
  • lxd/storage: Updates deprecation notice
  • lxd/storage/drivers/utils/test: Updates tests
  • lxd/storage/utils: Adds validateVolumeCommonRules
  • lxd/migration/migration/volumes: Updates MatchTypes to log offered and our types on mismatch
  • lxd/storage/memorypipe: Adds in-memory bidirectional pipe
  • lxd/migrate/storage/volumes: Updates use of migrate TrackProgress args
  • lxd/storage/backend/lxd: Updates CreateCustomVolumeFromCopy to use migration logic
  • lxd/storage/drivers/driver/common: Improves comment
  • lxd/migration/migration/volumes: Adds TrackProgress bool to MigrationSourceArgs and MigrationTargetArgs
  • lxd/storage/drivers/driver/dir: Updates migration functions to use TrackProgress bool
  • lxd/containers: Push MAAS entry after dev creation
  • lxd/storage/drivers/interface: Modifies ValidateVolume definition
  • lxd/storage/utils: Updates ValidateVolume usage
  • lxd/storage/backend/lxd: Updates use of validate function
  • lxd/storage/drivers/driver/common: Updates validate function
  • lxd/storage/drivers/driver/dir: Updates validation function
  • forksyscall: remove left-over advance_arg() call
  • lxd/migration/migration/volumes: Updates MatchTypes to accept fallback type
  • lxd/migration/storage/volumes: Updates MatchTypes usage
  • lxd/storage/backend/lxd: Updates MatchTypes usage
  • lxc/storage/volumes: Links storagePoolVolumeTypePatch to new storage pkg
  • lxd/storage/volumes/utils: Links storagePoolVolumeUsedByRunningContainersWithProfilesGet to storage pkg
  • lxd/storage/utils: Adds VolumeUsedByInstancesWithProfiles
  • lxd/storage/volumes: Links storagePoolVolumeTypePut to storage pkg
  • lxd/storage/drivers/interface: Updates function definitions
  • lxd/storage/backend: UpdateCustomVolume and RestoreCustomVolume
  • lxd/storage/drivers/driver/dir: Adds UpdateVolume function
  • lxd/storage/volumes: Consistent casing on error messages
  • lxd/storage/utils: Consistent casing on error messages
  • lxd/storage/interfaces: Adds RestoreCustomVolume
  • lxd/storage/drivers/interface: Adds RestoreVolume
  • lxd/storage/drivers/driver/dir: Implements RestoreVolume
  • lxd/storage/backend/mock: Adds RestoreCustomVolume
  • lxd/storage/volumes: Makes storagePoolVolumeTypePut logic consistent with storagePoolVolumeSnapshotTypePut
  • lxd/storage/volumes/snapshot: Moves storagePoolVolumeSnapshotTypePut DB logic
  • lxd/storage/volumes/utils: Removes unused storagePoolVolumeSnapshotUpdate
  • lxd/storage: Use correct operation type
  • lxd/storage/backend/lxd: Adds basic debug logging
  • lxd/storage/backend/mock: Adds logger support
  • lxd/storage/load: Initialises logger
  • lxd/storage/drivers/driver/common: Adds driver logger with pool context
  • lxd/storage/drivers/interface: Updates with pool context logger
  • lxd/storage/utils: Updates VolumeValidateConfig to use update driver loader
  • lxd/storage/load: Updates loaders to support contextual loggers
  • lxd/storage/drivers/load: Updates loaders to support contextual loggers
  • container/lxc: Hooks up root device usage to new storage package
  • lxd/storage/backend/lxd: Updates name of instance arg to inst from i
  • lxd/storage/backend/lxd: Implements GetInstanceUsage
  • lxd/storage/backend/mock: Changes GetInstanceUsage signature
  • lxd/storage/drivers/driver/dir: Implements GetVolumeUsage
  • lxd/storage/drivers/interface: Adds GetVolumeUsage
  • lxd/storage/interfaces: Changes GetInstanceUsage signature
  • lxd/images: Links imageCreateInPool to new storage package
  • lxd/storage/backend/lxd: Implements CreateImage
  • lxd/storage/backend/mock: Updates CreateImage definition
  • lxd/storage/interfaces: Updates CreateImage definition
  • lxd/resources/storage: Improve cdrom handling
  • Bring Go current in Travis
  • lxd/storage/drivers/driver/dir: Adds warnings of ext4 project quota not supported
  • lxd/storage/load: Adds GetPoolByInstanceName
  • lxd/container: Links containerCreateFromImage to new storage layer
  • lxd/containers/post: Moves progress tracker into containerCreateFromImage
  • lxd/images: Removes old unpackImage
  • lxd/storage/backend/lxd: Implements CreateInstanceFromImage
  • lxd/storage/drivers/driver/dir: Switches to using volume.CreateMounthPath()
  • lxd/storage/drivers/volume: Adds CreateMountPath
  • lxd/storage/load: Improves getVolID error when volume not found
  • lxd/storage/utils: Adds InstanceTypeToVolumeType
  • lxd/storage/utils: Adds ImageUnpack
  • test/suites/basic: Updates tests to take into account more secure volume perms
  • lxd: Updates use of driver.ImageUnpack
  • lxd/storage/load: Makes volIDFuncMake project aware
  • lxd/storage/drivers/driver/dir: Ensures old snapshor dir removed in RenameVolume
  • lxd/storage/drivers: Expose BlockBacking property
  • lxd/storage: Pass BlockBacking to ImageUnpack
  • lxd/storage: Change default container permissions to 0100
  • lxd/storage: Implement CreateImage
  • lxd/storage/dir: Don't fail/complain about missing quotas
  • lxd/devices/nic: Handle recent ebtables
  • lxd/rsync: Tweaks Recv's internal synchronisation to avoid race
  • lxd: Minor changes
  • lxd/storage: Fix custom volume with underscores
  • lxd/images: Updates imageCreateInPool to use EnsureImage
  • lxd/storage/backend/lxd: Updates EnsureImage usage and adds more comments
  • lxd/storage/backend/mock: Updates with EnsureImage
  • lxd/storage/interfaces: Renames CreateImage to EnsureImage
  • lxd/storage/load: Adds comments
  • lxd/cluster: add Recover() and ListDatabaseNodes() utilities
  • lxd/storage/drivers: Add mountReadOnly helper
  • lxd/storage/dir: Make snapshot mounts read-only
  • lxd/storage/dir: Only log project quota failures when relevant
  • lxd/container/lxc: Links container Delete() to new storage package
  • lxd/container/lxc: Improves error logging in diskState
  • lxd/storage/backend/lxd: Removes duplicated code from DeleteCustomVolume
  • lxd/storage/backend/lxd: Adds symlink management functions
  • lxd/storage/backend/lxd: Adds Instance and Instance Snapshot delete functions
  • lxd/storage/drivers/driver/dir: Reinstates DeleteParentSnapshotDirIfEmpty for volume and snapshot deletion
  • lxd/storage/drivers/utils: Updates DeleteParentSnapshotDirIfEmpty to also remove symlink
  • lxd/storage/interfaces: Adds IsSnapshot to Instance interface
  • lxd/storage/dir: Don't write to snapshots
  • lxd/container: Fix apply_quota
  • lxd/storage/lvm: Fix version parsing
  • lxd/storage/drivers/driver/dir: Comment grammar consistency
  • lxd/storage/load: Renames GetPoolByInstanceName to GetPoolByInstance
  • lxd/container: Updates use of storagePools.GetPoolByInstance and fallback for container types
  • lxd/storage/drivers/errors: Removes unused error
  • lxc/init: Properly handle errors with --empty
  • lxd/container: Links containerCreateAsEmpty to new storage package
  • lxd/container: Adds revert to containerCreateFromImage
  • lxd/container: containerCreateFromImage comment
  • lxd/storage/drivers/utils: Makes GetVolumeSnapshotDir work with either snapshot or parent vol name
  • lxd/storage/drivers/utils: Removes symlink removal from DeleteParentSnapshotDirIfEmpty
  • lxd/storage/backend/lxd: CreateInstance
  • lxd/storage/backend/lxd: Updates instance snapshot symlink removal
  • lxd/storage/backend/lxd: Updates instance snapshot symlink management functions
  • lxd/container/lxc: Removes TemplateApply() and adds DeferTemplateApply()
  • lxd/containers/post: DeferTemplateApply usage
  • lxd/instance/interface: DeferTemplateApply usage
  • lxd/storage/interfaces: DeferTemplateApply signature
  • lxd/storage: DeferTemplateApply usage
  • lxd/storage/interfaces: Updates instance mount function definitions
  • lxd/storage/backend/mock: Updates instance mount function definitions
  • lxd/storage/backend/lxd: Implements instance mount and unmount functions
  • lxd/operations: Fix remote Wait
  • lxc/query: Fix handling of ?project=
  • lxd/storage/backend/lxd: Instance function comment consistency
  • lxd/device/device/utils/disk: Changes signature of StorageRootFSApplyQuota
  • lxd/device/disk: Updates applyQuota to use error from storage package
  • lxd/storage: Links storageRootFSApplyQuota to new storage package
  • lxd/storage/backend/lxd: SetInstanceQuota
  • lxd/storage/backend/mock: SetInstanceQuota
  • lxd/storage/drivers/dir: Adds SetVolumeQuota and RunningQuotaResize info flag
  • lxd/storage/drivers/interface: SetVolumeQuota signature
  • lxd/storage/drivers/load: Adds RunningQuotaResize to driver Info struct
  • lxd/storage/errors: Adds ErrRunningQuotaResizeNotSupported error
  • lxd/storage/interfaces: SetInstanceQuota signature
  • lxd/container: Links containerConfigureInternal to new storage package
  • lxd/db: Cover all combinations of instance filters
  • lxd/db: Re-generate DB code
  • lxd/storage/drivers: Add locking
  • lxd/storage/drivers: Add cephfs
  • lxd/storage/drivers: Make locks per-pool
  • lxd/storage/cephfs: Fill remaining Info fields
  • lxd/storage/cephfs: Use SetVolumeQuota in UpdateVolume
  • lxd/storage/cephfs: Don't run RemoveAll on snapshots
  • lxd/container/lxc: Links Rename to new storage package
  • lxd/storage/backend/lxd: Reworks symlink functions
  • lxd/storage/cephfs: Simplify rename logic
  • lxd/storage/cephfs: Comment consistency
  • lxd/storage/backend/lxd: RenameInstance
  • lxd/storage/interfaces: Removes unused Path function in Instance interface
  • lxc/move: Fixes instance snapshot rename validation and crash
  • lxd/storage/backend/lxd: RenameInstanceSnapshot
  • lxd/storage/cephfs: Implement GetVolumeUsage
  • lxd/storage/dir: Properly revert snapshots
  • lxd/storage/cephfs: Fix SetVolumeQuota
  • lxd/storage/cephfs: Fix ordering in Copy/Migration
  • Move renderTable to utils.RenderTable()
  • Add new "lxd cluster" sub-command
  • Add clustering_recover integration test
  • clustering.md: add documentation about disaster recovery
  • lxd/storage/dir: Add check for bad source path
  • lxd/storage: Add localOnly handling of create/delete
  • lxd/operations: Support nil state
  • lxd/storage: Switch Create to new logic
  • lxd/storage/utils: Only create needed directories
  • lxd/storage/cephfs: Fix bad config keys
  • lxd/storage: Switch Delete to new logic
  • lxd/storage: Switch Mount to new logic
  • lxd/storage/cephfs: Don't fail if already mounted
  • lxd/api/internal: Updates use of renamed functions
  • lxd/container: Updates return values of instance create and load functions
  • lxc/container: Renames containerCreateFromImage to instanceCreateFromImage
  • lxd/container: Renames containerCreateInternal to instanceCreateInternal
  • lxd/container/lxc: Updates use of renamed c.state.Cluster.InstanceRemove
  • lxd/containers/post: Adds VM support to createFromImage
  • lxd/db/containers: Renames ContainerRemove to InstanceRemove
  • lxd/container: Renames containerCreateAsEmpty to containerCreateAsEmpty
  • lxd/containers/post: Updates use of instanceCreateAsEmpty
  • lxd/storage/backend/lxd: Pass correct content type to storage drivers for VMs
  • lxd/storage/drivers/utils: Unexports deleteParentSnapshotDirIfEmpty
  • lxd/storage/drivers/driver/dir: Updates use of deleteParentSnapshotDirIfEmpty
  • lxd/container/lxc: Updating DB usage to be instance type agnostic
  • lxd/container/post: Updates usage of InstancePool
  • lxd/container/test: Updates instanceCreateInternal usage
  • lxd/api/internal: InstancePath usage
  • lxd/container/lxc: InstancePath usage
  • lxd/storage/backend/lxd: InstancePath usage
  • lxd/storage/storage: Renames ContainerPath to InstancePath
  • lxd/storage/dir: InstancePath usage
  • lxd/storage/zfs: InstancePath usage
  • lxd/container/test: InstancePath usage
  • lxd/db/storage/pools: Adds VM instance type constant and conversion codes
  • lxd/db/containers: Updates pool lookup functions to be instance type agnostic
  • lxd/storage/load: InstancePool usage
  • lxd/db/containers/test: InstancePool usage
  • lxd/storage: InstancePool usage
  • lxd/storage/dir: Don't apply quotas on snapshots
  • lxd/device/nic: Fix race in vlan creation
  • lxd/device/nic: Fix handling of shared vlans
  • lxd/storage/cephfs: Store version globally
  • lxd/storage/drivers: Drop Usable field
  • lxd/storage/drivers: Implement load function
  • lxd/storage/cephfs: Implement load
  • lxc/init: Adds vm flag to init command
  • lxc/copy: copyContainer tweaks
  • lxd/container: Adds support for VM creation to instanceCreateInternal
  • lxd/container: Adds VM support to instanceLoad
  • lxd/storage/drivers/utils: Adds createSparseFile
  • lxd/storage/backend/lxd: Signature and comment tweaks for filler function
  • lxd/storage/drivers/driver/cephfs: filler usage update
  • lxd/storage/drivers/driver/dir: Adds VM support to CreateVolume
  • lxd/storage/drivers/driver/dir: Adds content type checking to some functions
  • lxd/storage/drivers/interface: CreateVolume signature update for filler change
  • lxd/storage/utils: Adds VM type conversion
  • lxd/storage/utils: Updates ImageUnpack to support VM images
  • lxd/storage: Updates ImageUnpack usage
  • lxd/sys/fs: Adds VM dirs
  • lxd/containers: Renames containerDeleteSnapshots to instanceDeleteSnapshots
  • lxd/container/lxc: instanceDeleteSnapshots usage
  • lxd/device/device/utils/network: Adds networkCreateTap
  • lxd/device/nic/bridged: Adds initial support for VM
  • lxd/device/disk: Initial VM support
  • lxd/storage/backend/lxd: GetInstanceDisk implementation
  • lxd/storage/drivers/driver/ceph: GetVolumeDiskPath placeholder
  • lxd/storage/drivers/driver/dir: GetVolumeDiskPath implementation
  • lxd/storage/drivers/interface: Adds GetVolumeDiskPath
  • lxd/container/console: Improves resilience of console checking
  • shared/container: Adds support for vm.uuid volatile key
  • lxd/container: progress meta data
  • lxd/containers/post: createFromImage instances created field
  • lxd/storage/backend/lxd: CreateInstanceFromCopy qcow2 comment
  • i18n: Update translation templates
  • lxd/containers/post: createFromNone VM support
  • lxd: Move IsJSONRequest to util package
  • client: Add vsock support
  • client: Add ConnectLXDHTTP function
  • lxd/vsock: Add vsock HTTP client
  • lxd-agent: Add basic structure
  • lxd-agent: Add state command
  • lxd-agent: Add operations command
  • lxd-agent: Add exec command
  • lxd-agent: Add file command
  • shared/idmap: Fix build tags
  • lxd/util: Restrict sys.go to LXD itself
  • lxd/sys: Restrict to LXD itself
  • lxd/state: Use empty struct when not LXD
  • lxd/response: Split SmartError into LXD/non-LXD
  • lxd/operations: Disconnect from DB on non-LXD
  • lxd/endpoints: Allow building on non-Linux
  • lxd/db: Allow external use without dqlite
  • Fix golint warnings
  • lxd/container: Improves create from imate type mismatch error
  • lxd/container/console: Makes console logic instance type agnostic
  • lxd/container/lxc: Updates Console to return an os.File
  • lxd/instance/interface: Updates Console signature
  • lxd/db/images: Fixes bug in ImageSourceGetCachedFingerprint not applying image type filter
  • shared/cert: Useful comment about cert type on FindOrGenCert
  • lxd/vm/qemu: Initial implementation of VM Qemu instance type
  • client/connection: Simplifies ConnectLXDHTTP
  • lxd/vm/qemu: Adds agent connection setup
  • lxd/vsock: Simplifies HTTPClient
  • lxd/vm/qemu: Implement FilePush for VMs
  • lxd/vm/qemu: Implement FilePull for VMs
  • lxc/storage: Add support for virtual-machine volumes
  • lxd/storage: Add support for virtual-machine volumes
  • lxd/vm: Set WorkingDirectory in unit
  • lxd/vm: Fix TLS authentication to agent
  • lxd-agent: Fix golint
  • lxd-agent: Remove dead code
  • lxd-agent: Function name consistency
  • lxd-agent: Avoid global variables
  • lxd-agent: Load certs from current dir
  • Makefile: Have default build static lxd-p2c
  • Makefile: Add lxd-agent
  • lxd-agent: Port to cobra
  • lxd-agent: Re-order imports
  • lxd/vsock: Switch to single implementation
  • api: Add extention for passing in raw mount options
  • doc/container: added raw_mount_options to disk options
  • lxd/device add support for raw_mount_options for disk device mounts
  • tests: Add test for raw.mount.options for disk device mounts
  • lxc/image: Truncate image files down to size
  • lxd/images: Truncate image files down to size
  • client: Add Disconnect function
  • lxd/vm: Fix UEFI secure boot
  • lxd/vm: Use filepath rather than manual joining
  • lxd/device/nic/ipvlan: removes unused optional "host_name" config field.
  • lxd/device/nic/routed: Adds veth routed NIC device
  • shared/version/api: Adds container_nic_routed API extension
  • doc/containers: Adds routed nic type docs
  • test: Adds routed nic tests
  • seccomp: implement redirection to fuse
  • api: add container_syscall_intercept_mount_fuse extension
  • doc: add security.syscalls.intercept.mount.fuse
  • scripts: add security.syscalls.intercept.mount.fuse
  • lxd/vm: Cleanup config layout
  • lxd/vm: Add an identifying serial device
  • lxd/vm/qemu: Adds missing secure boot EFI firmware error
  • seccomp: only apply shift when it is needed
  • shared/simplestreams: Support disk-kvm.img
  • shared/cert: Make adding of ip/names optional
  • lxc/config: Update to changed cert functions
  • lxd/util: Update to changed cert functions
  • lxd/vm: Update to changed cert functions
  • lxd-agent: Update to changed cert functions
  • lxd-p2c: Update to changed cert functions
  • lxc-to-lxd: Update to changed cert functions
  • seccomp: test flag parsing and log ignored flags
  • shared: Update to changed cert functions
  • seccomp: attach to pid namespace when mounting through fuse
  • lxd-agent: Generate the cloud-init configuration
  • lxd/vm: Use 9p for agent drive
  • lxd/storage: Only use raw images
  • lxd/storage/drivers: Don't return disk type
  • lxd/storage: Don't return disk type
  • lxd: Use raw disk images only
  • lxd/vm: Add install script in 9p
  • lxd/device/disk: Adds support for generating VM config drive
  • lxd/device/nic/bridged: Adds hwaddr to runConf when instance type is VM
  • lxd/vm/qemu: Modifies qemu config generation to support dynamic devices
  • lxd/container: Renames containerValidDevices to instanceValidDevices
  • lxd/device/device/instance: Adds Path() to Instance interface
  • lxd/device/disk: Adds support for generating VM cloud-init config drive
  • lxd: Updates instanceValidDevices usage
  • lxd: Fixes bug in fillNetworkDevice volatile hwaddr generation
  • lxd/vm/qemu: Fix root disk path in device
  • lxd/vm/qemu: Only connect to VM agent to get state if VM is running
  • lxd/vm/qemu: Comment about generateConfigShare meta-data generation
  • lxd/device/unix/common: Device naming functions usage
  • lxd/device/device/utils/generic: Adds generic device naming functions
  • lxd/device/gpu: Device naming functions usage
  • lxd/device/disk: Uses generic device name path functions
  • lxd/device/device/utils/unix: Device naming functions usage
  • lxd/device/device/utils/unix: Removes unused device naming functions
  • lxd/include: Fix SECCOMP_GET_ACTION_AVAIL define
  • lxd/vm: Update systemd units
  • lxd: Cleanup storage volumes properly for VMs
  • lxd/instances: Add /1.0/virtual-machines
  • lxd/storage: Fix GetVolumeSnapshotDir return value
  • lxd/vm: Implement Exec for VMs
  • lxd-agent: Proper logger
  • lxd/container/exec: Don't require cmd to be returned from inst.Exec()
  • lxd-agent/exec: Add buffered channel to prevent deadlock on cmd exit
  • client/lxd: log websocket URL
  • client/lxd/events: Fixes /events connect bug
  • lxd-agent/exec: Fixes go routine leak
  • lxd-agent/daemon: Adds daemon for storing event server to agent
  • lxd-agent/events: Adds /events websocket route to agent
  • lxd/state/notlinux: Adds Events field to non-linux/agent State struct
  • lxd/operations/operations: Adds SetEventServer function
  • lxd/operations: Reinstates sending events when no state
  • lxd-agent/exec: Links daemon's event server to operation
  • lxd-agent: Adds daemon to request
  • lxd: More event socket logging
  • lxd/vm/qemu: Disconnects VM agent after use
  • lxd/vm/qemu: Interactive unbuffered exec console
  • lxd-agent: Add missing setsid call on exec
  • lxd-agent: Fix uid/gid/cwd in exec
  • lxd/agent/exec: More debug status messages for exec handler
  • lxd/container/exec: Updates exec handler to use new inst.Exec signature
  • lxd/container/lxc: Updates Exec() to return a instance.Cmd
  • lxd/instance/interface: Updates Exec() function to be local or remote command agnostic
  • lxd/vm/qemu: Updates Exec() to return instance.Cmd
  • lxd/container/lxc/exec/cmd: Implementation of instance.Cmd for containerLXC
  • lxd/vm/qemu/cmd: Implementation of instance.Cmd for vmQemu
  • lxd/instance/instance/exec/cmd: Cmd interface
  • lxd-agent/exec: Removes \n from logging
  • lxd/vm/qemu: Better error message to users when failing to connect to lxd-agent
  • lxd-agent/exec: Makes the terminal the controlling terminal of the calling process
  • lxd/vm: Make OVMF path configurable
  • lxd/vm/qemu: Comment ending consistency
  • lxd/vm/qemu: Handle deletion of storage volume DB record when reverting VM create
  • lxd/storage/backend/lxd: Adds same pool optimisation to CreateCustomVolumeFromCopy
  • lxd/container: container to instance renames, comment improvements
  • lxd/containers/post: Adds instances field to response from createFromCopy
  • lxd/container: instanceCreateAsCopy rename and revertion logic
  • lxd/container: instanceCreateInternal comment
  • lxd/containers/post: instanceCreateAsCopy usage
  • scripts/bash: Refresh list of commands
  • api: Add container_disk_ceph API extension
  • lxd: Add support for CEPH FS backed disks and CEPH RBD backed disks
  • tests: Add test for CEPH backed disks
  • doc: Add support for CEPH backed disks
  • lxd: Fixing srcPath check for cephs
  • lxd: Correct srcPath check for cephs
  • lxd: Fixing single quote on ceph check
  • lxd/device/disk: Fix mounting cephfs
  • lxd/device/disk: Format blocks a bit
  • tests: Fix typo in cephfs test
  • lxd: Fix ceph_rbd volatile key
  • lxd/storage: Rename storagePoolVolumeUsedByContainersGet
  • lxd/storage: Rename storagePoolVolumeUsedByRunningInstancesWithProfilesGet
  • lxd: Have instanceLoadByProject return all instances
  • lxd/vm: Use leases to get IP
  • lxd/storage/zfs: Fix migration on zfs 0.6
  • lxd/vm/qemu: Removes deprecated Storage() function
  • lxd/instance/instance/interface: Moves Instance interface into instance pkg
  • lxd/instance/interface: Removes old Instance interface
  • lxd: Updates references to Instance interface
  • lxd/storage: Fix DeleteImage return value
  • lxd/storage/cephfs: Properly handle root path
  • lxd/vm: Reverse interface counters
  • lxd/container: Adds operation arg to instanceCreateAsCopy
  • lxd/containers/post: Passes operation to instanceCreateAsCopy
  • lxd/container: Links instanceCreateAsCopy to new storage pkg
  • lxd/container: source snapshot var naming for clarity
  • lxd/storage/interfaces: Exposes ExpandedDevices() on Instance interface
  • lxd/storage/interfaces: Updates Instance migration signatures
  • lxd/storage/interfaces: Changes i arg var to inst to represent Instance
  • lxd/storage/backend/mock: Updates instance migration signatures
  • lxd/db/containers: Removes unused ContainerCreationUpdate replaces with InstanceSnapshotCreationUpdate
  • lxd/migrate/storage/volumes: Fixes typo
  • lxd/migration/interfaces: Removes unused definitions
  • lxd/storage/backend/lxd: Updates CreateInstance to use root disk device config
  • lxd/storage/backend/lxd: Implements CreateInstanceFromCopy
  • lxd/storage/backend/lxd: Updates CreateInstanceFromImage to use instance root disk config
  • lxd/storage/backend/lxd: Implements CreateInstanceFromMigration
  • lxd/storage/backend/lxd: Implements MigrateInstance
  • lxd/storage/backend/lxd: Adds comment to EnsureImage explaining for volume config not needed
  • lxd/storage/backend/lxd: Comment consistency in CreateCustomVolumeFromCopy
  • lxd/storage/backend/lxd: Add comment to MigrateCustomVolume explaining volume config not needed
  • lxd/storage/backend/lxd: Close migration connection on error in CreateCustomVolumeFromMigration
  • lxd/device/device/runconfig: Moves to device/config pkg
  • lxd/instance/instance/interface: Removes device pkg import
  • lxd: Updates use of deviceConfig.RunConfig
  • Use the node ID from the nodes ID table, not the raft one
  • lxd/patches: Fix database roles
  • lxd/container/lxc: Reorders containerLXC Delete() stages
  • lxd/vm/qemu: Makes Delete() aligned with containerLXC's Delete()
  • lxd/container: Removes instanceCompareSnapshots
  • lxd/instance/instance/utils: Adds CompareSnapshots function
  • lxd/container: Updates instance.CompareSnapshots usage
  • lxd/container: Links instanceCreateAsCopy refresh instance to new storage pkg
  • lxd/storage/interfaces: RefreshInstance signature
  • lxd/storage/backend/lxd: Implements RefreshInstance
  • lxd/storage/backend/mock: RefreshInstance placeholder
  • lxd/storage/drivers/interface: Adds RefreshVolume
  • lxd/storage/drivers/driver/cephfs: Adds RefreshVolume placeholder
  • lxd/migration/migration/volumes: Adds Refresh property to VolumeTargetArgs
  • lxd/storage/drivers/driver/dir: RefreshVolume implementation
  • lxd/storage/drivers/volume: Adds Name() function
  • lxd/storage/backend/lxd: Adds HasVolume checks to CreateInstanceFromMigration and CreateInstanceFromCopy
  • lxd/cluster: Only promote to database role if >= 3 members
  • doc/clustering: Document database role during cluster scaling
  • lxd/vm/qemu: Adds storage pool Mount/Unmount calls
  • lxd/device/disk: Prevents error logs about unsupported disk drive on VM stop
  • lxd/vm: Add support for aarch64
  • api: Add virtual-machines API extension
  • shared: Rename ContainerAction to InstanceAction
  • shared: Rename KnownContainerConfigKeys to KnownInstanceConfigKeys
  • shared: Rename ContainerGetParentAndSnapshotName to InstanceGetParentAndSnapshotName
  • lxc: Update for ContainerGetParentAndSnapshotName rename
  • lxd/containers: Update for ContainerAction rename
  • lxd: Update for ContainerGetParentAndSnapshotName rename
  • doc/api-extensions: Fix escaping
  • doc: Rename containers to instances
  • doc/instances: Description consistency
  • doc/instances: Fix escaping and alignment
  • doc/profiles: Update for instances
  • doc: Add containers/virtual-machines pages
  • lxc: Update for KnownInstanceConfigKeys
  • doc/instances: Remove API extensions
  • doc/instances: Add missing volatile keys
  • doc: Add new pages to metadata
  • tests: Update unit and integration tests for cluster join
  • lxd: Add raw.qemu
  • shared: Add raw.qemu
  • doc: Add raw.qemu
  • scripts/bash: Add raw.qemu
  • lxd: Add security.secureboot
  • shared: Add security.secureboot
  • doc: Add security.secureboot
  • scripts/bash: Add security.secureboot
  • lxd: Instance is not container type error consistency
  • lxd/container: Removes container type
  • lxd: Removes use of container type
  • lxd: Renames containerCreateAsSnapshot to instanceCreateAsSnapshot
  • lxd/container/snaphot: Returns instances property in response
  • lxd/container/snapshot: Removes duplicated instance type check
  • lxd/storage: Changes CreateInstanceSnapshot signature to accept source instance
  • lxd: Hooks instanceCreateAsSnapshot up to new storage pkg
  • lxd/storage/drivers/load: Adds RunningSnapshotFreeze to driver Info struct
  • shared/generate: Insert build tag
  • lxd/storage/drivers/driver/dir: Defines dir driver needs freeze during snapshot
  • lxd/storage/backend/lxd: Adds snapshot check to ensureInstanceSymlink
  • lxd/storage/backend/lxd: Implements CreateInstanceSnapshot
  • doc: Documents the VM cloud-init:config drive option
  • lxd-agent: Put /snap/bin in PATH
  • lxd/storage/btrfs: Fix StorageEntitySetQuota
  • seccomp: block new mount API when mount interception is requested
  • lxd/networks: Merge clsuter config on create
  • lxd/networks: Forward config updates
  • lxd/storage: Renames interfaces.go to pool_interface.go
  • lxd/storage/pool/interface: Removes Instance interface
  • lxd/storage: Switches to use instance.Instance interface
  • lxd/container/put: Renames containerSnapRestore to instanceSnapRestore
  • lxd/container/lxc: Links snapshot Restore() to new storage pkg
  • lxd/storage/interfaces: RestoreInstanceSnapshot signature
  • lxd/storage/backend/mock: RestoreInstanceSnapshot signature
  • lxd/storage/backend/lxd: Implements RestoreInstanceSnapshot
  • lxd/container/backup: Comment tweaks and inst var rename
  • lxd/backup: Links backupCreate to new storage pkg
  • lxd/storage/drivers/driver/dir: rsync.LocalCopy return value consistency
  • lxd/storage/backend/lxd: Ensures all instance functions use project aware storage names
  • lxd/storage/backend/lxd: Implements BackupInstance
  • lxd/storage/drivers/interface: Adds BackupVolume
  • lxd/storage/drivers/driver/cephfs: Adds BackupVolume placeholder
  • lxd/storage/drivers/driver/dir: Adds BackupVolume
  • shared/archive/linux: Adds some explanation to DetectCompressionFile
  • lxd/images: Adds more output detail when tar2sqfs fails in compressFile
  • lxd/container: instanceCreateFromBackup restructure so as not to return storage
  • lxd/containers/post: Updates createFromBackup to not need storage returned from instanceCreateFromBackup
  • lxd/images: Fix image pruning with projects
  • lxd/images: Fix VM image export
  • client: Fix VM image export
  • shared: Un-restrict archive.go
  • shared: Add qcow2
  • client: Fix VM image import
  • lxc/image: Detect type on import
  • Rename containers to instances in db views
  • Drive-by fix of UsedBy for networks
  • lxd/vm: Add limits.memory.hugepages
  • shared: Add limits.memory.hugepages
  • doc: Add limits.memory.hugepages
  • scripts/bash: Add limits.memory.hugepages
  • doc/instances: Indicate VM support when applicable
  • shared: Cleanup console on error
  • lxd: Cleanup console on error
  • lxd/console: Improve disconnection handling
  • lxd/vm: Add locking around console
  • Remove accidentally committed testimage.tar.xz
  • Add arch column to nodes table
  • Add NodeAddWithArch() method to add a node with a specific arch
  • lxd/backup/backup/instance/config: Adds instance config backup.yml tools
  • lxd/api/internal: Removes slurpBackupFile and switches to backup.ParseInstanceConfigYamlFile
  • lxd/backup: Removes backupFixStoragePool
  • lxd/containers/post: Updates instanceCreateFromBackup usage
  • lxd/container: Updates instanceCreateFromBackup signature
  • lxd/backup/backup/instance/config: UpdateInstanceConfigStoragePool no longer updates snapshots backup.yaml
  • lxd: Comment improvements
  • lxd/containers/post: Adds storage pool check to createFromBackup
  • lxd/container: Removes storage pool check from instanceCreateFromBackup
  • lxd/backup/backup: Removes squashfs handling from GetInfo
  • lxd/container: Removes squashfs handling from instanceCreateBackup
  • lxd/containers/post: Moves backup restore squashfs handling to createFromBackup
  • Document container launch algorithm on cluster
  • lxd/storage/utils: Adds InstanceContentType
  • lxd/container/post: Cleans up createFromMigration
  • lxd/storage/zfs: Fix pool import
  • lxd/container/lxc: Updates use of backupFile to backup.InstanceConfig
  • lxd/storage/backend/lxd: Implements CreateInstanceFromBackup
  • lxd/storage: Updates CreateInstanceFromBackup signature
  • lxd/container: Updates instanceCreateFromBackup to use new storage pkg
  • lxd/containers/post: Updates instanceCreateFromBackup usage with hooks
  • lxd/backup/backup/instance/config: Updates UpdateInstanceConfigStoragePool to take mount path
  • lxd/container: Updates backup.UpdateInstanceConfigStoragePool usage
  • lxd/storage/backend/lxd: Switches to InstanceContentType function
  • lxd/storage/drivers/interface: RestoreBackupVolume signature
  • lxd/storage/drivers/driver/cephfs: RestoreBackupVolume placeholder
  • lxd/storage/drivers/driver/dir: Moves initial project quota setup to own function
  • lxd/storage/drivers/driver/dir: Implements RestoreBackupVolume
  • lxd/containers/post: Pass state to migration Do function
  • lxd/migrate/container: Restructure of migrationSink.Do()
  • lxd/migrate/storage/volumes: Comment restructure
  • lxd: Pass instance type to instanceLoadNodeAll
  • lxd/vm: Tweak default memory
  • lxd/vm: Add a virtio graphics card
  • lxd/vm: Add ringbuffer on vserial
  • lxd-agent: Add vserial state notification
  • lxd/qmp: Introduce new QMP wrapper
  • tests: Add lxd/qmp to golint
  • lxd/vm: Port to new qmp package
  • lxd/vm: Don't start or reboot the VM
  • lxd/vm: Use agent detection from QMP
  • lxd/vm: Restart monitor on startup
  • lxd/vm: Use shared ringbuf size definition
  • lxd/vm: Implement freeze/unfreeze
  • lxd/vm: Privileged mode doesn't apply
  • client: Add agent version of DeleteInstanceFile
  • lxd/vm: Add FileRemove support
  • lxd/seccomp: Fix golint
  • lxd/daemon: Don't block on RBAC
  • lxd/storage/backend/lxd: Fixes comments
  • lxd/storage/backend/lxd: Adds symlink and revert support to CreateInstanceFromMigration
  • lxd/storage/backend/lxd: Adds optimised migration over image support to CreateInstanceFromMigration
  • lxd/migrate/container: Links migrationSink.Do to new storage pkg
  • lxd/containers/post: Links createFromMigration to new storage pkg
  • lxd/cluster: More reliable event delivery
  • lxd/response: Coding style
  • lxd/operations: Use ForwardedResponse
  • lxd/images: Coding style
  • lxd/cluster: Coding style
  • lxd: Tweak cluster.Connect calls
  • lxd/container/post: Returns instances resources from containerPost
  • lxd/migrate/container: Removes duplicated instance type checks from migrationSourceWs.Do
  • lxd: Removes dependency on instance.DaemonState() from migrationSourceWs
  • lxd/storage: Removes DaemonState() from pool interface
  • lxd/migrate/storage/volumes: Removes unrelated comment
  • lxd/migrate/container: Restructures migrationSourceWs.Do() ready for new storage layer.
  • lxd/storage: Properly handle driver config changes
  • lxd/storage/backend/lxd: Comment typos
  • lxd/storage/drivers/drive/dir: Add support for 2-phase migration
  • lxd/migration/migration/volumes: Adds Live property to VolumeTargetArgs
  • lxd/migrate/container: Add support for 2-phase sync in migrationSink.Do()
  • lxd/migrate/container: Sends refresh request indicator in migration response header
  • lxd/rsync/rsync: Adds more info to error returned in sendSetup
  • lxd/storage/drivers: Adds Config() function to return read-only copy of pool config
  • lxd/container/post: Minor cleanup and instance info output in containerPost
  • lxd/migrate/container: Links migrationSourceWs.Do to new storage pkg
  • lxd/migration/migration/volumes: Adds FinalSync bool to VolumeSourceArgs
  • lxd/storage/backend/lxd: Adds sanity check to MigrateInstance during FinalSync
  • lxc/copy: Updates copyContainer to not modify volatile.idmap.next
  • lxd/util: Add HasFilesystem
  • lxd: Detect built-in shiftfs too
  • api: Add image_profiles extension
  • shared/api: Add image profiles
  • lxc/image: Add support for image profiles
  • lxd/db: Add images_profiles table
  • lxd/images: Add support for image profiles
  • doc/image-handling: Add image profiles
  • lxd/cluster: Fix handling of ceph/cephfs on join
  • tests: Always use force with stop/restart
  • tests: Tighten sleep calls
  • lxc/storage: Fix template apply on cross-pool copy
  • tests: Add tests for image profiles
  • tests: Respect projects in ensure_import_testimage
  • i18n: Update translation template
  • lxd/storage/drivers/driver/types: Moves Info definition and adds VolumeFiller type
  • lxd/storage/drivers/load: Removes non-load related types from this file
  • lxd/storage/drivers/interface: Updates CreateVolumeFromMigration and CreateVolume to use VolumeFiller
  • lxd/storage/drivers/driver/cephfs: Updates CreateVolumeFromMigration and CreateVolume to use VolumeFiller
  • lxd/storage/drivers/driver/dir: Updates CreateVolume to use VolumeFiller
  • lxd/storage/drivers/driver/dir: Updates CreateVolumeFromMigration to accept a pre-VolumeFiller argument
  • lxd/storage/backend/lxd: Updates to use VolumeFillers
  • lxd/backup: Comment consistency
  • lxd/daemon: Adds LXD_SHIFTFS_DISABLE env var to disable shiftfs
  • doc/environment: Documents LXD_SHIFTFS_DISABLE env var
  • lxd/container/lxc: Updates Export to use new storage pkg for mounting
  • shared/containerwriter/container/tar/writer: Fixes bug with rootfs dir not being unshifted
  • lxd/vm: Remove default GPU
  • lxd/vm: Update comment
  • lxd/vm: Record power state
  • lxd/container/lxc: Unexport storageStartSensitive
  • lxd/vm/qemu: Makes mount and unmount functions behave the same as containerLXC's
  • lxd/storage/backend/lxd: Fixes MountInstanceSnapshot/UnmountInstanceSnapshot functions
  • lxd/container/lxc: Links to new storage pkg
  • lxd/container/lxc: Updates containerLXCCreate to init new storage layer
  • lxd/container/lxc: Updates initStorage to warn if init old storage layer when new layer is running
  • lxd/container/lxc: Updates Delete to not use old storage layer when using new storage layer
  • lxd/container/lxc: Updates Update() to detect whether to write backup file without using old storage layer
  • lxd/container/lxc: Updates Migrate to access PreservesInodes from old and new storage layers
  • lxd/vm: Don't use named return variables
  • lxd/resources: Port to new storage API
  • lxd/storage: Fix new storage API handling for snapshots
  • lxd/storage: Remove legacy cephfs implementation
  • lxd/storage/cephfs: Use all monitors on mount
  • lxd/storage: List VM volumes in UsedBy
  • lxd/storage: Fix UsedBy with projects
  • Enable SQLITE_CONFIG_MULTITHREAD
  • tests: Don't use fixed timestamp
  • lxd/forkdns: Fix help message
  • lxd/forkdns: Fix logging
  • lxd/forkdns: Use clean request messages
  • tests: Fix security test on non-shiftfs
  • lxd/vmqemu: Moves vmqemu files into sub folder for their own package
  • lxd/instance/vmqemu/vm/qemu: Updates VMQemu to exist in own package
  • lxd/instance/vqemu/vm/qemu/cmd: Updates to be in own package
  • lxd/networks: networkGetLeaseAddresses into instance package
  • lxd/backup/backup: Adds New() function
  • lxd: Moves instance load and instance validation functions into instance pkg
  • lxd/vm: Rename vmqemu to qemu
  • lxd/vm: Move qmp under qemu
  • lxd/container: Fix comment
  • lxd/vm: Remove reference to container
  • lxd/networks: Simplify instance hwaddr logic
  • tests: Really fix non-shiftfs security test
  • lxc/image: Rename ARCH to ARCHITECTURE
  • i18n: Update translation templates
  • lxd/instance/qemu: Sets log file to qemu.log
  • lxd/storage/cephfs: Fix rsync migration
  • lxd/container: Cleanup mount logic
  • lxd/container: Remove unused initStorage
  • lxd/import: Fix handling of new drivers
  • lxd/backup: Fix backup creation on new drivers
  • lxd/storage/zfs: Use StoragePool to get pool name
  • tests: Remove pointless loop/check
  • tests: Test copy on cephfs
  • Rename database_update.sh to database.sh
  • Don't retry in case of generic I/O errors
  • Add test_database_no_disk_space
  • lxd: Fix backup handling with hyphenated names
  • test/suites/backup: Test hyphenated instance names
  • lxd/cgroup: Add basic cgroup abstraction
  • lxd/container: Add wrapper for cgroup abstraction
  • lxd/container: Port pids.max to cgroup abstraction
  • tests: Always pass --force
  • tests: Use lazy unmount in DB test
  • lxd/instance: Split instance image resolving
  • lxd/state: Expose proxy function
  • lxd/container: Don't crash test on differing state
  • shared/simplestreams: Implement GetAliasArchitectures
  • client: Add arch-dependent aliases
  • client: Add caching options
  • lxd/instance: Implement SuitableArchitectures
  • shared/simplestreams: Implement caching support
  • client: Setup caching for simplestreams
  • lxd/daemon: Remove custom cache implementation
  • lxd/daemon: Port daemon storage to new functions
  • Improve build-from-source instructions to be clearer and also cover building a specific release of LXD.
  • lxd/{device,networks,util}: Move Sysctl to util from device and change usage
  • lxd/{firewall,iptables}: Introduce firewall interface and xtables implementation, add firewall interface to static analysis
  • lxd/{daemon,state}: Firewall struct added to daemon and state
  • lxd/{device,networks}: Switch from iptables to xtables through firewall interface
  • tests: Don't leak storage in ENOSPC test
  • lxd/db: Rename ContainerNames to InstanceNames
  • cgroups: pre-mount on pure-cgroup2 systems with cgroup namespaces
  • lxd/iptables: Fix ebtables handling regression
  • lxd/storage: Port volume attach/detach
  • lxd/storage: Store pool db entry in backend
  • lxd/storage/drivers: Implement Update/Validate
  • lxd/storage: Implement pool updates
  • lxd/storage: Port pool update to new functions
  • lxd/main/forkdns: Adds recursion desired comment that got removed during refactor
  • lxd/instance/qemu/vm/qemu: Adds -no-user-config to qemu start flags
  • lxd/instance/qemu/vm/qemu: Adds chroot flag to qemu start up command
  • lxd/{test,cgroup}: Add cgroup package to static analysis tests
  • daemon: log cgroup layout on startup
  • lxd/instance/qemu/vm/qemu: Implements deviceAdd and deviceRemove
  • shared/simplestreams: Only write cache if configured
  • lxd/vm: Reduce 9p mount access
  • lxd/sys: Expose UnprivUser/UnprivUID
  • lxd/networks: Port to os.UnprivUser
  • lxd/instance/qemu/vm/qemu: Adds -runas flag to qemu
  • lxd/db: Add missing unique key
  • lxd/db: Add upgrade logic for UNIQUE fix
  • lxc/cgroup: Fix bad error handling
  • lxd/storage: Create image volume DB entry
  • lxd/images: Port to new storage functions
  • lxd/storage: Move storage_cgo.go to drivers package
  • lxd/storage/drivers: Add FS and mount functions
  • lxd: Use FS and mount functions from drivers package
  • lxd/storage: Remove FS and mount functions
  • Add basic bridge documentation
  • lxd: Mark container snapshots as such
  • lxd/storage/locking: New storage locking package
  • lxd/storage: Lock image creation
  • lxd/backup: Rename HasBinaryFormat to OptimizedStorage
  • lxd/storage/drivers: Update RestoreBackupVolume signature
  • lxd/storage: Update call to RestoreBackupVolume
  • test/suites: Satisfy shellcheck
  • lxd/storage: Add refresh to MigrationTypes
  • lxd/storage/drivers: Add refresh to MigrationTypes
  • lxd: Update call to MigrationTypes
  • shared: Implemented Background Process Manager
  • shared: Implemented Background Process Manager tests
  • lxd/storage/drivers: Always pass Volume argument
  • lxd/storage/drivers: Use new driver interface
  • lxd/storage: Always pass Volume to drivers
  • lxd/storage: Removes unnecessary argument in backendLXD.create()
  • lxd/storage/backend/lxd: Comment on function description
  • lxd/storage/backend/lxd: Implements UpdateInstance
  • lxd/storage/backend/lxd: Implements UpdateImage
  • lxd/storage/backend/lxd: Adds detectChangedConfig and updates usage
  • lxd/storage/backend/lxd: Switches to StoragePoolVolumeUpdateByProject
  • lxd/db/storage/pools: Replaces StoragePoolVolumeUpdate with StoragePoolVolumeUpdateByProject
  • lxd/storage/volumes: Updates storagePoolVolumeTypePut to be project aware
  • lxd/storage/pool/interface: Adds Update functions for volumes
  • lxd/storage/drivers/driver/common: Only allow size property on custom volumes
  • lxd/storage/backend/mock: Adds Update functions for volumes
  • lxd: Updates StoragePoolVolumeUpdateByProject usage
  • lxd/storage/backend/lxd: Updates Update() to use detectChangedConfig()
  • lxd/storage/backend/lxd: Implements UpdateInstanceSnapshot
  • lxd/storage/backend/lxd: Adds updateVolumeDescriptionOnly
  • lxd/storage/backend/lxd: Adds UpdateCustomVolumeSnapshot
  • lxd/storage/volumes/snapshot: Updates storagePoolVolumeSnapshotTypePut to use new storage pkg
  • lxd/cgroup: Additional resource get/set functions through cgroup abstraction layer
  • lxd/{container_lxc, cgroup}: Use abstraction layer functions for cgroup V1 functionality
  • lxd/cgroup: Return ErrControllerMissing on incomplete V2
  • lxd/storage/dir: Use MountPath
  • lxd/storage/dir: Move vfsResources
  • lxd/storage/common: Add vfsRenameVolume
  • lxd/storage/common: Add vfsVolumeSnapshots
  • lxd/storage/common: Add vfsRenameVolumeSnapshot
  • lxd/storage/common: Simplify vfsRenameVolume
  • lxd/storage: Add createParentSnapshotDirIfMissing
  • doc: Add new developer guide to contributing.md
  • lxd/storage/cephfs: Cleanup driver
  • lxd/storage: Rename RestoreBackupVolume to CreateVolumeFromBackup
  • lxd/storage/dir: Cleanup driver
  • lxc/storage/utils: Updates validateVolumeCommonRules to accept volume argument
  • lxd/storage/drivers/volume: Exposes BlockBacking property from storage driver via IsBlockBacked()
  • lxd/storage: Updates commonVolRulesFunc usage
  • lxd: Fix order of cgroup initialization
  • lxd/storage/backend/lxd: Adds protection against updating volume properties that cant be changed
  • lxd/storage/drivers/volume: Exposes volume type and content type of Volume
  • lxd/storage/utils: Improves common volume validation
  • lxd/db/storage/pools: Adds StoragePoolNodeVolumeGetTypeIDByProject
  • lxd/storage/utils: Makes VolumeDBCreate project aware
  • lxd/storage/volumes/utils: Updates usage of VolumeDBCreate
  • lxd/storage/backend/lxd: Updates usage of VolumeDBCreate
  • lxd/storage/backend/lxd: Adds instanceRootVolumeConfig
  • lxd/storage/backend/lxd: Updates to use instanceRootVolumeConfig
  • lxd/storage/backend/lxd: Switches to use StoragePoolNodeVolumeGetTypeByProject
  • lxd/storage/backend/lxd: Fixed UpdateInstance's incorrect used volStorageName for DB queries
  • lxd/storage/drivers: Re-order utils
  • lxd/storage: Move BaseDirectories to drivers
  • lxd/storage/cephfs: Don't hardcode directory names
  • lxd/storage/cephfs: Simplify Delete
  • shared: Handle btrfs in IsMountPoint
  • lxd/storage: Allow deletion of missing pools
  • lxd/storage/dir: Move MigrateVolume to common
  • lxd/storage/drivers/interface: Changes load() definition as no longer returns error
  • lxd/storage/drivers/common: Removes calling driver's load() func from init()
  • lxd/storage/drivers/load: Calls driver's load() function from main loader
  • lxd/storage/drivers/driver/cephfs: Fix typo in tool detection
  • lxd/storage/cephfs: Use common functions
  • lxd/storage/common: Add vfsHasVolume
  • lxd/storage/common: Add vfsGetVolumeDiskPath
  • lxd/storage: Always init driver with state/logger
  • lxd/storage: Replace CreateMountPath with EnsureMountPath
  • lxd/storage/cephfs: Use helper functions
  • lxd/storage/dir: Use helper functions
  • lxd/cgroups: enable cgroup2 limit support
  • lxd/storage: Pass state to SupportedDrivers
  • lxd/storage: Expand volume config in newVolume
  • lxd/storage/drivers: Use expanded config
  • lxd/storage/drivers: Don't hardcode default block size
  • lxd/storage/drivers/interface: Comments on pool mount/unmount definitions
  • shared/util: Adds comment to TryRunCommand
  • lxd/storage/backend/lxd: Fixes bug with non-project aware vol storage name in RenameInstance
  • lxd/storage/drivers/utils: Removes implication of project awareness from driver mount point helpers
  • lxd/storage/drivers: Move ensureVolumeBlockFile to utils
  • lxd/storage: Split out backup unpack logic
  • lxd/storage/dir: Fix for consistency
  • lxd/storage/utils: Removes mount helper functions
  • lx/storage/utils: Adds legacy mount functions to main pkg
  • lxd/storage/drivers/utils: Unexports mount helper funcs except TryMount/TryUnmount
  • lxd/patches: Updates to use TryMount/TryUnmount from storage/drivers pkg
  • lxd/storage/drivers/driver/cephfs: TryMount usage
  • lxd/storage/drivers/driver/dir: TryMount usage
  • lxd/storage/btrfs: Updates to use unexported legacy mount functions
  • lxd/storage/ceph: Updates to use legacy unexported mount functions, except TryMount/TryUnmount
  • lxd/storage/lvm: Updates to use legacy unexported mount functions, except TryMount/TryUnmount
  • lxd/storage/zfs/utils: Consistent import name for storage/drivers pkg
  • lxd/storage/drivers: Export Name and Logger
  • lxd/storage/drivers: Introduce genericCopyVolume
  • lxd/storage/drivers: Introduce genericCreateVolumeFromMigration
  • lxd/storage/drivers: Simplify genericBackupUnpack
  • lxd/backup: Adds check for supported instance type when loading storage pool
  • lxd/container: Adds check for supported instance type when restoring backup
  • lxd/container/lxc: Adds check for supported instance type when loading storage pool
  • lxd/migrate/container: Adds check for supported instance type when loading storage pool
  • lxd/storage/drivers: Introduce vfsBackupVolume
  • lxd/storage/drivers: Rename driver_cgo to utils_cgo
  • lxd/storage/drivers: Add releaseLoopDev
  • lxd/storage/utils: Improve error handling in forceUnmount
  • lxd/storage/utils: Add fsUUID
  • lxd/storage/utils: Add tryExists
  • lxd/storage/utils: Add hasFilesystem
  • lxd/storage/drivers: Add btrfs
  • tests: Update exclusion for btrfs
  • Update /operations endpoint API doc
  • lxd/revert: Adds revert helper package for running revert functions in reverse order
  • lxd/revert/revert/test: Adds revert tests
  • lxd/storage/backend/lxd: Updates to use revert pkg rather than custom revertFuncs slice
  • lxd/storage/drivers/driver/dir: Updates to use revert pkg rather than custom revertFuncs slice
  • lxd/storage/drivers/driver/btrfs/volumes: Switches to revert pkg for CreateVolumeFromBackup
  • lxd/storage/drivers/generic: Switches to revert pkg for genericBackupUnpack
  • lxd/storage/utils: Clarifies comment on ImageUnpack
  • lxd/storage/backend/lxd: Typo in error
  • lxd/storage/memorypipe: Increases channel buffer size to allow Close() cleanup
  • lxd/storage/backend/lxd: Close migration send end when error occurs
  • lxd/storage/drivers/volume: Differentiates between volume config and pool config
  • lxd/storage/backend/lxd: Removes expansion of pool's volume config into volume config in newVolume()
  • lxd/storage/backend/lxd: Updates CreateCustomVolumeFromMigration to use Volume.Config() to create DB record
  • lxd/storage/utils: drivers.NewVolume usage
  • lxd/storage/drivers/driver/cephfs/volumes: drivers.NewVolume usage
  • lxd/storage/drivers/driver/cephfs/volumes: vol.ExpandedConfig usage
  • lxd/storage/drivers/driver/cephfs/volumes: Comments
  • lxd/storage/drivers/driver/dir/utils: vol.ExpandedConfig usage
  • lxd/storage/drivers/driver/dir/volumes: Comments
  • lxd/storage/drivers/generic: NewVolume usage
  • lxd/storage/drivers/utils: vol.ExpandedConfig usage
  • lxd/storage/backend/lxd: Ensures VolumeDBCreate uses config from the Volume and not the request
  • lxd/storage/drivers/driver/btrfs/volumes: Fixes usage of NewVolume
  • Use JSON markdown blocks in docs
  • cgroup: shortcut cgroup2 only layouts
  • cgroups: detect blkio.bfq.weight knob
  • lxd/instances: Export FillNetworkDevice
  • doc/networks: Clarify raw.dnsmasq
  • lxc-to-lxd: Set useragent
  • lxd-p2c: Set useragent
  • lxd: Always set user agent
  • shared: Set user-agent in GetRemoteCertificate
  • lxd/storage/drivers: Rename applyQuota to initVolume
  • lxd/storage/drivers: Fix bad ExpandedConfig
  • lxd/storage: Include size in instance update
  • lxd/device/nic/routed: Improves IPv6 forwarding and proxy_ndp sysctl detection
  • doc/instances: Updates routed nic sysctl requirements
  • tests: Updates routed nic tests to enable proxy_ndp on all interfaces
  • lxd/storage/backend/lxd: Switches create to use revert package
  • lxd/storage/drivers/generic: Uses revert package on genericCreateVolumeFromMigration
  • lxd/storage/drivers/generic: Adds refresh arg to genericCopyVolume
  • lxd/storage/drivers: genericCopyVolume updated usage for refresh arg
  • lxd/storage/drivers/driver/dir/volumes: Use SetVolumeQuota from UpdateVolume
  • lxd/storage/backend/lxd: Makes specific lock name for volume EnsureImage action
  • lxd/storage/drivers/volume: Adds UnmountTask function
  • lxd/storage/drivers/utils: Adds volume filesystem shrink and grow functions
  • lxd/storage/drivers/errors: Adds "not supported" error type
  • lxd/container/lxc: Detects storage drivers that dont support volume usage stats
  • tests: Don't leak CEPH pools
  • lxd/storage: Set contentType during image deletion
  • lxd/storage/drivers/generic: Improves genericBackupUnpack
  • lxd/revert: Adds Clone function to revert
  • lxd/storage/drivers/utils: Comments on wipeDirectory
  • lxd/containers/post: Improves comment in createFromBackup
  • lxd/storage/backend/lxd: Adds error checking to MountTask in CreateInstanceFromBackup
  • lxd/storage/pool/interface: Adds UpdateInstanceBackupFile
  • lxd/storage/backend/mock: Adds UpdateInstanceBackupFile
  • lxd/storage/backend/lxd: Implements UpdateInstanceBackupFile
  • lxd/instance/instance/interface: Adds UpdateBackupFile
  • lxd/instance/qemu/vm/qemu: Implements UpdateBackupFile
  • lxd/container/lxc: Implements UpdateBackupFile
  • lxd/container: Switches to inst.UpdateBackupFile()
  • lxd/container/lxc: Switches to inst.UpdateBackupFile()
  • lxd/instance/instance/utils: Deprecates WriteBackupFile function
  • lxd/instance/qemu/vm/qemu: UpdateBackupFile usage
  • lxd/storage: Support deleting snapshots during restore
  • lxd/images: Fix clustering handling on delete
  • tests: Remove un-needed image volume delete
  • lxd/storage: Update driver cache for new drivers
  • Improve websocket doc in container exec
  • lxd/qemu: Fix multiple NICs
  • lxd/storage/drivers/volume: Adds DefaultFilesystem constant of ext4
  • lxd/storage/utils: Uses DefaultFilesystem in VolumeFillDefault
  • lxd/storage/backend/lxd: Updates EnsureImage to detech filesystem changes and regenerate
  • lxd/storage/drivers/utils: Comment on shrinkFileSystem
  • lxd/storage/drivers/utils: Mounts btrfs filesystems during shrinkFileSystem
  • lxd/storage/drivers/utils: Adds regenerateFilesystemUUID functions
  • lxd/storage/drivers: Use standard errors
  • lxd/storage/btrfs: Disable send/receive inside containers
  • lxd/init: Support new storage drivers
  • lxd/storage/drivers: Use standard errors
  • lxd/storage/btrfs: Disable send/receive inside containers
  • lxd/init: Support new storage drivers
  • lxd/migration: Improve multi-pass transfers
  • lxd/storage: Pass VolumeSourceArgs as pointer
  • lxd/storage: Port "zfs" to new driver logic
  • tests: Add zfs to list of new drivers
  • lxd/storage/backend/lxd: Applies root disk quota as part of backup import post hook
  • lxd/storage/backend/lxd: Adds errors.Wrapf around os. and unix. function errors
  • lxd/storage/drivers/driver/btrfs/volumes: tmpVolSuffix usage
  • lxd/storage/drivers/volume: Adds tmpVolSuffix const
  • lxd/storage/drivers/utils: Adds errors.Wrapf to mount/unmount functions
  • lxd/storage/drivers/utils: Adds renegerateFilesystemUUIDNeeded
  • lxd/storage/backend/lxd: Triggers backup file update in BackupInstance and and RenameInstanceSnapshot
  • lxd/storage/backend/lxd: Improves revert in RenameInstance
  • lxd/storage/drivers: Fix comments
  • tests: Fix storage_compatible for zfs
  • lxd/storage/drivers/generic: Adds EnsureMount path calls after mounting volumes
  • lxd/device/disk: Defer instance type check until start time for cloud-init config drive
  • lxd/migrate/container: Merges duplicate multi sync logic and adds comments
  • lxd/storage/drivers/volume: Adds NewVMBlockFilesystemVolume and IsVMBlock functions
  • lxd/storage/drivers/driver/zfs/volumes: VM block function usage
  • lxd/storage/drivers/driver/zfs/utils: Removes unused checkVMBlock
  • lxd/storage/pools: Support non-default project in storagePoolDelete
  • lxd/device/device/instance: Removes interface in place of instance.Instance
  • lxd/container: Replaces device.Instance with instance.Instance
  • lxd/storage: Replaces device.Instance with instance.Instance
  • lxd/device: Replaces device.Instance with instance.Instance
  • lxd/device: Renames d.instance to d.inst to avoid conflicts with instance package
  • lxd/storage: Updates storageRootFSApplyQuota to support VMs
  • lxd/device/disk: Allow VM disks to be updated
  • lxd/storage/drivers/utils: Adds copyDevice function
  • lxd/storage/drivers: Filler logging
  • lxd/storage/drivers/generic: Updates genericCopyVolume to be VM block aware using copyDevice
  • client/lxd/instances: Sends instance type when copying instances
  • lxc: Don't use instance when referring to server
  • lxc: Rename container to instance
  • lxc/info: Fix VM support
  • i18n: Update translation templates
  • lxd/storage/zfs: Fix set on 0.6
  • lxd/storage/drivers: Use errors.Wrap
  • lxd/storage/drivers: Wrap os/ioutil calls
  • api: Add clustering_architecture extension
  • shared/api: Add Architecture to ClusterMember
  • lxd/db: Add Architecture to NodeInfo
  • lxd/cluster: Track member architecture
  • lxc/cluster: Add architecture column in list
  • lxd/storage/backend/lxd: Add project support to GetInstanceUsage
  • lxd/storage/utils: Removes default volume size from VolumeFillDefault
  • test/suites/storage: Updates LVM quota tests to take into account new SI units conversion
  • test/suites/backup: Fixes issue with import testing with LVM
  • tests: Add lvm to list of new drivers
  • lxd/storage/ceph: Fix volume size handling
  • lxd/storage/drivers/utils: Adds loopFilePath function
  • lxd/storage/drivers: Replace repetitive loop path generation with call to loopFilePath
  • lxd/storage/drivers/load: Enables LVM driver
  • lxd/db: Silence normal sql errors
  • lxd/db: Fix image profile copying logic
  • lxd/util: IsAddressCovered takes into account host names
  • lxd/db: Add archs filter to ClusterTx.NodeWithLeastContainers()
  • lxd/instance: make SuitableArchitectures handle snapshots too
  • lxd/containers_post.go: Use cluster architecture in placement
  • lxd/db: Ensure zfs.pool_name is set
  • lxd/storage/drivers/lvm: LVM driver implementation
  • lxd/containers: Use 'instance' key in templates
  • lxc: Fix typo
  • lxc: Bump examples to 18.04
  • i18n: Update translation templates
  • doc: s/container/instance/
  • doc: Bump releases in examples
  • doc/rest-api: Cover the three instance endpoints
  • lxd/instance/qemu/vm/qemu: Adds running disk usage stats to disk state
  • lxd/storage/backend/lxd: Adds VM support to GetInstanceUsage
  • lxd/container: Adds VM support to instanceCreateAsSnapshot
  • lxd/container/snapshot: Adds VM support to containerSnapshotHandler
  • lxd/migration/migration/volumes: Fixes crash when storage driver has no transfer methods
  • lxd/storage/drivers/driver/common: Adds VM support for migration types
  • lxd/storage/drivers/driver/lvm: Adds VM support
  • lxd/storage/drivers/drivers/lvm/utils: VM support
  • lxd/storage/drivers/drivers/lvm/volumes: VM support
  • lxd/instances: Fix creation from simplestreams
  • lxd/db: Fix multi-arch cached images
  • lxd/storage/drivers: Rename drivers_ to driver_
  • lxd/storage/drivers: Implement patch mechanism
  • lxd/storage: Add patch mechanism to backend
  • lxd/patches: Add storage_create_vm
  • Skip updating instances and profiles not using a volume being renamed
  • i18n: Update translations from weblate
  • lxd/storage/btrfs: Fix usage inside containers
  • lxd/storage/backend/lxd: Validate config on pool create
  • shared/instance: Adds IsSize to validate size strings
  • lxd/storage/pools/config: Removes old LVM validation from storagePoolValidateConfig
  • lxd/storage/utils: shared.IsSize usage
  • lxd/storage/load: commonRules usage
  • lxd/storage/utils: commonRules usage
  • lxd/storage/drivers/load: Adds Validators type for common rules
  • lxd/storage/drivers/interface: commonRules usage
  • lxd/storage/drivers: Call d.validatePool in Validate function
  • lxd/storage/drivers/drivers/common: Updates for commonRules
  • lxd/storage/drivera/driver/common: Adds validatePool function
  • lxd/storage/drivers/driver/dir/utils: commonRules usage
  • lxd/storage/drivers/driver/btrfs: pool validation
  • lxd/storage/drivers/driver/zfs: pool validation
  • lxd/storage/drivers/driver/cephfs: pool validation
  • lxd/storage/drivers/driver/common: Improved error messages in validatePool and validateVolume
  • lxd/storage/pools: Fixes empty values for non-compat pools in storagePoolClusterConfigForEtag
  • lxd/storage/pools/config: shared.IsSize usage
  • lxd/storage/pools/config: comment
  • lxd/storage/drivers/driver/lvm: Adds validation
  • doc/api-extension: Fix formatting
  • api: Add resources_disk_id extension
  • shared/api: Add device_id to resources
  • lxd/resources: Add device_id
  • lxd/storage/drivers/driver/lvm: Adds stripe validation
  • lxd/storage/pools/config: Adds volume.lvm.stripes and volume.lvm.stripes.size to pool validation
  • lxd/storage/drivers/driver/lvm/utils: Updates createDefaultThinPool to support stripes
  • lxd/storage/drivers/driver/lvm/utils: Updates createLogicalVolume to support stripes
  • doc/storage: Documents storage_lvm_stripes options
  • doc/api-extensions: trim whitespace
  • doc/api-extensions: Adds storage_lvm_stripes
  • shared/version/api: Adds storage_lvm_stripes extension
  • lxd/storage/btrfs: Fix bad check
  • lxd/containers: Properly setup cgroup writer
  • lxd/cgroup: Fix memory limit handling

Try it for yourself

This new LXD release is already available for you to try on our demo service.

Downloads

The release tarballs can be found on our download page.

Binary builds are also available for:

  • Linux: snap install lxd
  • MacOS: brew install lxc
  • Windows: choco install lxc

LXD 3.18 has been released

2nd of October 2019

Introduction

The LXD team is very excited to announce the release of LXD 3.18!

This release includes a lot of the preliminary work needed in order to implement virtual machine support alongside containers in future LXD releases. LXD 3.18 comes with a number of API additions and changes to the Go client and CLI tools to allow driving virtual machines.

The bulk of this is the slow replacement of containers in the API and internal code base for the more generic instances which will then encompass both containers and virtual machines.

The vast majority of that work will currently be invisible to our normal users, everything was done to make this fully backward compatible, so older API clients will keep working as usual.

As far as immediately usable improvements, this release extends our resources API to expose more disk information, adds the ability to alter image expiry dates, switches to a new clustering role mechanism and allows some more configuration options when using Fan networking.

Enjoy!

New features

New /1.0/instances endpoint

Part of the move to supporting virtual machines is the replacement of our current /1.0/containers API with a new /1.0/instances API which will then return both containers and virtual machines. The structure of this new API endpoint is identical and the former endpoint is now just a type filter on top of the new one.

For consistency, once virtual machine support is ready, we will also be providing a /1.0/virtual-machines endpoint, which will similarly type filter /1.0/instances and only show virtual machines.

As part of this work, the Go client package was also modified to include new functions for all the /1.0/instances endpoints, detecting the availability of that new API and falling back to the old one when interacting with an older LXD server.

Our command line tool (lxc) was then updated to use those new functions too.

Support for storing VM images

This release of LXD is able to query virtual machine images from other LXD servers and from simplestreams servers where such images are already available. Current the only two servers which have such images are ubuntu: and ubuntu-daily:.

stgraber@castiana:~$ lxc image list ubuntu: serial=20190918 release=bionic architecture=amd64
+-------------+--------------+--------+---------------------------------------------+--------+-----------------+----------+-------------------------------+
|    ALIAS    | FINGERPRINT  | PUBLIC |                 DESCRIPTION                 |  ARCH  |      TYPE       |   SIZE   |          UPLOAD DATE          |
+-------------+--------------+--------+---------------------------------------------+--------+-----------------+----------+-------------------------------+
| b (11 more) | 8d1e0577b1d1 | yes    | ubuntu 18.04 LTS amd64 (release) (20190918) | x86_64 | VIRTUAL-MACHINE | 328.25MB | Sep 18, 2019 at 12:00am (UTC) |
+-------------+--------------+--------+---------------------------------------------+--------+-----------------+----------+-------------------------------+
| b (11 more) | 9ff5784302bf | yes    | ubuntu 18.04 LTS amd64 (release) (20190918) | x86_64 | CONTAINER       | 177.98MB | Sep 18, 2019 at 12:00am (UTC) |
+-------------+--------------+--------+---------------------------------------------+--------+-----------------+----------+-------------------------------+
|             | be760b6a51a0 | yes    | ubuntu 18.04 LTS amd64 (release) (20190918) | x86_64 | CONTAINER       | 141.19MB | Sep 18, 2019 at 12:00am (UTC) |
+-------------+--------------+--------+---------------------------------------------+--------+-----------------+----------+-------------------------------+

In the example above, we can see 3 versions of the same image, the first being a qcow2 virtual machine image, the second being a squashfs container image and the third being a tar.xz container image.

VM images can be copied to a local LXD server:

stgraber@castiana:~$ lxc image copy ubuntu:b local: --vm --alias b-vm
Image copied successfully!                   
stgraber@castiana:~$ lxc image list
+-------+--------------+--------+---------------------------------------------+--------+-----------------+----------+-----------------------------+
| ALIAS | FINGERPRINT  | PUBLIC |                 DESCRIPTION                 |  ARCH  |      TYPE       |   SIZE   |         UPLOAD DATE         |
+-------+--------------+--------+---------------------------------------------+--------+-----------------+----------+-----------------------------+
| b-vm  | 8d1e0577b1d1 | no     | ubuntu 18.04 LTS amd64 (release) (20190918) | x86_64 | VIRTUAL-MACHINE | 328.25MB | Oct 2, 2019 at 8:22pm (UTC) |
+-------+--------------+--------+---------------------------------------------+--------+-----------------+----------+-----------------------------+
|       | 0c3ce5efa22e | no     | Ubuntu bionic amd64 (20191002_07:42)        | x86_64 | CONTAINER       | 93.79MB  | Oct 2, 2019 at 5:51pm (UTC) |
+-------+--------------+--------+---------------------------------------------+--------+-----------------+----------+-----------------------------+

Note that while all of this works already, without LXD being able to run virtual machines, we don't expect this to be particularly useful to anyone at this point.

Extended disk resources information

The storage section of our /1.0/resources API was extended to provide more information on a variety of disks, this now includes:

  • Firmware version
  • Device path
  • Serial number
  • RPM
  • A more detailed type, including detection of cdrom drives

Example output on a system with a variety of drives:

root@lantea:~# lxc query /1.0/resources | jq .storage
{
  "disks": [
    {
      "block_size": 512,
      "device": "8:0",
      "device_path": "pci-0000:05:00.0-sas-phy0-lun-0",
      "firmware_version": "05.00K05",
      "id": "sda",
      "model": "WDC WD1001FALS-0",
      "numa_node": 0,
      "partitions": [],
      "read_only": false,
      "removable": false,
      "rpm": 7200,
      "serial": "WD-WMATV0861474",
      "size": 1000204886016,
      "type": "sata"
    },
    {
      "block_size": 512,
      "device": "8:16",
      "device_path": "pci-0000:05:00.0-sas-phy1-lun-0",
      "firmware_version": "05.00K05",
      "id": "sdb",
      "model": "WDC WD1001FALS-0",
      "numa_node": 0,
      "partitions": [],
      "read_only": false,
      "removable": false,
      "rpm": 7200,
      "serial": "WD-WMATV0724608",
      "size": 1000204886016,
      "type": "sata"
    },
    {
      "block_size": 512,
      "device": "8:32",
      "device_path": "pci-0000:05:00.0-sas-phy2-lun-0",
      "firmware_version": "CC45",
      "id": "sdc",
      "model": "ST33000651AS",
      "numa_node": 0,
      "partitions": [],
      "read_only": false,
      "removable": false,
      "rpm": 7200,
      "serial": "Z2912RXB",
      "size": 3000592982016,
      "type": "sata"
    },
    {
      "block_size": 4096,
      "device": "8:48",
      "device_path": "pci-0000:05:00.0-sas-phy3-lun-0",
      "firmware_version": "CC27",
      "id": "sdd",
      "model": "ST3000DM001-1CH1",
      "numa_node": 0,
      "partitions": [],
      "read_only": false,
      "removable": false,
      "rpm": 7200,
      "serial": "W1F46QP2",
      "size": 3000592982016,
      "type": "sata"
    },
    {
      "block_size": 512,
      "device": "8:64",
      "device_path": "pci-0000:00:1f.2-ata-1",
      "firmware_version": "EXT0CB6Q",
      "id": "sde",
      "model": "Samsung SSD 840",
      "numa_node": 0,
      "partitions": [],
      "read_only": false,
      "removable": false,
      "rpm": 0,
      "serial": "S1D5NSCF560605W",
      "size": 120034123776,
      "type": "sata"
    },
    {
      "block_size": 512,
      "device": "8:80",
      "device_path": "pci-0000:00:1f.2-ata-2",
      "firmware_version": "300i",
      "id": "sdf",
      "model": "INTEL SSDSC2CT12",
      "numa_node": 0,
      "partitions": [
        {
          "device": "8:81",
          "id": "sdf1",
          "partition": 1,
          "read_only": false,
          "size": 120033058304
        }
      ],
      "read_only": false,
      "removable": false,
      "rpm": 0,
      "serial": "CVMP213200L8120BGN",
      "size": 120034123776,
      "type": "sata"
    },
    {
      "block_size": 0,
      "device": "11:0",
      "device_path": "pci-0000:00:1f.2-ata-3",
      "firmware_version": "C108",
      "id": "sr0",
      "model": "DVD+-RW GSA-H73N",
      "numa_node": 0,
      "partitions": [],
      "read_only": false,
      "removable": true,
      "rpm": 0,
      "size": 1073741312,
      "type": "cdrom"
    }
  ],
  "total": 8
}

Modification of image expiry date

Thanks to a contribution from students at the University of Texas in Austin, it is now possible to edit the expiry of an image in the LXD image store.

This can