Weekly status for the week of 16th September to 22nd September.
Introduction
In the past week, LXD received several new features and bug fixes. Highlights include improved LXD cluster recovery with automatic database backups and added support for non-interactive mode in lxd-migrate
. The LXD UI has also seen notable improvements, including the ability to create instances from uploaded files in various formats, instance and profile configuration support for all device types, and overall improvements to the user experience when editing existing configurations.
Thanks to all the contributors!
Non-interactive usage of lxd-migrate
The lxd-migrate
is a utility tool that allows you to create instances in LXD from existing physical or virtual machines. Previously, only interactive mode was supported, but now all options are configurable using CLI flags. This makes the tool also suitable for usage within scripts.
Example VM import to remote LXD server:
# Token from remote server.
token=$(lxc config trust add --name lxd-migrate --quiet)
lxd-migrate \
--server https://example.com:8443 \
--token "${token}" \
--name v1 \
--type vm \
--source "${sourcePath}" \
--non-interactive
Documentation: How to import physical or virtual machines to LXD instances - Non-interactive instance import
Automatic backup before LXD cluster recovery
The LXD cluster recovery process now includes an automatic database backup before any changes are made. The backup is a tarball of /var/snap/lxd/common/lxd/database
when LXD is installed using Snap, or /var/lib/lxd/lxd/database
otherwise. The backup file, named db_backup.<timestamp>.tar.gz
, is stored in /var/snap/lxd/common/lxd/
or /var/lib/lxd/lxd/
, based on the installation method.
To recover a database from an automated backup, unpack the tarball in the database location. For users who installed LXD via Snap, this can be done with the following commands:
cd /var/snap/lxd/common/lxd
sudo rm -r database
sudo tar -xf db_backup.<timestamp>.tar.gz
Documentation: How to recover a cluster - Automated backups
Bugfixes
-
Fixed an issue where requests originating from
/dev/lxd
caused an unnecessary warning to be displayed in LXD logs. -
Fixed an issue where VM exec output could not be recorded without waiting for websocket connections. (from Incus)
-
Fixed an issue where lxd init could fail to update an existing network device in the default profile due to a configuration mismatch. This mismatch occurred because managed and unmanaged networks were not distinguished.
-
Added a missing ETag check when updating storage buckets to prevent potential race conditions.
-
Added instance name validation in lxd-migrate to prevent continuation in interactive mode if the name is invalid.
-
Fixed an issue where VM backups could not be exported via standard output due to the inclusion of export progress data.
LXD UI
The following are the most notable contributions to the LXD UI:
-
Added support for creating an instance from uploaded files in VMDK, QCOW2, QCOW, VDI, or VHDX formats.
-
Enable the configuration of proxy devices on instances or profiles. The UI now supports configuring all device types.
-
Enhance the editing experience for instance and profile configurations by allowing users to directly edit values. Display a count of pending changes within the save button.
-
Display which images are cached when creating a new instance and selecting a base image.
All changes
The items listed below is all of the work which happened over the past week and which will be included in the next release.
LXD
- Add lxd-migrate flags for non-interactive usage
- Request: Fix request not counted warning
- Backup before cluster reconfigure
- lxd/image: Acquire image lock for uploaded images
- VM: Fix RecordOutput (from Incus)
- build(deps): bump golang.org/x/text from 0.17.0 to 0.18.0
- build(deps): bump golang.org/x/term from 0.23.0 to 0.24.0
- build(deps): bump github.com/mattn/go-sqlite3 from 1.14.22 to 1.14.23
- build(deps): bump github.com/openfga/openfga from 1.6.0 to 1.6.1
- Refactor
fsmonitor
package in preparation for Ubuntu Pro guest attachment - fsmonitor: Test unix devices with both drivers
- Minor tweak around container unix device tests
- doc/howto/container_gpu_passthrough_with_docker: use single line cmds
- Fix pool limits metadata invocation
- doc: Update command description for lxc import image
- lxd/init: Differentiate managed and unmanaged network
- Test: Check storage_buckets file integrity is preserved
- lxd: Check etag when updating storage bucket
- lxd-migrate: Prevent invalid instance names
- Doc: Clarify meaning of
restricted.networks.subnets
andipvX.routes
for OVN networks - Use agent build tags when performing dependency check
- test/suites/tls_restrictions: don’t check for broken pipe error
- lxc: Fix exporting vm backups to stdout
- Storage: Return
growFileSystem
errors - github: Enable tmpdir for TICS
LXD UI
- feat: support vmdk import for vm instance creation [WD-14587]
- feat: [WD-14770] Device inheritance simplification
- feat: [WD-14882] Adjust Listen and Connect Inputs
- Show change counts on save buttons for edit forms
- Use segmented control and icons for instance detail header actions
- Auto name instance networks
- fix(instance) adding a gpu without pci address will fall back to setting the cards drm id
- adjust other device copy to align with rest of the configuration
- fix(idp-group) deselect idp group after deletion, deselct idp group on cancel of edit panel
- Link identity and permission counts to the edit panel sections
- feat: show cached images for instance creation [WD-14414]
- Ensure cache is cleared on image upload after the alias is created
- chore(deps): update dependency @canonical/react-components to v1.2.4
- Always allow OVN network creation
- On permission select, show image names with image type (vm or container)
- chore(deps): update dependency vite to v5.4.6 [security]
- Show network parent in read and edit mode, when lxd is not clustered
- Allow root disk device to have a custom name
- chore(deps): update dependency @canonical/react-components to v1.2.5
- Show help text on instance location
LXD Charm
- Nothing to report this week
LXD Terraform provider
- Allow instance rename
- Add storage bucket resource
- docs: Move attach custom volume example to lxd_volume
PyLXD
- Nothing to report this week
Distribution work
This section is used to track the work done in downstream Linux distributions to ship the latest LXD as well as work to get various software to work properly inside containers.
Ubuntu
- Nothing to report this week.
LXD snap
- github: Align concurrency rules with lxd repo
- Update dependencies (5.0-candidate)
- Dependency updates (5.0-edge)
- lxd: Bump to pre lxd-5.0.4 (5.0-candidate)
- github: Align snap triggering process with latest-edge (5.0-edge)
- github: Align concurrent settings with latest-edge (latest-candidate)
- github: Align concurrency settings with latest-candidate (5.21-candidate)
- github: Align concurrency settings with latest-edge (5.21-edge)
- Commit pinning and version bump
- Revert: snapcraft: uefivars lost its
.py
extension - snapcraft: use non-shallow clone for nvidia-container