-
Notifications
You must be signed in to change notification settings - Fork 566
Add virtio-fs support #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
8613e78 to
c87abcb
Compare
rbradford
left 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.
Not far off..I see the need to split up the commandline stuff.
eeaa603 to
8078b3f
Compare
|
@sboeuf Why don't you work based on vhost crate directly? Some differences there. If this work will be sent to upstream finally, I think change is needed, right? |
|
@bjzhjing yes I need to rebase on top of vhost crate. The reason why I did this first was because I had a POC based off of vhost_user_rs crate and it was simpler to port. Also another reason is that vhost crate is not ready yet. |
8078b3f to
ec4293e
Compare
|
PR updated:
|
fb0bbc7 to
67c651f
Compare
|
Updated on latest rust-vmm/vhost#2 |
67c651f to
cbcf835
Compare
cbcf835 to
b0b422d
Compare
|
@rbradford @sameo @chao-p |
621db21 to
9a86e98
Compare
|
@sboeuf Are we waiting for a rust-vmm vm-memory PR to be merged here? |
|
@sameo Yes we're waiting on rust-vmm/vm-memory#29. Maybe you can have a look at rust-vmm/vm-memory#29 if you have some spare time. |
Remove legacy code coming from Firecracker and/or Crosvm. Signed-off-by: Sebastien Boeuf <[email protected]>
In order to avoid cloud-hypervisor to rely on a pending PR for the empty crate "vhost", this commit temporarily copies the content of the crate based on branch jiangliu/v1 18b5081d9199c76eca49da1971c9d1a65e53e5ff. Signed-off-by: Sebastien Boeuf <[email protected]>
The vhost-user-fs or virtio-fs device allows files and directories to be shared between host and guest. This patch adds the implementation of this device to the cloud-hypervisor device model. Signed-off-by: Sebastien Boeuf <[email protected]>
The user can now share some files and directories with the guest by providing the corresponding vhost-user socket. The virtiofsd daemon should be started by the user before to start the VM. Signed-off-by: Sebastien Boeuf <[email protected]>
In the context of vhost-user, we need the guest RAM to be backed by a file in order to be accessed by an external process. This patch adds the new flag "file=" to the "--memory" option so that we can specify from the command line if the memory needs to be backed, and by which specific file. Signed-off-by: Sebastien Boeuf <[email protected]>
This commit introduces the testing of the --fs option based on the virtio-fs implementation. This does not simply add a test, but also updates the integration script by generating a new kernel embedding the virtio-fs patches and by downloading the virtiofsd daemon. Signed-off-by: Sebastien Boeuf <[email protected]>
9a86e98 to
e9c48fc
Compare
|
@sameo @chao-p This PR is updated and ready now that rust-vmm/vm-memory#29 has been merged :) |
sameo
left 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.
The PR looks good. 2 things I'd like to see improved:
- Can we support multiple
--fsfrom the command line? - Could you please add a short
docs/fs.mddocument describing how to use that feature?
vmm/src/config.rs
Outdated
| pub rng: RngConfig<'a>, | ||
| pub net: Option<NetConfig<'a>>, | ||
| pub rng: RngConfig<'a>, | ||
| pub fs: Option<FsConfig<'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.
I think it would make sense to support multiple shared directories, so we should have a vector of FsConfig here if possible.
|
@sameo yes let me address your comments and I'll repush asap. |
Until now, the VMM was only accepting a single instance of a virtio-fs device. This commit extend the virtio-fs support by allowing several devices to be created for a single VM. Signed-off-by: Sebastien Boeuf <[email protected]>
Add some documentation specific to virtio-fs and how to perform filesystem sharing between host and guest with cloud-hypervisor. Signed-off-by: Sebastien Boeuf <[email protected]>
|
@sameo PR updated! |
In order to support filesystem sharing between host and guest, this pull request introduces the support for
vhost-user-fs(also known asvirtio-fs) to its device model.Fixes #9