Salt-cloud - VMWARE Template Library

170 views
Skip to first unread message

serakhi amine

unread,
Jun 12, 2019, 12:14:58 PM6/12/19
to salt-...@googlegroups.com
Hello community,

I am facing issues with configuring VMWARE provider for Salt-cloud, the problem is with some templates that are not viewables by salt-cloud.

The concerned templates are stored within the "Template library" of vcenter.

Thanks for your help.
Amine
--
Amine SERAKHI  | Ingénieur d'état en Systèmes d'Information,

Ecole Nationale Supérieure d'Informatique et d'Analyse des Systèmes(ENSIAS),

serakhi amine

unread,
Jun 12, 2019, 4:51:37 PM6/12/19
to salt-...@googlegroups.com
Hello team,

Some help please

David Boucha

unread,
Jun 13, 2019, 7:16:10 PM6/13/19
to salt users list
Hi there.

Can you provide sanitized copies of your salt configs and your salt-cloud configs?  That would help us know how to help you.

Thanks!

--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/salt-users/CAGMeZaeW%3DNdv_G8S8_g34p8%3DyvDYA-P6BV%3DUGay01xsSdBJ1iQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

serakhi amine

unread,
Jun 14, 2019, 4:07:04 AM6/14/19
to salt-...@googlegroups.com
Hello and thank you for your response,

please find below the steps of what i did:

1. I edited /etc/salt/cloud.providers.d/vmware.conf 
my-vmware-config:
  driver: vmware
  user: 'user'
  password: 'verybadpass'
  url: 'xx.xx.xx.xx'

2. I run salt-cloud --list-images my-vmware-config.
I see some images/VMWARe Templates (these templates are not within the VMWARE CONTENT LIBRARY)

The problem is that is "salt-cloud --list-image my-vmware-config" doesn't list  templates within the CONTENT LIBRARY "https://docs.vmware.com/en/VMware-vSphere/6.7/com.vmware.vsphere.vm_admin.doc/GUID-F7BF0E6B-7C4F-4E46-8BBF-76229AEA7220.html"

Thank you very much.




For more options, visit https://groups.google.com/d/optout.

serakhi amine

unread,
Jun 17, 2019, 7:03:56 AM6/17/19
to salt-...@googlegroups.com
Hello

Some Help please :)

David Fidler

unread,
Jun 17, 2019, 8:37:19 AM6/17/19
to salt-...@googlegroups.com, serakhi amine

Hi Amine,

There are two things I would check.  First, are there any extra permissions required for a service user to see templates in the Content Library (https://docs.vmware.com/en/VMware-vSphere/6.0/com.vmware.vsphere.security.doc/GUID-D490C499-8D68-42A1-AEB2-781F1DDA8A93.html).  If the service user that you're using in your salt-cloud driver has the correct permissions then check to see if *any* templates from any of your content libraries are showing up.

If you've set the correct permissions and you still don't see any templates from any of your content libraries then it's likely that the API calls that the salt-cloud vmware driver uses to query for the available images doesn't see the templates in the content library (I don't have access to a VMWare instance so I'm not able to actually see what those calls would return).

If you've confirmed the permissions and confirmed that no templates are visible from any content libraries that you've created, then it's best to raise an issue in github (https://github.com/saltstack/salt/issues) and describe the problem there. 

Cheers,
Dave.

serakhi amine

unread,
Jun 17, 2019, 12:15:00 PM6/17/19
to David Fidler, salt-...@googlegroups.com
Hello and thank you david for your response,

I checked the permissions everything is okay. I guess the problem is with the extension of the template: in fact, when a VM is converted to a model "template within the content library", the result is an OVF file.
Vcenter: 6.7 update 1

Best regards.
Amine

serakhi amine

unread,
Jun 19, 2019, 3:16:23 PM6/19/19
to David Fidler, salt-...@googlegroups.com
Hello
Any help please

David Fidler

unread,
Jun 19, 2019, 4:30:29 PM6/19/19
to serakhi amine, salt-...@googlegroups.com

Hi Amine,

As I mentioned before, the best way to have this looked at is to raise an issue in github (https://github.com/saltstack/salt/issues).  The other option is, if you have a support contract with SaltStack, you can raise the issue with SaltStack's support team and have their support teams look at it.

From what I can see from the code, the "avail_images" method queries vcenter for a list of vms and checks for the "config.tempate" property for each record that's returned and it builds the list that way.

I'm not a vmware expert (and I don't have access to a vmware instance to check) but my guess is that the templates in the content library are not being returned as part of that query - but that is solely based on the fact that you've said that you have double-checked permissions on the content libraries for your service account, and that you aren't seeing any templates from the content library when you run --list-images.

Cheers,
Dave.
-- 
David Fidler
Lead Solution Architect, EMEA
SaltStack
email: dfi...@saltstack.com
mobile: +44 7815505120 
https://saltstack.com
Reply all
Reply to author
Forward
0 new messages