8000 Qemu · howinfo/howinfo Wiki · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Lauri Ojansivu edited this page May 26, 2025 · 2 revisions

TCP/IP on Windows for Workgroups 3.11 in 2025 under QEMU

Parallels can run x86 versions of Windows or Linux on Apple Silicon

VMware Fusion and Workstation Are Now Free for All Users

Smashing the Limits: Installing Windows XP in DOSBox-X (2023)

Win11 bare metal to Qemu

Note: Qemu is available for many CPU/OS.

  1. Download SysInternals SDelete and run at Win11 cmd.exe as Administrator: sdelete -z C: . If there is more partitions, then also for those: sdelete -z D: . This will make .qcow2 disk image smaller, because free disk space is not included.
  2. Add external harddrive that has enough disk space.
  3. Start computer from Linux USB (like Linux Mint or Ubuntu)
  4. When Windows is /dev/sda (or /dev/nvme1n1 NVME disk, or mmcblk0 eMMC disk), and external disk is /dev/sdb, at terminal change to root, unmount partitions like /dev/sda1(or/dev/nvme1n1p1and/dev/nvme1n1p2NVME disk, ormmcblk0p1andmmcblk0p2 eMMC disk) , if they are mounted.
sudo su

df -h

umount /dev/sda1

umount /dev/sda2
  1. Mount /dev/sdb1 by clicling partition at it, or at Terminal:
mount /dev/sdb1 /mnt
  1. Install qemu-utils and qemu-system
apt update

apt -y install qemu-utils qemu-system
  1. Copy Windows harddrive to .qcow2 file to external disk. Sync command will write content of disk buffers to disk.
qemu-img convert -f raw -O qcow2 /dev/sda /mnt/win11.qcow2

sync

cd /mnt

nano start.sh
  1. To start.sh, copy paste this text. -m 4G is amount of RAM used for Win11, adjust it to 8G if you have 16 GB RAM or more. Win11 likes to have more RAM.
qemu-system-x86_64 -hda win11.qcow2 -cdrom win11.iso -boot c \
-smp 2 -m 4G -usbdevice tablet \
-serial stdio -netdev user,id=n0 -device rtl8139,netdev=n0
  1. Save and Exit nano: Ctrl-o Enter Ctrl-x
  2. Make start.sh executeable:
chmod +x start.sh
  1. Try to start Win11 in Qemu. With changed hardware, there could be blue screens (reboot or safe more or restoring to original configuration could help), or problems with Windows activation (try to activate, click hardware changed recently, select from list of PCs you used recently which one to activate). If activation works, make backup of that win11.qcow2 image, because sometimes activating Windows again does not work.
./start.sh
  1. After testing, unmount disks:
cd /

umount /mnt

More info at: https://github.com/howinfo/howinfo/wiki/Qemu#win11-x86_64-with-networking

More disk space to UTM Debian 12 Rosetta image

  1. softwareupdate --install-rosetta --agree-to-license
  2. With rosetta, it's possible to install amd64 software: sudo apt install wine:amd64 snapd:amd64
  3. brew install qemu
  4. Move .utm file to Documents and rename to Deb12.utm
  5. Duplicate Deb12.utm at macOS Finder, to have backup.
  6. At Debian, clean disk size to be able to make size smaller better with sudo fstrim -av (or as root dd if=/dev/zero of=/mytempfile && rm /mytempfile)
  7. cd Deb12.utm/Data
  8. Compress .img file. Change 12345.img in that command to actual filename of .img file in that directory: qemu-img convert -f raw -O qcow2 -c 12345.img deb.qcow2
  9. Add more disk space: qemu-img resize deb.qcow2 +300G
  10. Download most downloaded UPupBB .iso from https://sourceforge.net/projects/pb-gh-releases/files/NoblePup32_release/
  11. Create start.sh with this content and make it executeable with chmod +x start.sh and start it with ./start.sh to start Puppy Linux to use GParted for resizing partitions:
qemu-system-i386 -m 2G -drive if=ide,index=0,media=disk,file=deb.qcow2 \
-drive if=ide,index=2,media=cdrom,file=NoblePup32-24.04-240810.iso -boot order=d \
-serial stdio -netdev user,id=n0 -device rtl8139,netdev=n0
  1. With Menu/System/Gparted, edit /dev/sda, click Fix button, right click swap partition and swapoff, delete swap partition, enlarge linux partition to have before it 0, and after it 1001 MB. Then create primary swap partition with name and label swap. Close GParted. click sda2 drive to open it. Run terminal command blkid and copy new UUID of swap partition with text editor (at top of screen menu icons, text editor) to /dev/sda2/etc/fstab, so that correct swap partition will be mounted. Close text editor and terminal. Right click sda2 and unmount it. Shutdown Puppy Linux.
  2. Convert qcow2 image to raw, because UTM uses raw images: qemu-img convert -f qcow2 -O raw deb.qcow2 deb.raw
  3. Replace original .img with deb.raw, use ls command to see correct filename, change it to this command to replace 12345.img filename: mv deb.raw 12345.img

See what network card you have at Linux

For example, with Puppy Linux:

At terminal:

sudo lspci | more

sudo lsusb | more

And install correct network drivers, if they are not yet included.

Qemu image directly to disk

  • Install Qemu utils, that can convert qcow2, vmdk, vdi, etc
  • pv shows progress of writing image
sudo apt -y install libnbd-bin pv qemu-tools qemu-utils

Change /dev/sdb to your disk you use. Unmount partitions before writing, if some is mounted, like below:

df -h

sudo umount /dev/sdb1 /dev/sdb2

As root, write image directly from qcow2 to disk /dev/sdb . CHANGE TO CORRECT DEVICE ! This shows progress of writing with command pv.

sudo su

nbdcopy -- [ qemu-nbd -f qcow2 image.qcow2 ] - | pv > /dev/sdb 

If you like to test command progress without writing to disk, you could write to /dev/null:

nbdcopy -- [ qemu-nbd -f qcow2 image.qcow2 ] - | pv > /dev/null

Then boot from that hard disk. If it's not only hard disk, use keys like Esc, F1, F2, F8, F12 to get booted from correct disk.

From CD or DVD to .iso image

Usually CD or DVD is /dev/CDROM or /dev/sr0 .

sudo dd if=/dev/sr0 of=winxp.iso bs=20M conv=sync status=progress

sudo sync

Qemu image to RAW

sudo apt install qemu-utils

qemu-img convert -f qcow2 -O raw image.qcow2 image.raw

Raw image to disk /dev/sdb

Usually CD or DVD drive is /dev/CDROM or /dev/sr0 .

sudo dd if=image.qcow2 of=/dev/sdb bs=20M conv=sync status=progress

SW:Ubuntu Asahi Qemu

Tested on Ubuntu 23.10 Asahi on M1 Air.

Other Ubuntu Asahi install info at https://github.com/AsahiLinux/docs/wiki/SW%3AAlternative-Distros

Also installs virt-manager.

Slirp included when compiling, to have user networking: https://bugs.launchpad.net/qemu/+bug/1917161

sudo apt -y install git libglib2.0-dev libfdt-dev \
libpixman-1-dev zlib1g-dev ninja-build \
git-email libaio-dev libbluetooth-dev \
libcapstone-dev libbrlapi-dev libbz2-dev \
libcap-ng-dev libcurl4-gnutls-dev libgtk-3-dev \
libibverbs-dev libjpeg8-dev libncurses5-dev \
libnuma-dev librbd-dev librdmacm-dev \
libsasl2-dev libsdl2-dev libseccomp-dev \
libsnappy-dev libssh-dev \
libvde-dev libvdeplug-dev libvte-2.91-dev \
libxen-dev liblzo2-dev valgrind xfslibs-dev \
libnfs-dev libiscsi-dev flex bison meson \
qemu-utils virt-manager

git clone --branch master --depth 1 https://gitlab.com/qemu-project/qemu.git

cd qemu

git submodule init

git submodule update

git clone --branch master --depth 1 https://gitlab.freedesktop.org/slirp/libslirp

cd libslirp

meson build

ninja -C build install

cd ..

mkdir build

cd build

../configure --enable-slirp

make -j$(nproc)

sudo make install

Qemu GUI

https://gitlab.com/qtemu/gui

https://archhurd.org

QtEmu

Amiga C compiler workaroud

At Asahi Fedora arm64 at M1 Air happens this error, when running
Amiga C compiler with qemu-user for i386, when using https://github.com/xet7/darkesthour

$ qemu-i386 /opt/m68k-amigaos/bin/m68k-amigaos-gcc
qemu-i386: /opt/m68k-amigaos/bin/m68k-amigaos-gcc: Unable to find a guest_base
  to satisfy all guest address mapping requirements
  00000000-ffffffff

This is bug that happens at Fedora: https://gitlab.com/qemu-project/qemu/-/issues/2082

There is workaroud at .spec file:

--enable-pie

It works around the issue by making the qemu binary load address random, o the issue now happens sometimes, while it looks like it is solved.

Networking examples for various OS

https://wiki.qemu.org/Documentation/Networking

ReactOS x86 32bit with networking

https://reactos.org

wget reactos-32bit-bootcd-nightly.7z

7z x reactos-32bit-bootcd-nightly.7z

mv reactos*.iso ReactOS.iso

20G is max growable disk size here:

qemu-img create -f qcow2 ReactOS32.qcow2 20G

Here -m 3G is 3 GB RAM.

Edit start32.sh and set it executeable chmod +x start32.sh with this content:

qemu-system-i386 -m 3G -drive if=ide,index=0,media=disk,file=ReactOS32.qcow2 \
-drive if=ide,index=2,media=cdrom,file=ReactOS32.iso -boot order=d \
-serial stdio -netdev user,id=n0 -device rtl8139,netdev=n0

Then run ./start32.sh

ReactOS 64bit with networking

20G is max growable disk size here:

qemu-img create -f qcow2 ReactOS64.qcow2 20G

Here -m 3G is 3 GB RAM.

Edit start64.sh and set it executeable chmod +x start64.sh with this content:

qemu-system-x86_64 -m 3G -drive if=ide,index=0,media=disk,file=ReactOS64.qcow2 \
-drive if=ide,index=2,media=cdrom,file=ReactOS64.iso -boot order=d \
-serial stdio -netdev user,id=n0 -device rtl8139,netdev=n0
ReactOS 64bit Blender

WinXP x86 32bit with networking

  1. Create growable harddisk image of 80 GB:
qemu-img create -f qcow2 winxp.qcow2 80G
  1. Start install from winxp.iso

Edit start.sh and set it executeable chmod +x start.sh, here -m 4G is 4 GB RAM:

qemu-system-i386 -m 4G -drive if=ide,index=0,media=disk,file=winxp.qcow2 \
-drive if=ide,index=2,media=cdrom,file=winxp.iso -boot order=d \
-serial stdio -netdev user,id=n0 -device rtl8139,netdev=n0
  1. After install, boot without iso
qemu-system-i386 -m 4G -drive if=ide,index=0,media=disk,file=winxp.qcow2 \
-boot order=c \
-serial stdio -netdev user,id=n0 -device rtl8139,netdev=n0

Win10 x86_64 with networking

  1. Create growable harddisk image of 80 GB:
qemu-img create -f qcow2 win10.qcow2 80G
  1. Start install from win10.iso

Edit start.sh and set it executeable chmod +x start.sh, here -m 4G is 4 GB RAM:

qemu-system-x86_64 -m 4G -drive if=ide,index=0,media=disk,file=win10.qcow2 \
-drive if=ide,index=2,media=cdrom,file=win10.iso -boot order=d \
-serial stdio -netdev user,id=n0 -device rtl8139,netdev=n0
  1. After install, boot without iso
qemu-system-x86_64 -m 4G -drive if=ide,index=0,media=disk,file=win10.qcow2 \
-boot order=c \
-serial stdio -netdev user,id=n0 -device rtl8139,netdev=n0

Win11 x86_64 with networking

  1. Create growable harddisk image of 80 GB:
qemu-img create -f qcow2 win11.qcow2 80G
  1. Start install from win11.iso

Edit start.sh and set it executeable chmod +x start.sh, here -m 4G is 4 GB RAM, -usbdevice tablet makes using mouse more exact:

qemu-system-x86_64 -hda win11.qcow2 -cdrom win11.iso -boot d \
-smp 2 -m 4G -usbdevice tablet \
-serial stdio -netdev user,id=n0 -device rtl8139,netdev=n0
  1. When installing Win11

a) Use bypass registry keys:

https://blogs.oracle.com/virtualization/post/install-microsoft-windows-11-on-virtualbox

b) Figure out UEFI and TPM and how to activate it, not tested:

sudo apt-get install dh-autoreconf libssl-dev \
     libtasn1-6-dev pkg-config libtpms-dev \
     net-tools iproute2 libjson-glib-dev \
     libgnutls28-dev expect gawk socat \
     libseccomp-dev make -y

git clone https://github.com/stefanberger/swtpm

cd swtpm

./autogen.sh --with-openssl --prefix=/usr

make -j4

make -j4 check

sudo make install
  1. After install, boot without iso
qemu-system-x86_64 -hda win11.qcow2 -boot c \
-smp 2 -m 8G -usbdevice tablet \
-serial stdio -netdev user,id=n0 -device rtl8139,netdev=n0

Ubuntu x86_64 with networking

  1. Create growable harddisk image of 80 GB:
qemu-img create -f qcow2 ubuntu.qcow2 80G
  1. Start install from ubuntu.iso

Edit start.sh and set it executeable chmod +x start.sh, here -m 4G is 4 GB RAM:

qemu-system-x86_64 -m 4G -drive if=ide,index=0,media=disk,file=ubuntu.qcow2 \
-drive if=ide,index=2,media=cdrom,file=ubuntu.iso -boot order=d \
-serial stdio -netdev user,id=n0 -device rtl8139,netdev=n0
  1. After install, boot without iso
qemu-system-x86_64 -m 4G -drive if=ide,index=0,media=disk,file=ubuntu.qcow2 \
-boot order=c \
-serial stdio -netdev user,id=n0 -device rtl8139,netdev=n0

Haiku with networking

Check supported hardware https://dev.haiku-os.org/wiki/HardwareInfo

RI Beta 5 download: https://www.haiku-os.org/get-haiku/r1beta5/

Nightly download: https://download.haiku-os.org/nightly-images/

Haiku 64bit

Create Haiku64.qcow2 growable hard disk image of 20 GB in size:

qemu-img create -f qcow2 Haiku64.qcow2 20G

install64.sh:

qemu-system-x86_64 -cdrom haiku64.iso -vga std \
-hda Haiku64.qcow2 -smp 2 -boot d -m 4096 \
-net nic,model=rtl8139 -net user

start64.sh:

qemu-system-x86_64 -vga std \
-hda Haiku64.qcow2 -smp 2 -boot c -m 4096 \
-net nic,model=rtl8139 -net user

Haiku 32bit

Create Haiku64.qcow2 growable hard disk image of 20 GB in size:

qemu-img create -f qcow2 Haiku32.qcow2 20G

install32.sh:

qemu-system-i386 -cdrom haiku32.iso -vga std \
-hda Haiku32.qcow2 -smp 2 -boot d -m 4096 \
-net nic,model=rtl8139 -net user

start32.sh:

qemu-system-i386 -vga std \
-hda Haiku32.qcow2 -smp 2 -boot c -m 4096 \
-net nic,model=rtl8139 -net user

Haiku 64bit with KVM virt-install

OS variants: virt-install --os-variant list | grep haiku

sudo virt-install -r 4000 -n haiku32 --os-variant haikunightly \
--disk /data/VMs/Haiku64.qcow2,device=disk,format=qcow2 \
-c /data/VMs/Haiku/haiku64.iso \
--vcpus=4 --vnc --noautoconsole

Icaros 32bit with networking

Download Icaros .iso from http://vmwaros.blogspot.com

At Linux Mint or Ubuntu, you can right click mount .iso image, and read manuals from AROS Live CD / Storage / Icaros Manuals

Create icaros.qcow2 growable hard disk image of 20 GB in size:

qemu-img create -f qcow2 icaros.qcow2 20G

At installer, install all files to same Workbench partition. Do not create separate Work partition.

At GRUB style menu, select Advanced/800x600 resolution or bigger.

install32.sh:

qemu-system-i386 -m 3G -drive if=ide,index=0,media=disk,file=icaros.qcow2 \
-drive if=ide,index=2,media=cdrom,file=icaros-pc-i386.iso -boot order=d \
-serial stdio -netdev user,id=n0 -device rtl8139,netdev=n0

start32.sh:

qemu-system-i386 -m 3G -drive if=ide,index=0,media=disk,file=icaros.qcow2 \
-boot order=c \
-serial stdio -netdev user,id=n0 -device rtl8139,netdev=n0

For Internet access, click:

  1. AROS
  2. Prefs
  3. Network
  4. .device listed
  5. Edit
  6. Device dropdown menu
  7. From DEVS:networks, select rtl8139.device
  8. Save and reboot AROS from Start menu.
  9. Use OWB to browse webpages at Internet. Please wait patiently when OWB starts the first time making fonts related setup, it takes a long time. After that first time, next times OWB will start instantly.
Icaros network

Also, see Docs, click:

  1. AROS
  2. Storage
  3. Icaros Manuals

Emulating PPC64 inside Docker

https://blog.michael.kuron-germany.de/2023/06/emulating-ppc64-inside-docker/

Clone this wiki locally
0