-
-
Notifications
You must be signed in to change notification settings - Fork 476
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
quickemu: Support $disk_format var for $disk_img #940
Conversation
This adds disk_format=${disk_format:-qcow2} variable that defaults to qcow2 format, so the vm.conf files can use $disk_format to specify the format of the $disk_img when this is different from the default qcow2.
Could you not use the file extension in the disk_img variable to determine the correct format? |
If not specified, detect the $disk_format of $disk_img, and set disk_format to the format detected by qemu-img info $disk_img
yep, thanks for the suggestion. Instead of guessing, I just went with asking |
Not everyone has gawk installed. I would suggest this to be more portable. It's also easier to understand ... Edit: Or, probably cleaner, |
@TuxVinyards Done!, thanks for spotting it, i just went with gawk as I saw another use of gawk in https://github.com/quickemu-project/quickemu/blob/master/quickemu#L1411 |
Two wrongs don't make a right. Line 1411 has bad use of 'cat' as well. 😵💫 |
Probably needs a PR for 1411 etc too. Should be 'grep $file | grep ...' 🤣 |
Closed via #986 |
This adds disk_format=${disk_format:-qcow2} variable that defaults to qcow2 format, so the vm.conf files can use $disk_format to specify the format of the $disk_img when this is different from the default qcow2.