Describe the bug
A 9pfs configuration in the kraft.yaml file, similar to the one below, isn't used correctly by kraft run:
volumes:
guest_fs:
driver: 9pfs
The comparison on this line fails:
if volume.driver is VolumeDriver.VOL_9PFS:
preventing the filesystem from being mounted (i.e. the runner.add_virtio_9pfs(path)) isn't called.
What worked for me was replacing the troubling line with:
if volume.driver == VolumeDriver.VOL_9PFS.name:
Mounting is successful when manually using the qemu-guest script or the qemu-system-x86_64 command. It's the kraft run command that triggers this issue.
To Reproduce
I created a repository for the issue. See the README.md for details on configuring, building and running.
Expected behavior
The 9pfs mounting of a local directory inside the KVM virtual machine should work when using kraft run.
Desktop (please complete the following information):
- OS: Ubuntu Linux 18.04
- kraft staging (version
0.5.0.dev441)
- QEMU version
2.11.1(Debian 1:2.11+dfsg-1ubuntu7.37)