-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SVM loading with VIRTIO-SND #27
Comments
I haven't tried using virtio-snd, but it seems like it should be supported with crosvm: https://chromium.googlesource.com/crosvm/crosvm/+/refs/heads/main/devices/src/virtio/snd/
We haven't started any efforts yet to add support for Gunyah in libvirt/virt-install. We have sent a couple RFCs for QEMU, although we'd have to check with Srivatsa about how functional it is with these patches: https://lore.kernel.org/all/[email protected]/ |
I was able to boot a VM with a virtual sound device via crosvm with the above steps. Can you confirm if the CONFIG_SND_VIRTIO was indeed enabled in the VM image you are using? Also, could you please provide the command you are using to launch the VM via crosvm with virtio-snd? |
When I'm trying to boot up PVM using VM Image (CONFIG_SND_VIRTIO enabled), then I can see: But within the PVM, while booting up GVM I'm using the same VM Image( which I used to boot up PVM) , then I can see: The crosvm command I'm using:
I also tried to execute:
but crosvm doesn't support --device argument
Also, can we boot up Comprehensive Linux OS in GVM? So that can play audio files (aplay tool) in GVM using aplay tools. Thanks |
/usr/gunyah/crosvm --no-syslog run --disable-sandbox --hypervisor gunyah --serial=type=stdout,hardware=virtio-console,console,stdin,num=1 --serial=type=stdout,hardware=serial,earlycon,num=1 --initrd /data/gunyah/initrd.img --hugepages --no-balloon --no-rng --protected-vm-without-firmware --swiotlb 10 --virtio-snd backend=file,playback_path=/data/gunyah,playback_size=400000 --params "rw root=/dev/ram rdinit=/sbin/init\ Can you try using this command with virtio-snd arg instead?
With limited memory, I don't think you will be able to boot a full blown linux as a secondary VM.
Best Regards! |
Thanks for your quick reply!!
Three doubts:
I don't know why --no-balloon and --virtio-snd is not supports here. Is it the crosvm version issue? For me it is crosvm 0.1.0 I followed the scripts (clone and build_crosvm.sh) to build and install crosvm. But when I tried to build and run crosvm on my host (for x86_64), --virtio-snd arg supports. I'm curious now, whether --virtio-snd arg is not supported for aarch64? Best Regards! |
FYI -- crosvm devs don't update the version, it's been 0.1.0 since 2017. We'd be compiling from a decently recent source version of crosvm. Source SHA from chromium's repo would be best point of comparison. The build_crosvm.sh in the support scripts is just enough to demo the existence of Gunyah virtual machines; you probably will want to adjust the build command to add additional features to the VMM. Notably, there's |
Hi, now host is linux and use alsa,guest is linux too,How do I configure crosvm and --virtio-snd so I can play directly in the guest side? |
Hi,The sound card information on the host is /dev/snd/pcmC0D0p.How do I configure crosvm and --virtio-snd? |
I quickly tried passing --virtio-snd playback_path=/dev/snd/pcmC0D0p,playback_size=400000 to the crosvm cmd. It seems to enumerate a Soundcard on the VM Can you try your experiment with this? |
您好,您的邮件我已经收到!谢谢!
|
Hi , 3、my guest side as below: 4、When I play music in the guest side: aplay sn.wav, there is no sound, but I play it directly in the host side is normal。 |
When I play music in the guest side: aplay sn.wav, the sound card in the host side is turned off |
Yes @eberman-quic , You was right. Because --no-default-features was used while building crosvm, audio and balloon support was disabled. Additionally, crosvm will require shared libraries: libwayland-client and libffi. To get it, did some modifications in build-rootfs-img.sh I used below command to up GVM using crosvm:
Thanks and Best Regards!! |
There could be some input parameters to CrosVM that might have to be tweaked. I am not very familiar with that. Could you please ask this directly on the CrosVM mailing list? |
Hi @chenshiqin, are you using aplay tool in PVM or in GVM? If yes, how you managed it to install it on these VMs? |
When launching the Secondary Virtual Machine (SVM) using Crosvm, I encounter the message "No soundcards found" despite having recompiled the Linux kernel (Image) with the CONFIG_SND_VIRTIO=y flag enabled. Does Crosvm lack support for VirtIO sound, or are additional backend configurations required in the Primary Virtual Machine (PVM) to enable VirtIO sound?
Instead of Crosvm, can I use Libvirt/Virt-install in the PVM to create and launch the SVM? If yes, would I need to install Libvirt/Virt-install on the PVM? Note that the PVM does not support installing packages via apt.
The text was updated successfully, but these errors were encountered: