qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Attaching 9P VirtFS to PowerNV


From: Ryan Burns
Subject: Attaching 9P VirtFS to PowerNV
Date: Tue, 2 Mar 2021 23:59:09 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0

Hi all,

I'm trying to port NixOS to run on QEMU's PowerNV platform. The system
is able to load the kernel, initrd, and a virtio-blk-pci device without
issues, but fails trying to mount the nix store from the host via -virtfs.

I noticed that unlike on other platforms, I needed to specify the PCIe
bus for the virtio-blk-pci device to appear as /dev/vda. Do I need to
do something similar for the 9P virtfs?


Here is the relevant snippet from my boot log:


/dev/vda: recovering journal
/dev/vda: clean, 231/32768 files, 10160/131072 blocks
mounting /dev/vda on /...
mounting store on /nix/.ro-store...
[    5.972587][  T170] 9pnet_virtio: no channels available for device store
[    5.972587][  T170] 9pnet_virtio: no channels available for device store
mount: mounting store on /mnt-root/nix/.ro-store failed: No such file or
directory


And here is what my generated qemu command line invocation looks like:


exec
/nix/store/r2jn54cpvmp2620f6ky8yy2dfd3lglwz-qemu-5.2.0/bin/qemu-system-ppc64
-machine powernv \
    -name nixos \
    -m 2048 \
    -smp 1 \
    -device virtio-rng-pci \
    -net nic,netdev=user.0,model=virtio -netdev
user,id=user.0${QEMU_NET_OPTS:+,$QEMU_NET_OPTS} \
    -virtfs local,path=/nix/store,security_model=none,mount_tag=store \
    -virtfs local,path=$TMPDIR/xchg,security_model=none,mount_tag=xchg \
    -virtfs
local,path=${SHARED_DIR:-$TMPDIR/xchg},security_model=none,mount_tag=shared
\
    -drive
cache=writeback,file=$NIX_DISK_IMAGE,id=drive1,if=none,index=1,werror=report
-device virtio-blk-pci,bus=pcie.0,drive=drive1 \
    -kernel
/nix/store/4mw3zzh1k4xhlysfmcgvpgx9zjz032c7-nixos-system-nixos-21.03pre-git/kernel
-initrd
/nix/store/4mw3zzh1k4xhlysfmcgvpgx9zjz032c7-nixos-system-nixos-21.03pre-git/initrd
-append "$(cat
/nix/store/4mw3zzh1k4xhlysfmcgvpgx9zjz032c7-nixos-system-nixos-21.03pre-git/kernel-params)
init=/nix/store/4mw3zzh1k4xhlysfmcgvpgx9zjz032c7-nixos-system-nixos-21.03pre-git/init
regInfo=/nix/store/dnrqa7qar8jakalrz85qn3wslq5k7fmm-closure-info-powerpc64le-unknown-linux-gnu/registration
console=ttyAMA0,115200n8 $QEMU_KERNEL_PARAMS" -nographic \



reply via email to

[Prev in Thread] Current Thread [Next in Thread]