Skip to content

Commit c71c46f

Browse files
cmainasurunc-bot[bot]
authored andcommitted
feat(virtiofs): Update docs with the new support for virtiofs
Update docs to also include the option of virtiofs for sharing the container's rootfs with the guest's rootfs wherever this option is supported. PR: #288 Signed-off-by: Charalampos Mainas <cmainas@nubificus.co.uk> Reviewed-by: Anastassios Nanos <ananos@nubificus.co.uk> Reviewed-by: Georgios Ntoutsos <gntouts@nubificus.co.uk> Approved-by: Anastassios Nanos <ananos@nubificus.co.uk>
1 parent a406317 commit c71c46f

7 files changed

Lines changed: 34 additions & 20 deletions

File tree

‎README.md‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -139,13 +139,13 @@ At the moment, `urunc` is available on GNU/Linux for x86\_64 and arm64 architect
139139
In addition, the following table provides an overview of the currently
140140
supported VM/Sandbox monitors and unikernels:
141141

142-
| Unikernel | VM/Sandbox Monitor | Arch | Storage |
143-
|----------- |--------------------------- |------------- |------------------------------ |
144-
| Rumprun | Solo5-hvt, Solo5-spt | x86,aarch64 | Block/Devmapper |
145-
| Unikraft | QEMU, Firecracker | x86 | Initrd, 9pfs |
146-
| MirageOS | QEMU, Solo5-hvt, Solo5-spt | x86,aarch64 | Block/Devmapper |
147-
| Mewz | QEMU | x86 | In-memory |
148-
| Linux | QEMU, Firecracker | x86 | Initrd, Block/Devmapper, 9pfs |
142+
| Unikernel | VM/Sandbox Monitor | Arch | Storage |
143+
|----------- |--------------------------- |------------- |------------------------------ |
144+
| Rumprun | Solo5-hvt, Solo5-spt | x86,aarch64 | Block/Devmapper |
145+
| Unikraft | QEMU, Firecracker | x86 | Initrd, 9pfs |
146+
| MirageOS | QEMU, Solo5-hvt, Solo5-spt | x86,aarch64 | Block/Devmapper |
147+
| Mewz | QEMU | x86 | In-memory |
148+
| Linux | QEMU, Firecracker | x86 | Initrd, Block/Devmapper, 9pfs, Virtiofs |
149149

150150
We plan to add support for more unikernel frameworks and other platforms too.
151151
Feel free to [contact](#Contact) us for a specific unikernel framework or similar

‎docs/hypervisor-support.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ device. In addition, `urunc` can leverage [Qemu](https://www.qemu.org/)'s
5353
initrd option in order to provide the Unikernel with an initial RamFS
5454
(initramfs). However, [Qemu](https://www.qemu.org/) supports various ways to
5555
provide storage in VMs such as block devices through virtio-blk,
56-
shared-fs through 9p and virtio-fs and initramfs.
56+
shared-fs through 9pfs, virtiofs and initramfs.
5757

5858
We plan to add support for all the above options, but as previously mentioned
5959
only Initramfs is supported for the time being.

‎docs/index.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ Sandbox monitors, along with the unikernels that can run on top of them.
5959
| [Unikraft](./unikernel-support#unikraft)| [Qemu](./hypervisor-support#qemu), [Firecracker](./hypervisor-support#aws-firecracker) | x86 | Initrd, 9pfs |
6060
| [MirageOS](./unikernel-support#mirage)| [Qemu](./hypervisor-support#qemu), [Solo5-hvt](./hypervisor-support#solo5-hvt), [Solo5-spt](./hypervisor-support#solo5-spt) | x86, aarch64 | Block/Devmapper |
6161
| [Mewz](./unikernel-support#mewz)| [Qemu](./hypervisor-support#qemu) | x86 | In-memory |
62-
| [Linux](./unikernel-support#linux)| [Qemu](./hypervisor-support#qemu), [Firecracker](./hypervisor-support#aws-firecracker) | x86, aarch64 | Initrd, Block/Devmapper, 9pfs |
62+
| [Linux](./unikernel-support#linux)| [Qemu](./hypervisor-support#qemu), [Firecracker](./hypervisor-support#aws-firecracker) | x86, aarch64 | Initrd, Block/Devmapper, 9pfs, Virtiofs |
6363

6464
<!-- ## urunc and the CNCF -->
6565

‎docs/installation.md‎

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ We will be installing and setting up:
1212
- [CNI plugins](https://github.com/containernetworking/plugins)
1313
- [nerdctl](https://github.com/containerd/nerdctl)
1414
- [devmapper](https://docs.docker.com/storage/storagedriver/device-mapper-driver/) or [blockfile](https://github.com/containerd/containerd/blob/main/docs/snapshotters/blockfile.md)
15+
- [virtiofs](https://virtio-fs.gitlab.io/)
1516
- [Go [[ versions.go ]]](https://go.dev/doc/install)
1617
- [urunc](https://github.com/urunc-dev/urunc)
1718
- [solo5-{hvt|spt}](https://github.com/Solo5/solo5)
@@ -206,7 +207,6 @@ sudo ctr plugin ls | grep devmapper
206207
io.containerd.snapshotter.v1 devmapper linux/amd64 ok
207208
```
208209

209-
210210
### Option 2: Blockfile
211211
#### Using blockfile snapshotter (alternative to devmapper)
212212

@@ -289,6 +289,20 @@ sudo containerd config migrate > /etc/containerd/config.toml
289289
io.containerd.snapshotter.v1 blockfile linux/amd64 ok
290290
```
291291

292+
## Install virtiofs
293+
294+
As an alternative to 9pfs, `urunc` is able to spawn guests using virtiofs. For that
295+
purpose, we need to install virtiofsd under `/usr/libexec` where `urunc` expects to find
296+
the statically linked binary of `virtiofsd`. For easier installation, we have uploaded
297+
the respective binary in `https://s3.nbfc.io/nbfc-assets/github/urunc/bin/virtiofsd`.
298+
Therefore, the installation can easily take place with the following instructions:
299+
300+
```
301+
wget https://s3.nbfc.io/nbfc-assets/github/urunc/bin/virtiofsd
302+
chmod +x virtiofsd
303+
sudo cp virtiofsd /usr/libexec/
304+
```
305+
292306
## Install urunc
293307

294308
### Option 1: Build from source

‎docs/package/rootfs.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ rootfs. For this scenario we can use both
9393
[bunny](https://github.com/nubificus/bunny) and
9494
[bunix](https://github.com/nubificus/bunix).
9595

96-
> **NOTE**: In case the unikernel does not supports shared-fs (e.g. 9pfs), we
96+
> **NOTE**: In case the unikernel does not supports shared-fs (e.g. 9pfs/virtiofs), we
9797
> can only use block devices and for that reason we need to create the unikernel
9898
> container using devmapper as a snapshotter. In that way,`urunc` will use the
9999
> snapshot of the container's image and directly attach it to the unikernel as a

‎docs/tutorials/existing-container-linux.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ Another important aspect is preparing the root filesystem (rootfs). Since we're
9292
booting a full Linux virtual machine, a proper rootfs must be provided. There
9393
are three main ways to do this:
9494

95-
1. Using directly the rootfs of the container's image (requires devmapper or 9pfs).
95+
1. Using directly the rootfs of the container's image (requires either a block based snapshotter or 9pfs/Virtiofs).
9696
2. Creating a block image out of a container's image rootfs.
9797
3. Creating a initrd.
9898

‎docs/unikernel-support.md‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ supports [Qemu](https://www.qemu.org/) and [AWS
3535
Firecracker](https://github.com/firecracker-microvm/firecracker). In both
3636
cases, it gets network access through virtio-net. In the case of storage, to
3737
the best of our knowledge [Unikraft](https://unikraft.org/) supports two
38-
options: a) 9pFS sharing a directory between the host and the unikernel and b)
38+
options: a) 9pfs sharing a directory between the host and the unikernel and b)
3939
initrd and therefore an initial RamFS.
4040

4141
### Unikraft and `urunc`
@@ -314,13 +314,13 @@ Focusing on the single-application notion of using the
314314
both [Qemu](https://qemu.org) and
315315
[Firecracker](https://github.com/firecracker-microvm/firecracker). For network,
316316
`urunc` will make use of virtio-net either through PCI or MMIO, depending on
317-
the monitor. In the case of storage, `urunc` can use initrd, virtio-block or 9pfs. In
318-
particular, `urunc` takes advantage of the extensive filesystem support of
319-
[Linux](https://github.com/torvalds/linux) and can directly mount containerd's
320-
snapshot directly to a [Linux](https://github.com/torvalds/linux) VM. This is
321-
only possible using devmapper as a snapshotter in containerd. For more
322-
information on setting up devmapper, please take a look on our [installation
323-
guide](../installation#setup-thinpool-devmapper).
317+
the monitor. In the case of storage, `urunc` can use initrd, virtio-block ,9pfs
318+
or Virtiofs. In particular, `urunc` takes advantage of the extensive filesystem
319+
support of [Linux](https://github.com/torvalds/linux) and can directly mount
320+
containerd's snapshot directly to a [Linux](https://github.com/torvalds/linux)
321+
VM. This is only possible using devmapper as a snapshotter in containerd. For
322+
more information on setting up devmapper, please take a look on our
323+
[installation guide](../installation#setup-thinpool-devmapper).
324324

325325
For more information on packaging applications and executing them on top of
326326
[Linux](https://github.com/torvalds/linux) with `urunc` take a look at our

0 commit comments

Comments
 (0)