lentinj / ie-vm

modern.ie VMs under KVM/QEMU
MIT License
123 stars 15 forks source link

Added more options to start.sh #9

Closed jellisii closed 7 years ago

jellisii commented 7 years ago

The VMs supplied by modern.ie are currently 32b systems. I was having issues running these with the packaged version of qemu-system-x86_64 on my distro (Ubuntu 16.04) and wanted to be able to have a flag to use qemu-system-i386. In doing so, I also added a few more options that made start.sh more flexible.

--32bqemu use qemu-system-i386

-m RAM for system in MB

--pcnet Use pcnet network adaptor.

--image imagename use imagename for qemu-system

--help/-? A (probably excessively) terse help output.

This patch does admittedly break the current "just pass an image name" on the command line. I don't know how to reconcile that.

lentinj commented 7 years ago

This patch does admittedly break the current "just pass an image name" on the command line. I don't know how to reconcile that.

Looks easy enough to achieve though, am I missing something? Insisting the image name is at the end of the options is reasonable.

http://stackoverflow.com/questions/11742996/shell-script-is-mixing-getopts-with-positional-parameters-possible

I'm not convinced it's worth having both the positional image parameter option and a --image, however if you really wanted to you could specify that --image wins over the positional parameter, which wins over the default.

jellisii commented 7 years ago

I'll have to take a closer look at the positional parameter thing before I can comment on it. Thank you for your time and consideration.