How to mount ISO or USB in OpenWrt when emulating in QEMU

I need to run OpenWRT in QEMU for large scale analysis. I tried to add "-cdrom" option to qemu when start my openwrt vm and using "-usb -device usb-host" option to specify the usb mounted in my host machine. But neither work.
I read the official document "OpenWrt in QEMU" and installed iso9660 driver but it still not work.

Do I have something wrong? Thanks for your answer

what is your base os?

I choose openwrt 18.06.4 malta version, tested on Ubuntu 18.04.

iso9660 alone is likely not enough ( scsi? ), fair chance you're also missing prereq's for usb too..

1 Like

WoW Thanks! you help me a lot. I re-compiled from OpenWRT source code. When I run the command "make menuconfig" and selected some features like kmod support, especially "kmod-scsi-core", block-mount and something else.

When the compile process completed, I re-run the QEMU VM with these new generated rootfs-ext4.img and vmlinux.elf. It recognized the cdrom I mounted and mount successful.

Again, thanks for your help sincerely!

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.