Hi,

Forgive me for my bad english.

I'm actually experiencing some problems using the vmare_guest module. I 
want to create vms on vmware using this module.
When I create a new vm, the two nic cards are not connected at boot. This 
is the first problem.
The second one is that I can't change the number of cores per vcpu and 
other specific configurations.

I tried to set custom values using customvalues:
customvalues:
      - key: "ethernet0.startConnected"
        value: true
      - key: "cpuid.coresPerSocket"
        value: 1

I have tested with ansible 2.3, 2.4 and 2.5 (from github). I can't find any 
documentation to set customvalues.
How do you do this ? Thanks.

The totally code :
- name: "Creating a VM based on template"
  vmware_guest:
    datacenter: "DC1"
    cluster: "mycluster"
    hostname: "{{ vcenter_host }}"
    username: "{{ vcenter_user }}"
    password: "{{ vcenter_password }}"
    validate_certs: no
    folder: {{ v_folder |default("/") }}
    name: "{{ v_hostname }}"
    annotation: "{{ ansible_date_time.date }} - VM creation {{ v_hostname 
}} using ansible"
    state: poweredon
    template: "{{ vmware_template }}"
    customvalues:
      - key: "vcpu.hotadd"
        values: "yes"
      - key: "mem.hotadd"
        value: "yes"
      - key: "ethernet0.startConnected"
        value: true
      - key: "cpuid.coresPerSocket"
        value: 1
    disk:
      - disk1:
        size_gb: 20
        type: "{{ v_disk_type }}"
        datastore: "mydatastore"
      - disk2:
        size_gb: "{{ v_disk_size }}"
        type: "{{ v_disk_type }}"
        datastore: "mydatastore"
    hardware:
      memory_mb: "{{ v_memory_size }}"
      num_cpus: "{{ v_cpu_number }}"
      scsi: paravirtual
    networks:
      - name: "{{ vmware_network }}"
        vlan: "{{ v_vlan_id }}"
        device_type: "e1000"
        type: "static"
        ip: "{{ v_ip }}"
        netmask: "{{ v_netmask | default('255.255.255.0') }}"
        gateway: "{{ v_gateway }}"
  register: deploy
  when: do_action == "new"
  delegate_to: localhost
  tags: createvm

-- 
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/d36efe5d-15c2-4edd-ba32-a38b2e822dbd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to