On 07/10/16 13:15, Emmanuel K wrote:
Ok if I understand you right you start a virt-install command with a
kickstarter file ( equivalent of a debian preseed for Debian ).
Then you from the raw/ qcow2 disk image, imagefactory creates the extra
VM configuration like *.ovf description and upload to the target cloud.

Am I missing something ?

This is basically it, except that Image Factory does everything itself: it will install the OS based on the template file you give it, convert the image (mostly with qemu-img) and generate the additional files like metadata, for formats that require it. It also handles uploading the generated images to some cloud providers.

I could not find for instance by a quick grep at the image factory code,
where do you create the vagrant user and give the sudo rights.

Vagrant is not needed on the build machine, and I think it's not installed there. The disk image is converted to a .vmdk, a Vagrantfile and metadata.json are generated, and also .vmx files for VMware, then everything is archived in a box. Image Factory knows all the file formats, and it generates them itself. If you are interested in Vagrant boxes, take a look at the ovfcommon plugin:

https://github.com/redhat-imaging/imagefactory/blob/master/imagefactory_plugins/ovfcommon/ovfcommon.py

Another question do you run the whole build process as root ?

Yes, both the CLI and the daemon are run via sudo:

https://github.com/redhat-imaging/imagefactory/blob/master/README.markdown

Regards,
Laurențiu

Reply via email to