Hi Derek, thanks a lot for all your ideas. fai-diskimage was written as a wrapper script for several reasons. First I tried to implement it as a new action like 'fai install' but I had some problems with that. The wrapper script approach worked much better during the development. Second, fai-diskimage has some other options, and will get more diks image specific options in the future. Currently I do not see much disadvantages in the wrapper script approach.
> The second issue is flexibility. The fai-diskimage script doesn't really do that much: it creates and mounts an image at the beginning, then possibly converts the resulting image to QCOW2 format afterwards. If the fai command were tweaked to allow a size to be specified, then the image creation could be accomplished with a hook for the partition task (or perhaps a new diskimage task). Which flexibility is missing in the wrapper? All you can do in FAI, can also be done when calling fai-diskimage. > Whether the format conversion is needed could be inferred from whether the image filename ends in ".qcow2". The conversion to QCOW2 could be done using a hook for faiend. Yes, I also was thinking about detecting the image format on the name suffix. Maybe I will change this and remove the -C option. Do you think .raw is the right extension or is .img better? Which other formats should be supported? -- regards Thomas