Hi, Norm, I have read about that issue in the forums regarding Perl and vmware tools on RHEL/ CentOS. As far as I know, Windows does not need Perl ... ?
I read on a forum post that someone found a vDS was somehow at the root of this issue which is, of course, what I am using as the network. That gentleman switched over to a simple vswitch which seemed to alleviate this issues. You can read about it here along with a few other leads: https://github.com/ansible/ansible/issues/24506 Sure, great! I've redacted sensitive info. The content within angle brackets indicate redacted or changed content. I am trying to work with a Windows2019 template. --- # Ansible play to create a virtual vmware within a vSphere environment # Extra Variables are declared in the Ansible play but assigned in Template # Extra Vars include: "memory", "vm_name", and "template" - name: Ansible play for the creation of a virtual machine within vSphere hosts: localhost #connection: local gather_facts: no vars: cluster_name: <"My Test Cluster"> datacenter_name: <Hoth> vcenter_server: <My.Vcenter.server> datastore_name: <Hoth_datatore> tasks: - name: Create a virtual machine within a particular vSphere cluster. vmware_guest: hostname: "{{ vcenter_server }}" validate_certs: false name: "{{ vm_name }}" state: poweredon template: "{{ template }}" datacenter: "{{ datacenter_name }}" folder: /{{ datacenter_name }}/vm cluster: "{{ cluster_name }}" datastore: "{{ datastore_name }}" hardware: memory_mb: "{{ memory | int }}" num_cpus: 2 num_cpu_cores_per_socket: 2 networks: - name: <vDS network> ip: <static_ip> netmask: <mask> type: static gateway: <gateway_ip> connected: true start_connected: true dns_servers: - <dns_1 ip> wait_for_ip_address: true customization: existing_vm: true hostname: "{{ vm_name }}" dns_servers: - <dns_1 ip> - <dns_2 ip> domainadmin: "{{ admin }}" domainadminpassword: "{{ admin_pass }}" joindomain: sncorp.com # wait_for_customization: yes delegate_to: localhost I just noticed I am not using the "guest_id" param but according to the docs, I do not need this as I am deploying from a template. Thanks for taking a look, much appreciated! On Friday, May 27, 2022 at 2:45:21 AM UTC-6 [email protected] wrote: > Christopher, > > I had a similar issue with RHEL. I found that the image/template that I > was using to build my VM was missing a perl module. I’ll have to check my > notes for which module. Once I installed that module in my image template, > it worked. > > I now need to do the same and get windows VMs spun up. Would you mind > sharing your playbook? I have a test environment and I would be willing to > help troubleshoot your issue. > > Regards, > > Norm > > Sent from my iPhone > > On May 26, 2022, at 11:05 PM, Christopher Bachmeyer <[email protected]> > wrote: > > > > We're on Ansible Tower 3.8.3 and Ansible core is 2.9.x. > > I am trying to use the community.vmware collection and looking to deploy > Windows and Linux vms to vSphere. > When deploying Windows 2019 vms, the network adapter is always > disconnected. > > It seems like many are having issues with the same issue but there are few > if any solutions. > > Any suggestions? > > Thanks! > > On Wednesday, March 31, 2021 at 5:38:32 AM UTC-6 [email protected] wrote: > >> I'm using Ansible Tower 3.8.2. >> Ansible core is 2.9.15 >> >> I'm using the vmware_rest collection. >> >> I'm able to get the linux VM created from a template. And the VM does >> poweron. But when it comes up the network adapter does not. It is in >> disconnected state. >> >> My linux VM is RHEL 8.2 >> >> I see online that many folks have had this issue but I'm not seeing what >> the solution is for it. >> >> Can anyone offer any tips that may help me solve this problem? >> >> Thanks, >> >> Norm >> > -- > You received this message because you are subscribed to a topic in the > Google Groups "Ansible Project" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/ansible-project/wsdacUC7Gz4/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/37c0545e-9775-42bb-a1d6-7e48668eb123n%40googlegroups.com > > <https://groups.google.com/d/msgid/ansible-project/37c0545e-9775-42bb-a1d6-7e48668eb123n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/83802d17-e792-4308-8ddf-ed8eece46d58n%40googlegroups.com.
