A 9p filesystem is supported by v86, using a virtio transport. Using
it, files can be exchanged with the guest OS, see create_file
and read_file
in starter.js
.
It can be enabled by passing the following options to V86
:
filesystem: {
basefs: "../9p/fs.json",
baseurl: "../9p/base/",
}
Here, basefs
is a json file created using
fs2json. The base url is the prefix of a url
from which the files are available. For instance, if the 9p filesystem has a
file /bin/sh
, that file must be accessible from
http://localhost/9p/base/bin/sh
. If basefs
and baseurl
are omitted, an
empty 9p filesystem is created.
The mount_tag
of the 9p device is host9p
. In order to mount it in the
guest, use:
mount -t 9p host9p /mnt/9p/
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。