VMware Cloud Community
Harj1234
Contributor
Contributor

vra8.5 add workloads to DNS

has anyone tried importing python script as a zip file into abx? I have followed this https://docs.vmware.com/en/vRealize-Orchestrator/8.4/com.vmware.vrealize.orchestrato[…]ient-guide.do... to create a DNS script and import it to vRA but when the action runs it says ModuleNotFoundError: No module named 'winrm'.The root folder has a lib folder with the pywinrm module installed. I have attached the zipped folder that I imported to vRA for anyone to have a look.

0 Kudos
4 Replies
johnbowdre
Enthusiast
Enthusiast

Hmm, the lib folder in your .zip looks empty to me. So that may be a part of it?

I ran into a bunch of hurdles trying to automatically create records on a Windows DNS server from vRA/vRO, though I'll confess I didn't try doing it with a Python ABX script like you are. 

I wound up configuring a Windows SSH host, connecting to that from vRO, and then running the Create-DnsServerResourceRecordA RSAT cmdlet.

I posted details of my setup here in case that might help you at all:
https://virtuallypotato.com/creating-static-records-in-microsoft-dns-from-vrealize-automation

0 Kudos
Harj1234
Contributor
Contributor

Thanks for having a look. not sure what happened to that file but I have recreated a new one and tried to create a new action by importing the new zip file but same result. I am attaching the new zip file to this post again

0 Kudos
emacintosh
Hot Shot
Hot Shot

I could be missing something here, but that article seems to be related to Orchestrator, not ABX?  Maybe this document and its link for creating a package to import is more suited for ABX?

How do I create extensibility actions (vmware.com)

johnbowdre
Enthusiast
Enthusiast

@emacintosh Good catch!

Rebuilding the package with these instructions (particularly using pip `install -r requirements.txt --target=.` to install the `pywinrm` package and its dependencies in the root level of the project folder) seems to have helped avoid the problem with the missing module. I'll have to do some reconfiguration to get my stuff to work with @Harj1234's python script but this seems like a much more elegant approach than my own.