I was busying setting up all in one disk (which might become a spinoff of this series) the other day and did not post other chapters. In this chapter, it’s still nothing more than a few boring commands to convert VirtualBox VM to QEMU. Chapter 4 would be the biggest one IMO.
Actually this part was extracted from my journal written in April, so I could not recall everything if it was not recorded. I’d use MS-DOS 6.22 mentioned in Libvirt Chap2 as an example (as that was what I used at the time).
As usual, boring docs come first, more available in Libvirt Prologue#Doc:
- How To Use QEMU From the Linux Command-Line
- Installing MS-DOS on Qemu
- Replace VirtualBox with QEMU for my personal use
- libvirt
- Documentation
- QEMU Wiki
To convert VDI to QCOW2:
# convert VDI to raw image using `vboxmanage` command
VBoxManage clonemedium '.\MSDOS-6.22.vdi' '.\MSDOS-6.22.img' --format raw
# convert the raw image into QCOW2 using `qemu-img`
qemu-img convert -f raw '.\MSDOS-6.22.img' -O qcow2 '.\MSDOS-6.22.qcow2'
# rm middleware
rm '.\MSDOS-6.22.img'
Along with basic command to run the converted disk, adapted from MSDOS-6.22.vbox
configuration:
# Error
$ qemu-system-x86_64 -hda "MSDOS-6.22.qcow2" -m 64 -net nic,macaddr=01:22:33:DD:CC:BB -net bridge,br=Intel(R) Wi-Fi 6 AX201 160MHz -bios smbios.bin
virtmgmt.msc
C:\Program Files\qemu\qemu-system-x86_64.exe: Wi-Fi: drive with bus=0, unit=0 (index=0) exists
# Error again
$ qemu-system-x86_64 -hda "MSDOS-6.22.qcow2" -m 64 -bios smbios.bin
qemu: could not load PC BIOS 'smbios.bin'
# Running, with error
$ qemu-system-x86_64 -hda "MSDOS-6.22.qcow2" -m 64
(qemu:12416): Gtk-WARNING **: 20:01:15.017: Could not load a pixbuf from icon theme.
This may indicate that pixbuf loaders or the mime database could not be found.
# msdos-6.22.run
qemu-system-i386 -hda "MSDOS-6.22.qcow2" -m 64 -device sb16 -device adlib
Then when following Installing MS-DOS on Qemu linked above to optimize the parameters, -soundhw
throws a warning like invalid option
, from Removed features it’s removed in QEMU 7.1 and I should use -device
instead.
This is already the end… Maybe I divided the content into so many pieces? Anyway, Chapter 4 is going to be lengthy regardless.