Closed facekapow closed 8 years ago
Nice, btw I was able to create a 128M image in MacOS, there might be some minimum size for it
Ahh, ok, I completely overlooked this as a possibility. A quick search returned a minimum limit for FAT32 of 32763 Kb (~33 Mb). I'll implement a check for minimum image size instead of limiting to Gigabytes.
I think this is pretty much done. I've added checks to make sure the commands that are going to be used are present, tested on all supported platforms, made the minimum size 33792kb (33mb) for creating images, and tested --drive
on all platforms and it works as expected. Any extra suggestions?
@facekapow not sure why but I get this error when trying to launch it without disk
--- starting qemu ---
qemu-system-x86_64: -drive file=,if=virtio,media=disk,format=raw: Device needs media, but drive is empty
There we go, should be fixed now. Empty strings weren't being ignored and the default value for the drive parameter is an empty string. Guess I forgot to test one use case, not using it at all :smile:, thanks for catching that. Also changed instanceof Array
to Array.isArray()
.
Ok to merge?
@facekapow yeah, this is awesome! 👍 sorry for the delay
Adds a
--drive
option forrun
,start
, andwatch
to allow attaching disk image files as virtio-blk devices.Also adds an
mkimg
command for creating FAT32 images to use them with runtime.js. Depends onqemu-img
on all platforms,hdiutil
anddiskutil
on macOS (builtin),losetup
andmkfs.msdos
on Linux (included on most distributions), anddiskpart
on Windows (bulitin). Probably should also add code to check whether the commands are present.Tested on: