Foreman, Windows and oVirt

Is it possible to pass parameters from Foreman to oVirt when provisioning Windows based images (templates) using oVirt?
i.e: Productkey, Script to run (userdata?)
There is no much information related to Windows hosts besides provisioning from PXE.


Foreman does support passing in “seed data”, if you associate “user data” template kind with your OS and check “user data” for the particular image associated with your oVirt Compute Resource, then Foreman passes it into oVirt.

However what happens in oVirt stays in oVirt logs. Funny way to say: you need to make sure oVirt does something with the data. So far I am failing getting cloud-init to work in oVirt…

I couldn’t debug it any further, but it seems like it doesn’t pass the correct attributes to the API via Fog (i don’t think fog-ovirt support it at the moment).
It should let oVirt know this is a “sysprep” runonce and not a cloudinit, what happens is that instead of attaching the “sysprep” floppy, it attach a cdrom with the default being what was used in the template (even though it’s not attached at all).
I can see the userdata in the “comment” section in oVirt.
See here:

So fog should be aware somehow that it provision a Windows system or atleast support sysprep so Foreman can initiate it.

Unfortunately, we do not use Ruby SDK directly but via Fog library which simplifies things quite bit. You need to send some patches into this library first and then into Foreman. But it’s doable, if you detect Windows OS, then Foreman could set the required flag.