qemu-ppc
[Top][All Lists]
Advanced

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

Re: Attaching 9P VirtFS to PowerNV


From: Murilo Opsfelder Araújo
Subject: Re: Attaching 9P VirtFS to PowerNV
Date: Wed, 03 Mar 2021 13:37:35 -0300

Hi, Ryan.

On Wednesday, March 3, 2021 4:59:09 AM -03 Ryan Burns wrote:
> 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

The message suggests that /mnt-root/nix/.ro-store does not exist at the moment
mount is called.

Are you 100% sure that the previous mkdir was successful?  Is "/" writable at
the moment mkdir was called?  Shouldn't the script check for the return code 
of
mkdir?

    https://github.com/NixOS/nixpkgs/blob/
545bafa2d49d5184714d94ea4c568316d9ce7b5c/nixos/modules/system/boot/stage-1-
init.sh#L390
    mkdir -p "/mnt-root$mountPoint"

Besides that, I'd also check if filesystem type is missing from mount 
arguments,
as per:

    https://wiki.qemu.org/Documentation/9psetup#Mounting_the_shared_path

Cheers!

> 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.03pr
> e-git/init
> regInfo=/nix/store/dnrqa7qar8jakalrz85qn3wslq5k7fmm-closure-info-powerpc64l
> e-unknown-linux-gnu/registration console=ttyAMA0,115200n8
> $QEMU_KERNEL_PARAMS" -nographic \

--
Murilo




reply via email to

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