From 9615c8bc9cc382a04c11740887888e29cf0fb062 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Wed, 2 Mar 2022 12:08:07 +0100 Subject: [PATCH 1/2] config: fc: Don't expose disable_block_device_use MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Relying on virtio-block is the *only* way to use Firecracker with Kata Containers, as shared FS (virtio-{fs,fs-nydus,9p}) is not supported by Firecracker. As configuration doesn't make sense to be exposed, we hardcode the `false` value in the Firecracker configuration structure. Fixes: #3813 Signed-off-by: Fabiano FidĂȘncio --- src/runtime/config/configuration-fc.toml.in | 8 -------- src/runtime/pkg/katautils/config.go | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/src/runtime/config/configuration-fc.toml.in b/src/runtime/config/configuration-fc.toml.in index d9eb093c2d..e23d32bf89 100644 --- a/src/runtime/config/configuration-fc.toml.in +++ b/src/runtime/config/configuration-fc.toml.in @@ -103,14 +103,6 @@ default_memory = @DEFMEMSZ@ # Default 0 #memory_offset = 0 -# Disable block device from being used for a container's rootfs. -# In case of a storage driver like devicemapper where a container's -# root file system is backed by a block device, the block device is passed -# directly to the hypervisor for performance reasons. -# This flag prevents the block device from being passed to the hypervisor, -# 9pfs is used instead to pass the rootfs. -disable_block_device_use = @DEFDISABLEBLOCK@ - # Block storage driver to be used for the hypervisor in case the container # rootfs is backed by a block device. This is virtio-scsi, virtio-blk # or nvdimm. diff --git a/src/runtime/pkg/katautils/config.go b/src/runtime/pkg/katautils/config.go index 1a4d3e1c6f..0b56fa9779 100644 --- a/src/runtime/pkg/katautils/config.go +++ b/src/runtime/pkg/katautils/config.go @@ -568,7 +568,7 @@ func newFirecrackerHypervisorConfig(h hypervisor) (vc.HypervisorConfig, error) { EntropySource: h.GetEntropySource(), EntropySourceList: h.EntropySourceList, DefaultBridges: h.defaultBridges(), - DisableBlockDeviceUse: h.DisableBlockDeviceUse, + DisableBlockDeviceUse: false, // shared fs is not supported in Firecracker, HugePages: h.HugePages, Debug: h.Debug, DisableNestingChecks: h.DisableNestingChecks, From fa8b93927cc48910f458191c38469a7ab78e1d82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Wed, 2 Mar 2022 11:08:30 +0100 Subject: [PATCH 2/2] config: qemu: Fix disable_block_device_use comments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit virtio-fs, instead of virtio-9p, is the default shared file system type in case virtio-blk is not used. Fixes: #3813 Signed-off-by: Fabiano FidĂȘncio --- src/runtime/config/configuration-qemu.toml.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/config/configuration-qemu.toml.in b/src/runtime/config/configuration-qemu.toml.in index af5c583647..153c5f1bf4 100644 --- a/src/runtime/config/configuration-qemu.toml.in +++ b/src/runtime/config/configuration-qemu.toml.in @@ -144,7 +144,7 @@ default_memory = @DEFMEMSZ@ # root file system is backed by a block device, the block device is passed # directly to the hypervisor for performance reasons. # This flag prevents the block device from being passed to the hypervisor, -# 9pfs is used instead to pass the rootfs. +# virtio-fs is used instead to pass the rootfs. disable_block_device_use = @DEFDISABLEBLOCK@ # Shared file system type: