qemu-img can convert many formats.
The example above converts a raw windows2019.img file from QEMU to a Virtualbox .vdi
qemu-img convert -f raw -O vdi windows2019.img windows2019.vdi
-f raw = this means the format of the source image (instead of raw it could be vdi, vmdi, qcow2 etc..)
-O vdi = the output format that you are converting to (instead of vdi it could be vmdk or qcow2)
windows2019.img = the source file
windows2019.vdi = the output file (you should give it the extension of the format you converted to
qemu-img convert -f vdi -O qcow2 WindowsXP-PasswordDemo.vdi XP-geekstest2022.qcow2
qemu, img, convert, formats, vdi, vmdk, qcow, format, vmdi, etc, output, converting, extension, converted,