Problem provisionning Host on VMWare from Image

Hello again,

I manage to solve my issue with this little hack (I’m not a developper, and I don’t know ruby so forgive me… :smile:)

In the file /usr/share/foreman/app/models/compute_resources/foreman/model/vmware.rb, inside the clone_vm function, I added those lines :

templates = client.list_templates
templates.each { |t|
if t[‘id’] == args[:image_id]
opts[‘template_path’] = t[‘name’]
end }

This way, before calling the Fog vm_clone function, it replace UUID by Template name for templates.

Regards,

Thomas.