Back to the news overview

LXD 4.3 リリースのお知らせ

1st of July 2020

はじめに

LXD チームは LXD 4.3 のリリースをお知らせできることにワクワクしています!

このリリースは、特に仮想マシンの使用における多数の改良を行っています。また、クラスターユーザー向けのかなりの数のバグ修正と一般的なパフォーマンスの改良が含まれています。

Enjoy!

新機能とハイライト

カスタムのブロックストレージボリューム

これまで、カスタムストレージボリュームはすべてファイルシステムでした。それをサポートするストレージバックエンド上のディレクトリ・サブボリューム・データセット、または他のバックエンド上のフォーマットされたブロックのいずれかでした。

LXD が仮想マシンをサポートするようになりましたので、(以前から可能であった 9p を使った)従来のボリューム上のファイルシステムを仮想マシンにアタッチできるのと同様に、追加の RAW ディスクを仮想マシンにアタッチできるようにする必要性がでてきました。

これによりブロックのカスタムストレージボリュームが使えるようになりました。

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: グラフィカルコンソールの初期作業

すべての LXD VM で virtio-gpu と virtio-input デバイスがすぐに使える状態になりました。同様にローカルの Unix ソケットに接続されている spice チャンネルも使える状態になっています。

現状、spicy のようなクライアントを使ってソケットに直接接続できます。しかし、すぐに LXD で lxc console を使った websocket 経由でリモートアクセスできるようになるでしょう。

VM: PCIe レイアウトの見直し

VM に公開している全 virtio デバイスが確実に PCIe バス上にあるようにし、スロットの数を節約するために可能な限りデバイスはファンクションにマージするようにしました。

また、ネットワークデバイスは常に同じスロットに表示され、ハードウェアベースのネーミングが有効なときは一定の名前が得られるようなロジックが導入されています。

VM: GPU パススルー

gpu タイプのデバイスを VM にアタッチし、VFIO 経由で物理 GPU を与えることができるようになりました。ホストと GPU を共有できるコンテナとは違い、VM では共有できないことに注意してください。

lxc startlxc restart での直接のコンソールアタッチ

単一のインスタンスを扱う場合、lxc startlxc restart--console オプションを指定できるようになりました。これにより、コマンドラインからすぐにコンソールにアタッチできるようになり、インスタンスのブートシーケンスを見ることができるようになります。

リソース API での Isolated CPU の表示

新たに、/1.0/resources API の全 CPU スレッドに isolated フィールドが追加されました。もし特定のスレッドが isolated な CPU と設定されている場合、このフィールドが true に設定されます。

これは通常はカーネルのコマンドラインで isolcpus= を指定してシステムを起動した場合に起こります。

すべての変更点(翻訳なし)

このリリースでのすべての変更点のリストは次のとおりです:

すべてのChangeLog を見る
  • 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 unnecessary 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

試用環境

この新しい LXD リリースは私たちの デモサービス で利用できます。

ダウンロード

このリリースの tarball は ダウンロードページ から取得できます。

ビルド済みバイナリーは次のように使えます:

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