Re: FAI going to the cloud
> On Wed, 28 Sep 2016 12:22:48 -0700, Derek Poon> said: > Other common formats include VDI, VMDK, and VHD.[1] Personally, I would make it convert to any recognized extension; any other extension on the user-supplied image name (whether .raw, .img, or .whatever) would case the result not to be converted. I've added suppport for those formats to fai-diskimage. -- regards Thomas
Re: FAI going to the cloud
On Sep 27, 2016, at 8:24 PM, Thomas Langewrote: > > 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. As long as you've thought it through, that's fine. > Which flexibility is missing in the wrapper? All you can do in FAI, > can also be done when calling fai-diskimage. At the moment, one example I can think of is creating more than one disk image at once, such as an OS image and a data image. > Do you think .raw is the right extension or is .img better? Which other > formats should be supported? Other common formats include VDI, VMDK, and VHD.[1] Personally, I would make it convert to any recognized extension; any other extension on the user-supplied image name (whether .raw, .img, or .whatever) would case the result not to be converted. I can also imagine that some users might want the installation process to produce the result packaged in an OVA, in which case the output would be an entire virtual machine rather than just a disk image. In my opinion, a hook for such local requirements would be preferable to a wrapper around a wrapper around fai. [1]: https://spin.atomicobject.com/2013/06/03/ovf-virtual-machine/
Re: FAI going to the cloud
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
Re: FAI going to the cloud
On Sep 22, 2016, at 5:48 PM, Thomas Langewrote: > >> On Thu, 22 Sep 2016 17:31:54 -0700, Derek Poon >> said: > >> Instead of fai-diskimage as a separate command, have you considered making >> it a mode of the fai command itself, analogous to `fai dirinstall`? It >> would be nice to be able to write hooks for diskimage installs. > fai-diskimage is a seperate script which calls "fai install" > internally. You can write hooks for fai-diskinstall the same way as in > fai itself, because it uses the same config space as fai. I was actually trying to make two observations. The first issue is user experience consistency. We have: fai install fai sysinfo fai dirinstall /path/to/target/directory fai-diskimage -S 32G /path/to/image The last one seems conceptually similar to dirinstall. Why should it invoked differently, as "fai-diskimage" rather than "fai diskimage"? Furthermore, the fai-diskimage command is hard-coded to do the "install" action, so these choices are mutually exclusive. To me, "fai-diskimage" is closer in nature to "fai install" than to "fai-cd" or "fai-kvm", and should therefore behave similarly. 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). 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. Personally, I would prefer the configuration approach over the wrapper script, since it allows for customization better. (For example, it would be easy to add support for image formats other than QCOW2.) On top of that, there would be one fewer man page to write. I hope you will give these thoughts some consideration before making the next FAI release. Derek
Re: FAI going to the cloud
> On Thu, 22 Sep 2016 17:31:54 -0700, Derek Poon> said: > Instead of fai-diskimage as a separate command, have you considered making it a mode of the fai command itself, analogous to `fai dirinstall`? It would be nice to be able to write hooks for diskimage installs. fai-diskimage is a seperate script which calls "fai install" internally. You can write hooks for fai-diskinstall the same way as in fai itself, because it uses the same config space as fai. -- regards Thomas
Re: FAI going to the cloud
On Jul 29, 2016, at 7:27 AM, Thomas Langewrote: > > A new beta version of FAI is available. It now includes a new command > for creating cloud^Wdisk images. fai-diskimage can create a raw or > qcow2 disk image without starting a virtual machine. This image is > ready-to-boot for your VM or cloud instance. Currently it has no man > page, but a help is printed when calling with -h. > > I plan to release FAI 5.2 in september, so any feedback is welcome. > > Here's a log from a call of fai-diskimage: > > # fai-diskimage -u cloudhost -S900M > -cDEFAULT,DEBIAN,AMD64,FAIBASE,DEMO,GRUB_PC,CLOUD /tmp/disk Thomas, Instead of fai-diskimage as a separate command, have you considered making it a mode of the fai command itself, analogous to `fai dirinstall`? It would be nice to be able to write hooks for diskimage installs. Derek Poon University of British Columbia, IT Services
Re: FAI going to the cloud
On Fri, 2016-07-29 at 16:27 +0200, Thomas Lange wrote: > A new beta version of FAI is available. It now includes a new command > for creating cloud^Wdisk images. fai-diskimage can create a raw or > qcow2 disk image without starting a virtual machine. This image is > ready-to-boot for your VM or cloud instance. Currently it has no man > page, but a help is printed when calling with -h. Oh, this looks interesting. I was planning on doing something similar to how we've been using FAI to build Linux-VServers. Use a standard image, then copy up the FAI config directory and for a fai-softupdate. > I plan to release FAI 5.2 in september, so any feedback is welcome. I'll give it a whirl in the new week. Cheers, Andrew -- Andrew Ruthven, Wellington, New Zealand and...@etc.gen.nz | linux.conf.au 2016 New Zealand's only Cloud: | LCA By the Bay, Geelong, AU https://catalyst.net.nz/cloud | http://lca2016.linux.org.au