LXD 4.7 has been released

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 possible 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.

Restrict available uplinks for project networks

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:

Full commit list
  • 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
6 Likes

I also did a quick live demo of the new features here:
https://www.youtube.com/watch?v=gSppSGOVKj8

6 Likes

Build issues resolved, submitted to openSUSE. :smile_cat:

1 Like

If possible it would be good if you can carry https://github.com/lxc/lxd/pull/8052 as some older networks were defined with a NULL description which will prevent LXD from completing the upgrade.

This release introduced an issue in my system, now containers cannot connect to internet from within cluster. They were able to connect before this release. The cluster is using default fan networking setup.

Are there changes in 4.7 release in networking which changed something in container network setup?

1 Like

Can you give the output of lxc network show <fan network name> please and check if ipv4.nat is set.

As you may be impacted by this fix:

If its not set try running:

lxc network set <fan network name> ipv4.nat true
1 Like

Yes indeed was impacted by this fix.

ipv4.net was set to false.

by running lxc network set <fan network name> ipv4.nat true it fixed the problem.

Thanks