Having trouble mounting .ISO file when using QEMU - macos

I'm running a MacBook Air M1 with Big Sur 11.4 installed
I'm trying to mount an ISO image of the Virtio-Win networking driver, using the following commands in my start.sh file.
-drive file=/Users/username/Downloads/windows-10/virtio-win-0.1.190.iso,media=cdrom,if=none,id=drivers \
-device usb-storage,drive=drivers
The drive does not show up when I run the QEMU Windows 10 ARM instance, everything else works just fine.
Are there other options for moving files or images from my host to the QEMU instance?

In my case, I need to use -cdrom and -boot d
This works for me:
-bios ./bios.fd \
-drive if=virtio,format=raw,file=./debian.qcow2,discard=on \
-cdrom ./ubuntu-21.04-live-server-arm64.iso \
-boot d

Related

Failed to install ubuntu on QEMU for macOS host

I am new to QEMU virtual machine.
I am now installing ubuntu16.04 on QEMU virtual machine for macOS catalina host by following this tutorial:
https://graspingtech.com/ubuntu-desktop-18.04-virtual-machine-macos-qemu/
However, after I command to launch QEMU with ubuntu ISO, I didn't get into the ubuntu installer.
I command:
qemu-system-x86_64 \
-m 2048 \
-vga virtio \
-show-cursor \
-usb \
-device usb-tablet \
-enable-kvm \
-cdrom /Users/my_path/QEMU/ubuntu-16.04.6-desktop-amd64.iso \
-drive file=/Users/mt_path/QEMU/ubuntu-16.04.6-live-server-amd64.qcow2,if=virtio \
-accel hvf \
-cpu host
, but I got No bootable device on QEMU
No bootalbe device
Does anyone know how to fix it?
You should also specify a boot drive when launching the vm
Running qemu-system-x86_64 --help on my machine yields this regarding the boot order:
-boot [order=drives][,once=drives][,menu=on|off]
[,splash=sp_name][,splash-time=sp_time][,reboot-timeout=rb_time][,strict=on|off]
'drives': floppy (a), hard disk (c), CD-ROM (d), network (n)
'sp_name': the file's name that would be passed to bios as logo picture, if menu=on
'sp_time': the period that splash picture last if menu=on, unit is ms
'rb_timeout': the timeout before guest reboot when boot failed, unit is ms
In your case that should be -boot c for hard disk (c).
The problem is solved.
That is because I made some dummy to the .qcow2 file.
I tried to re-make the .qcow2 and re-download the .iso, and it works.

How to fix the stuck after the command, 'bash flash.sh'

I was trying to flash the mendel-enterprise-chef-13 to the Coral EdgeTPU Development Board but got stuck after the command, "bash flash.sh."
The host computer is the MacBook Pro (2018) with macOS Mojave ver. 10 and connected with the Coral EdgeTPU Dev Board.
I have followed the instructions on the Coral Document listed at https://coral.withgoogle.com/docs/dev-board/get-started/.
The process went smooth up to without the problem untill the step 8 and 12.
mkdir -p ~/.local/bin
sudo mv ~/Downloads/platform-tools/fastboot ~/.local/bin/
pip3 install --user mendel-development-tool
and then install the CP210x USB to UART Bridge Virtual COM Port (VCP) driver for Mac.
screen /dev/cu.SLAB_USBtoUART 115200
fastboot 0
fastboot devices
1b0741d6f0609912 fastboot # I did not get this message
cd ~/Downloads
curl -O https://dl.google.com/coral/mendel/enterprise/mendel-enterprise-chef-13.zip
unzip mendel-enterprise-chef-13.zip \
&& cd mendel-enterprise-chef-13
bash flash.sh # Got stuck here.
I want to know how to fix the issues of flashing the mendel image.
this sounds like a problem with the USB-A USB-C cable, or the usb port on your host machine, have you tried a different port?

how to boot sabrelite linux image on qemu

What is the right command to boot sabrelite linux kernel on qemu.
I've linux kernel zImage and rootfs of type ext3
I'm trying to boot kernel with following command line but there is no any console output.
./qemu-system-arm -M sabrelite -m 1G -kernel zImage -smp 4 -drive file=console-image-mx6q-rootfs.ext3,format=raw,id=mycard -device sd-card,drive=mycard -append "console=ttymxc1,115200 root=/dev/mmcblk0p0 rootfstype=ext3 rw" -dtb zImage-imx6q-sabresd.dtb
QEMU : 3.0.0 version.
I had issues getting the rootfs to mount correctly on IMX6 emulated with Qemu; this Q&A on SO solved the issue:
Qemu Freescale i.MX6 DualLite SABRE : root filesystem does not mount
It did involve patching the Qemu codebase, but that was a year back; so now, using the latest ver, hopefully it works..
FYI, this is the command I used to launch it:
qemu-system-arm -m 2048 -M sabrelite -kernel <path-to-zImage> -drive file=<path-to-my-rfs.img>,format=raw,id=mysdcard -device sd-card,drive=mysdcard -append "console=ttymxc0 rootfstype=ext4 root=/dev/mmcblk0 rw rootwait init=/sbin/init" -no-reboot -nographic -dtb <path-to>/imx6dl-sabresd.dtb
HTH..

windows7 stop at "starting windows" while intalling on kvm

After updating my KVM to a newer version,I cannot install windows7 anymore.
Following is the command to install:
virt-install --name win7 --memory 8192 --vcpu sockets=1,cores=8,threads=1 \
--cdrom=/usr/local/kvm/iso/win7.iso \
--disk path=/usr/local/kvm/images/win7.img,size=100,bus=sata \
--network bridge=br0,model=virtio \
--os-type windows --os-variant win7 \
--noautoconsole --accelerate --hvm \
--graphics vnc,password=123456,listen=0.0.0.0,port=20001 \
--cpu host-passthrough --arch x86_64
I'm sure it worked earlier with the same command until I updated my server two days ago.
It is stuck here:
Click here to see pictures
some version Information:
centos7 3.10.0-327.18.2.el7.x86_64
libvirt 1.2.17
I tried to install windows10 and it's working properly.
Does anyone know about this issue?
solved!
Look here:Windows 7 Setup hangs at “Starting Windows” using Proxmox 4.2
and add this to command line:
--video cirrus
Machine Detail -> Video -> selected cirrus

Embedded Linux emulation with QEMU (on LPC313X by NXP)

I'm starting to work with Embedded Linux and I've got a LPC313x based board (Embedded Artists). I've built apex and kernel with ELDK (as suggested here: http://www.lpclinux.com/LPC313x/LPC313xGettingstartedELDK).
The kernel is built correctly (apparently no error occurs) with the default settings, and I am using a pre-made ramdisk, provided at the same link.
Now I want to use QEMU to emulate my system prior to load all the stuff in the physical board. To do that, I'm using the command:
qemu-system-arm -kernel kernel/work_2.6.28.2/arch/arm/boot/zImage -initrd ../eldk42/arm/images/ramdisk_image.gz
I cannot get it work! QEMU starts but the emulator screen remains black, nothing happens. What am I missing here?
You board is not supported by Qemu. You have to write your own Board Support Package, if you can't find one on the Internet. Try checking the kernel source tree, you might find one there.
Plus you have to know the exact internal details of your SoC and board.
Try this:
qemu-system-arm -kernel
kernel/work_2.6.28.2/arch/arm/boot/zImage
-initrd ../eldk42/arm/images/ramdisk_image.gz
-append "root=/dev/ram"
Try with -m:
qemu-system-arm -m 128 -kernel
kernel/work_2.6.28.2/arch/arm/boot/zImage
-initrd ../eldk42/arm/images/ramdisk_image.gz
-append "root=/dev/ram"
Try with -M:
qemu-system-arm -M versatilepb -m 128 -kernel
kernel/work_2.6.28.2/arch/arm/boot/zImage
-initrd ../eldk42/arm/images/ramdisk_image.gz
-append "root=/dev/ram"
You are basically making /dev/ram (which you provide with -initrd argument) as your system's root directory. You can find more information here.
You're probably interested in the linux option console=ttyS0 which you can add to -append of qemu.

Resources