Skip to content

Instantly share code, notes, and snippets.

@startergo
Created November 27, 2024 00:20
Show Gist options
  • Save startergo/ded25f1ec97621edd4263d5b2eecc0ef to your computer and use it in GitHub Desktop.
Save startergo/ded25f1ec97621edd4263d5b2eecc0ef to your computer and use it in GitHub Desktop.
Convert folder to ISO for access in QEMU on Windows

Fast way to convert some folders on your host machine to .iso files so that you can mount them as CDs on your guest OS. This is a way of how to do it. Save code from New-ISOFile/New-ISOFile.ps1 at main · TheDotSource/New-ISOFile as New-ISOFile.ps1 on your computer. Check if the code source is safe. Open Windows command prompt under a normal user Navigate to the folder where you've saved New-ISOFile.ps1 using the command prompt. Run this command:

powershell -ExecutionPolicy Bypass -noprofile -c "& {  . .\New-ISOFile.ps1; New-ISOFile -source 'C:\Downloads\folder_you_want_to_convert_to_iso\' -destinationIso C:\folder_not_requiring_admin_priveleges_to_save_into_it\testiso.iso }"

Now, you can launch qemu so that your guest OS see that .iso file as a mounted CDROM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment