-
Notifications
You must be signed in to change notification settings - Fork 374
Add virtio-fs support (alternative to virtio-9p) #1016
Conversation
Marking as WIP/DNM to show the preview status. |
thanks @stefanha, could you please file an issue and add |
@devimc is the rationale for requiring an issue for every pull request documented somewhere? This PR is Do Not Merge and I can think of other situations where it doesn't seem useful to create issues. I'd like to understand why every PR needs to have an associated issue (even if it's just a formality/placeholder). |
Sure, will do that once there is an indication that the Linux kernel community is okay with virtio-fs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for raising @stefanha!
It would be useful if you could also update kata-env.go
to show the new config options. This helps users since the runtime can be configured from multiple files so kata-runtime kata-env
summaries the settings actually in use. For a minimal example of updating that command, see #937.
|
||
// These are only meaningful for vhost user fs devices | ||
Tag string | ||
CacheSize uint32 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Indent incorrect.
virtcontainers/qemu.go
Outdated
@@ -549,6 +551,34 @@ func (q *qemu) startSandbox() error { | |||
} | |||
}() | |||
|
|||
if q.config.VirtioFS { | |||
var cmd *exec.Cmd |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: indent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gofmt
could help
virtcontainers/qemu.go
Outdated
} | ||
id := hex.EncodeToString(randBytes) | ||
|
||
// TODO make this unique so multiple volumes can be added! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please could you raise an issue for this and then change this comment to:
// FIXME: https://github.com/kata-containers/runtime/issues/...
Aside: which reminds me, we really need to re-enable that FIXME/TODO checker... 😄
@stefanha Any updates here? |
On Tue, Dec 18, 2018 at 9:32 AM Yash D Jain ***@***.***> wrote:
@stefanha <https://github.com/stefanha> Any updates here?
Getting Kata patches merged is gated on first getting virtio-fs into Linux,
QEMU, and the VIRTIO specification. We are working on that but it will
take weeks, especially with the holiday/new year seasion.
If the Kata maintainers would like to merge the virtio-fs patches *before*
Linux, QEMU, and VIRTIO support this feature upstream, then I am happy to
work on that. Just let me know what makes sense for Kata.
The roadmap for virtio-fs is to optimize performance and to harden the file
system daemon for production (security, jailing). We are also keen on
feedback and discussion to see what should be improved for best use by Kata
Containers.
|
I guess we're still blocked on upstream. But it might be a good idea to keep this PR branch conflict free so we're ready to jump on it when the time is right? |
Hi @stefanha - could you replace the questions marks in the table below so we have some tracking information on virtio-fs support?
|
Currently the VIRTIO spec changes are being worked on. They are the dependency for everything else. |
Thanks @stefanha! |
@stefanha ping, any updates? Thx! This would be awesome to get in! |
@raravena80 Work is ongoing but the status hasn't changed. |
be9154d
to
e1546ce
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for updating @stefanha!
A few comments.
virtcontainers/qemu.go
Outdated
@@ -1230,7 +1260,36 @@ func (q *qemu) addDevice(devInfo interface{}, devType deviceType) error { | |||
|
|||
switch v := devInfo.(type) { | |||
case types.Volume: | |||
q.qemuConfig.Devices = q.arch.append9PVolume(q.qemuConfig.Devices, v) | |||
if q.config.VirtioFS { | |||
q.Logger().Info("Adding vhost-user-fs-pci volume") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you tweak this message (and the 9p one below) to use a structure format to make it more parseable - something like:
q.Logger().WithField("volume-type", "vhost-user-fs-pci").Info("adding volume")
:
q.Logger().WithField("volume-type", "virtio-9p").Info("adding volume")
@@ -92,6 +92,9 @@ const ( | |||
//VhostUserBlk represents a block vhostuser device type. | |||
VhostUserBlk DeviceDriver = "vhost-user-blk-pci" | |||
|
|||
//VhostUserFS represents a virtio-fs vhostuser device type |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please get these changes into https://github.com/intel/govmm first, and then re-vendor the changes into the runtime (see https://github.com/kata-containers/community/blob/master/VENDORING.md).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stefanha now that the change has been merged in govmm, please update the govmm version by modifying Gopkg.toml
, and run dep ensure -update
. Your commit should include all the changes implied by those actions, resulting in having:
Gopkg.toml
Gopkg.lock
vendor/github.com/intel/govmm/*
} | ||
|
||
func (device *VhostUserFSDevice) Detach(devReceiver api.DeviceReceiver) error { | ||
skip, err := device.bumpAttachCount(true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks wrong - the true
parameter is for attach only, but this is a detach method...?
pkg/katautils/config.go
Outdated
@@ -102,6 +102,11 @@ type hypervisor struct { | |||
DefaultBridges uint32 `toml:"default_bridges"` | |||
Msize9p uint32 `toml:"msize_9p"` | |||
DisableBlockDeviceUse bool `toml:"disable_block_device_use"` | |||
VirtioFS bool `toml:"enable_virtio_fs"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the review, @jodh-intel. I'll make the changes in the next revision. |
e1546ce
to
97cea12
Compare
virtcontainers/qemu.go
Outdated
} | ||
id := hex.EncodeToString(randBytes) | ||
|
||
// TODO make this unique so multiple volumes can be added! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isnt this unique since you are using a random string(id) as part of the path ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment is outdated. Multiple vhost-user-fs devices can be added but only when SharedVersions is false. I'll fix this in the next revision.
virtcontainers/qemu.go
Outdated
|
||
vhostDev := config.VhostUserDeviceAttrs{ | ||
Tag: v.MountTag, | ||
Type: config.VhostUserFS, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indent seems to be off here. @stefanha Can you format the files using gofmt
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, will fix in the next revision.
@@ -121,6 +121,9 @@ virtio_fs_cache_size = @DEFVIRTIOFSCACHESIZE@ | |||
# Metadata, data, and pathname lookup are cached in guest and never expire. | |||
virtio_fs_cache = "@DEFVIRTIOFSCACHE@" | |||
|
|||
# Use shared version metadata | |||
virtio_fs_shared_versions = @DEFVIRTIOFSSHAREDVERSIONS@ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stefanha Can you elaborate more on what this option does, pros and cons of using this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an experimental feature and it's not ready for use. I will remove it for the time being since it relies on an external daemon (ireg) that isn't managed by kata-runtime yet. Once this feature is working it will make the cache=always mode coherent across shared volumes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. I think the first step is to get virtio-fs early supported with the things that are reliable in virtio-fs for now. We can definitely add the ireg
support with a later follow up PR :)
@stefanha Can you take a look at the comments here? Although virtio-fs has not merged upstream, we are planning to add early support for virtio-fs. It would be great if you could submit a patch for VhostUserFs device to the |
The VhostUserFs device has been merged into govmm: |
@jodh-intel @devimc @grahamwhaley @jcvenegas @bergwolf @WeiZhang555 Please take a look as we're trying to move forward with the early support of virtio-fs for Kata. Think about this PR as a high prio one since we don't want to have it pending for months :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @stefanha - comments added.
|
||
defer func() { | ||
if err == nil { | ||
device.AttachCount = 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm rather confused by this: the function calls device.bumpAttachCount(true)
to increase AttachCount
and then explicitly sets AttachCount = 1
if no error. I see the same logic in reverse in Detach()
. It seems therefore that the only valid AttachCount
values are 0
and 1
but can't that be checked for rather than overriding what bumpAttachCount()
is doing?
Maybe a few comments explaining the intent would help here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jodh-intel I think I am the one to be blamed 😿
The logic is confusing as you said but it's right.
AttachCount == 0
: do real attach, and set AttachCound = 1;AttachCount==1
: AttachCount++, but skip the real attact.AttachCount==IntMax
: error
I'll create a new PR to improve the readability.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll create a new PR to improve the readability.
Great! Please open an issue for this and post the link here so that this comment does not get lost.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here it is: #1392
It's assigned to me, I'll handle it today.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR #1394 for this
virtcontainers/qemu.go
Outdated
if q.config.VirtioFSSharedVersions { | ||
args = append(args, "-o", "shared") | ||
} | ||
args = append(args, "/") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Q. why /
? are you given access to the whole rootfs? can you please add a comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is removed in the next revision of this PR. The "/" was a dummy argument that has now been removed from virtiofsd. The shared directory is specified by the virtiofsd -o source path/to/dir
option.
Overall it looks good to me, nice work 😄 PR needs rebase, and I met some problem when test the PR locally, the filesystem keeps reporting "Busy" even a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @stefanha and @dagrh for this PR.
Overall LGTM, but I have a few comments. Hopefully we can merge it soon after you reworked it :)
One last comment about documentation, it would be very nice to have dedicated documentation for this new feature. And part of this documentation is to mention that it introduces a dependency on an external binary, the virtiofsd
daemon. We will package it as part of Kata packages but it'd be nice to have it written/mentioned somewhere.
@@ -97,6 +97,9 @@ default_memory = @DEFMEMSZ@ | |||
# 9pfs is used instead to pass the rootfs. | |||
disable_block_device_use = @DEFDISABLEBLOCK@ | |||
|
|||
# Use virtio-fs instead of 9p for shared filesystems. | |||
enable_virtio_fs = @DEFVIRTIOFS@ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think having a config option shared_fs
with the default value virtio-9p
would make more sense. And obviously in this case, we would need to switch it to virtio-fs
if we wanted to use it instead of 9p
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will fix in the next revision.
@@ -92,6 +92,9 @@ const ( | |||
//VhostUserBlk represents a block vhostuser device type. | |||
VhostUserBlk DeviceDriver = "vhost-user-blk-pci" | |||
|
|||
//VhostUserFS represents a virtio-fs vhostuser device type |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stefanha now that the change has been merged in govmm, please update the govmm version by modifying Gopkg.toml
, and run dep ensure -update
. Your commit should include all the changes implied by those actions, resulting in having:
Gopkg.toml
Gopkg.lock
vendor/github.com/intel/govmm/*
@@ -174,6 +177,9 @@ type VhostUserDeviceAttrs struct { | |||
|
|||
// MacAddress is only meaningful for vhost user net device | |||
MacAddress string | |||
|
|||
// These are only meaningful for vhost user fs devices |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/These are
/Tag is
/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, it's unclear from the context that additional fields are added by later patches:
// These are only meaningful for vhost user fs devices
Tag string
CacheSize uint32
Cache string
SharedVersions bool
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it!
virtcontainers/hypervisor.go
Outdated
@@ -238,6 +238,9 @@ type HypervisorConfig struct { | |||
// DisableBlockDeviceUse disallows a block device from being used. | |||
DisableBlockDeviceUse bool | |||
|
|||
// VirtioFS enables virtio-fs instead of virtio-9p | |||
VirtioFS bool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Following my other comment, I think we should define SharedFs
as a string, as this would be more generic.
|
||
defer func() { | ||
if err == nil { | ||
device.AttachCount = 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll create a new PR to improve the readability.
Great! Please open an issue for this and post the link here so that this comment does not get lost.
virtcontainers/qemu.go
Outdated
// of this child process. | ||
sourcePath := filepath.Join(kataHostSharedDir, q.id) | ||
|
||
cmd := exec.Command(q.config.VirtioFSDaemon, "-o", "virtio_socket=" + sockPath, "-o", "source=" + sourcePath, "/") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This part (spawning the virtiofsd
binary) is not QEMU specific. It can be shared across hypervisors as long as they support virtio-fs
. That's why it'd be better to have it implemented from hypervisor.go directly so that each hypervisor implementation could reuse the common code. Or, to invoke this from the generic sandbox.go
code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I looked into this but found sandbox.go and hypervisor.go don't offer convenient places to put this code. The issue is that qemu.go creats the vm directory so sandbox.go cannot launch the daemon before calling hypervisor.startSandbox(). And putting this function into hypervisor.go is awkward because it relies on paths that come from qemu.go (or another caller who has access to objects).
Let's leave it in qemu.go until there is a need to move it out for Firecracker.
Makefile
Outdated
@@ -163,6 +163,8 @@ DEFENTROPYSOURCE := /dev/urandom | |||
DEFDISABLEBLOCK := false | |||
DEFVIRTIOFS := false | |||
DEFVIRTIOFSDAEMON := | |||
# Default DAX mapping cache size in GiB |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe MiB
would be more appropriate if we don't want a too large cache region by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in the next revision.
@@ -121,6 +121,9 @@ virtio_fs_cache_size = @DEFVIRTIOFSCACHESIZE@ | |||
# Metadata, data, and pathname lookup are cached in guest and never expire. | |||
virtio_fs_cache = "@DEFVIRTIOFSCACHE@" | |||
|
|||
# Use shared version metadata | |||
virtio_fs_shared_versions = @DEFVIRTIOFSSHAREDVERSIONS@ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. I think the first step is to get virtio-fs early supported with the things that are reliable in virtio-fs for now. We can definitely add the ireg
support with a later follow up PR :)
@stefanha sorry about that! I've just removed them! |
Shortlog: b3e7a9e Merge pull request kata-containers#91 from stefanha/virtio-fs-cache-size-mb 058cda0 qemu: use MiB instead of Gib for virtio-fs cache size Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Looks like it has a rebase conflict with kata-env_test.go now. |
I'm rebasing right now and will push the resolved version. |
Add a config option to select between virtio-9p and virtiofs. This option currently has no effect and will be used in a later patch. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Add a config option for the virtio-fs vhost-user daemon path. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly looks good to me. Just two comments inline. Thanks!
virtio_fs_daemon = "@DEFVIRTIOFSDAEMON@" | ||
|
||
# Default size of DAX cache in GiB | ||
virtio_fs_cache_size = @DEFVIRTIOFSCACHESIZE@ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DEFVIRTIOFSCACHESIZE := 8192
, it is in MiB instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, thank you! Will fix in the next revision.
virtcontainers/qemu.go
Outdated
go func() { | ||
scanner := bufio.NewScanner(stderr) | ||
for scanner.Scan() { | ||
if strings.Contains(scanner.Text(), "Waiting for QEMU socket connection...") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is really hacky and may block other virtiofsd implementations. One possible fix is to check the existence of the unix socket before and after cmd.Start()
. For now, please at least add a FIXME
above so that we can revisit it later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is really hacky and may block other virtiofsd implementations. One possible fix is to check the existence of the unix socket before and after
cmd.Start()
. For now, please at least add aFIXME
above so that we can revisit it later.
Reporting readiness from a daemon is common practice. For example, systemd has the sd_notify(3) interface where we would say "READY=1".
Polling for the existence of a UNIX domain socket has disadvantages:
- A polling loop with a sleep() call adds latency. The solution I've posted immediately detects that the daemon is ready without adding latency or busy loops.
- There is a race condition between the daemon's bind(2)+listen(2) calls and QEMU's connect(2). If QEMU is launched and attempts to connect between bind(2) and listen(2) the connect(2) call will fail. This complicates things: either QEMU needs to add reconnect logic or kata-runtime needs to connect and pass the fd to QEMU, or the daemon needs to allow unexpected disconnects (from kata-runtime).
The only hacky thing I see here is the "QEMU" in the string we are checking. virtiofsd works with other hypervisors and shouldn't know about QEMU. I will change the output of virtiofsd so this string is generic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've submitting a virtiofsd merge request to remove references to QEMU from the output:
https://gitlab.com/virtio-fs/qemu/merge_requests/4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stefanha The exact virtiofsd output string becomes part of the ABI we rely on for virtiofsd readiness, -- that is the part I'm not very comfortable with. Systemd's use of sd_notify
is standard because READY=1
etc state change is explicitly documented in man(3) sd_notify so it becomes part of the sd_notify
API. If we decide to use the arbitrary string as virtiofsd readiness ABI, we need to declare it loud and clear so that any virtiofsd implementation knows it MUST print the exactly same string to stderr to announce its readiness. Right now it is hard-coded hidden in kata runtime code... To make it more acceptable, I think at least:
- It needs to be defined as a static variable
- We should document it explicitly somewhere obvious to virtiofsd implementers
OTOH, it seems that other vhost user daemons in qemu/contrib/
do not report their readiness. How do they handle the issue in practice?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anyway, I'm OK to merge the PR as is since the feature is experimental. We can address the readiness issue (if necessary) in follow up PRs. @stefanha please fix the other comment and we can kick off the tests to see how CI says about it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have pushed the latest version with GiB -> MiB fixed and QEMU -> vhost-user in the stderr message.
I will take a look at implementing sd_notify(3) in virtiofsd. That way it will also work with systemd and we won't use stderr. A separate file descriptor is passed for sd_notify(3) and that's a bit cleaner. This will come as a separate pull request.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @stefanha!
When enable_virtio_fs is true, add a vhost-user-fs-pci for the kataShared volume instead of 9p. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Use virtio-fs instead of virtio-9p when virtio-fs is enabled. Fixes: kata-containers#1542 Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Add VirtioFSCacheSize aka virtio_fs_cache_size option to set the size (in MiB) of the DAX cache. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Several cache modes are supported by virtio-fs. They affect the performance and consistency characteristics of the file system. For the time being cache="none" is recommended, but the other modes can be experimented with. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
It's useful to know whether virtio-9p or virtio-fs is being used. Add the status to the kata-env output. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
/test |
This patches adds virtio-fs capability to the kata kernel along with config changes to enable the same on kata by default. The system will only be exercised when `shared_fs` is set to `virtio-fs` in the kata configuration file. the default still remains to be 9p Fixes: kata-containers#387 Depends-on: github.com/kata-containers/runtime#1016 Signed-off-by: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
This patches adds virtio-fs capability to the kata kernel along with config changes to enable the same on kata by default. The system will only be exercised when `shared_fs` is set to `virtio-fs` in the kata configuration file. the default still remains to be 9p Fixes: kata-containers#387 Depends-on: github.com/kata-containers/runtime#1016 Signed-off-by: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
Add configuration option to use virtio-fs. We will currently use nemu for testing the virtio-fs support. Depends-on: github.com/kata-containers/runtime#1016 Depends-on: github.com/kata-containers/packaging#484 Fixes: kata-containers#1536. Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
The failed cases are unrelated. |
Add configuration option to use virtio-fs. We will currently use nemu for testing the virtio-fs support. Depends-on: github.com/kata-containers/runtime#1016 Depends-on: github.com/kata-containers/packaging#484 Fixes: kata-containers#1536. Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
@egernst 🍾 🍾 🍾 |
This patches adds virtio-fs capability to the kata kernel along with config changes to enable the same on kata by default. The system will only be exercised when `shared_fs` is set to `virtio-fs` in the kata configuration file. the default still remains to be 9p Fixes: kata-containers#387 Depends-on: github.com/kata-containers/runtime#1016 Signed-off-by: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
These patches add several configuration.toml options for the virtio-fs shared file system. For more information about virtio-fs, see https://virtio-fs.gitlab.io/.
This pull request is a preview. virtio-fs has not been merged in Linux or QEMU yet.
To use virtio-fs, set enable_virtio_fs true and set virtio_fs_daemon to the path of your passthrough_ll file system daemon (code available at https://gitlab.com/virtio-fs/libfuse). A full howto based on Kata 1.4.0 and a Fedora initramfs is here: https://virtio-fs.gitlab.io/howto-kata.html.
Tweaking the cache size, cache mode, and enabling shared version metadata is mostly for development at this point. The default settings are recommended.