qemu-discuss
[Top][All Lists]
Advanced

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

Re: QEMU, Windows 11, and Raspios


From: Jakob Bohm
Subject: Re: QEMU, Windows 11, and Raspios
Date: Mon, 21 Oct 2024 17:17:50 +0200

Hi list,

On 2024-10-19 14:09, G.W. Haywood wrote:
Hi there,

On Fri, 18 Oct 2024, Ignacio wrote:

I am currently using a laptop that is running Windows 11 and I have
downloaded QEMU. However, I cannot figure out how to use QEMU to emulate
Raspios. Raspios does not use a .iso, but instead a .img. I was wondering
if there is a way around this or if I am complicating this process.

There surely is a way.  The two data formats you mention are different
because they are used for different purposes.

[Snipped Long ranty description of everything but how to use the files with qemu ]
The rant got a lot of details wrong, so don't use it.

Here's the short version as I understand it:

For the .img file (if it is truly a bootable SD card image):

1. Create a Qemu copy-on-write (version 2) virtual SD card image which
uses the .img file as the base butkeeps all changes written by the
virtual RPi in the qcow2 file (this command specifies a 64G SD Card).

$ qemu-img create -f qcow2 \
 -o backing_file=rpiosNNN.img,backing_fmt=raw,lazy_refcounts=on,preallocation=metadata \
 raspiSD1.qcow2 64G

2. Pass the new sdcard raspiSD1.qcow2 as a disk to the
 qemu-system-aarch64 virtual machine emulator, also specify other
 relevant hardware such as the virtual RPi GPU, the virtual ethernet
 card, virtual keyboard/mouse etc.  Such qemu command lines can
 become quite long and thus you should put the arguments in a .BAT
 file for Windows (or .sh file for Linux etc.)

For .iso files with an OS for more normal hardware:

1. Create a blank thin provisioned virtual hard drive in qcow2 format
 (this command specifies a 0.5 TB HDD):

$ qemu-img crate -f qcow2 -o lazy_refcounts=on,preallocation=metadata \
  qemuPC1.qcow2 512G

2. Pass the new HDD qemuPC1.qcow2 as a disk to the qemu-system-x86_64
virtual machineemulator.  Pass the someosNNN.iso file as a read only
CD-ROM, also specify other hardware such as a virtual UEFI BIOS ROM,
a virtual GPU etc.  Such qemucommand lines can become quite long and
thus you should put the argumentsin a .BAT file for Windows (or .sh
file for Linux etc.).


Hint: On Windows 10 original (1507), Notepad was the obvious program
for editing .BAT files, later releases and Windows 11 may have Fouled
things Up Beyond All Repair (FUBAR).

P.S.: I am not sure if current qemu builds for Windows have a working
audio driver, a few years ago it didn't .

Enjoy

Jakob
--
Jakob Bohm, CIO, Partner, WiseMo A/S.  https://www.wisemo.com
Transformervej 29, 2860 Søborg, Denmark.  Direct +45 31 13 16 10
This public discussion message is non-binding and may contain errors.
WiseMo - Remote Service Management for PCs, Phones and Embedded




reply via email to

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