Thank you, I am using cloud-init module as suggested, but the VM that starts on engineVM does not seem to have ip or nic assigned.
below is my ansible task -
ovirt_vms:
auth: "{{ ovirt_auth }}"
template: "{{ current_vm.profile.template | default(omit) }}"
cluster: "{{ current_vm.profile.cluster | default(omit) }}"
memory: "{{ current_vm.profile.memory | default(omit) }}"
high_availability: "{{ current_vm.profile.high_availability | default(omit) }}"
cpu_cores: "{{ current_vm.profile.cores | default(omit) }}"
cpu_sockets: "{{ current_vm.profile.sockets | default(omit) }}"
storage_domain: "{{ current_vm.profile.storage_domain | default(omit) }}"
timeout: "{{ vm_infra_create_single_timeout }}"
operating_system: rhel_7x64
memory_guaranteed: "{{ current_vm.profile.memory_guaranteed | default(omit) }}"
cloud_init:
nic_boot_protocol: static
nic_ip_address: 10.90.x.z
nic_netmask: 255.255.255.0
nic_gateway: 10.90.x.y
nic_name: eth1
nic_on_boot: true
custom_script: |
write_files:
- content: |
Hello, world!
path: /tmp/greeting.txt
permissions: '0644'
user_name: root
root_password: super_password
cloud_init_persist: true
changed_when: false
async: "{{ vm_infra_create_single_timeout }}"
poll: 0
register: added_vm
I use ovirt4.py to check the vm overview, but I see below only (shouldn't the devices dic be populated with above nic details?, nor I see the hostname updated from hypervisor-ovirt.dw to mytest-vm.test.dw
mytest-vm": {
"affinity_groups": [],
"affinity_labels": [],
"ansible_host": null,
"cluster": "Default",
"description": null,
"devices": {},
"fqdn": null,
"host": "hypervisor-ovirt.dw",
"id": "0c1f6a11-0ca2-4d2e-b05f-0d3bdc70d4af",
"name": "mytest-vm",
"os_type": "rhel_7x64",
"statistics": {
"cpu.current.guest": 0.72,
"cpu.current.hypervisor": 0.33,
"cpu.current.total": 1.1,
"memory.buffered": 0.0,
"memory.cached": 0.0,
"memory.free": 0.0,
"memory.installed": 68719476736.0,
"memory.used": 0.0,
"migration.progress": 0.0
},
"status": "up",
"tags": [],
"template": "Blank"
}
}
is anything missing in my setup, I use rhel_7x64 as operating_system.
Thank you.