[qemu] Zone 1 rootfs is nested inside Zone 0 rootfs

Aperta
#458 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
55/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
json, rust

Direzione di ricerca

Start with platform.mk, board.rs, the QEMU zone JSON files, and the virtio_blk backend to understand how disks are declared and exposed. Run a QEMU board and use lsblk to confirm the current layout and which devices are available. The work is done when QEMU attaches a separate Zone 1 disk as /dev/vdb, the zone configuration points to it, and Zone 1 receives its root filesystem through the virtio backend.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

aarch64 enhancement loongarch64 riscv64 x86_64
Problem

On the QEMU boards, Zone 1's root filesystem begins as a file inside Zone 0's ext4 image. Zone 0 boots, locates that file inside its own mounted root, and exposes it to the virtio backend. At the QEMU level there is no independent block device that belongs to Zone 1.

Why this matters

hvisor is a static-partitioning hypervisor: each zone owns the resources declared for it in the zone JSON and in board.rs. Putting one zone's disk inside another zone's filesystem breaks that model, because the second disk does not exist until Zone 0 has mounted its own root and found the file. It also forces the virtio_blk backend to operate on a file path rather than on a block device, which is what the backend is written for, and it makes the QEMU configuration harder to read: nothing at the QEMU level says "this disk is for Zone 1".

Proposed fix

Attach a second virtio disk to the VM by default. Zone 0 then sees /dev/vda as its own root and /dev/vdb as an unmounted disk that it hands to the virtio backend, and Zone 1 receives its root through that backend. The zone JSONs point img at /dev/vdb. Ownership becomes visible: one line per disk in platform.mk, one device per entry in the zone config, and lsblk inside Zone 0 shows the real layout instead of an image file buried somewhere in /root.

Lingua principale
Rust
Stelle
209
Fork
62
Merge medio
1g 21h
PR unite (30g)
20

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di syswonder/hvisor

Tutte le issue di syswonder/hvisor

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.