I do not have any templates on the engineVM, it gets ignored if not
defined.
I do not see any failure msg in the cloud-init.log file on engineVM
(attached).
But i see that i do not have any devices listed in the reported_devices
despite having nic_name defined. Hence the task Wait for IP gets skipped
Something else i need to add?
On 27 May 2018 at 09:28, Yaniv Kaul <ykaul(a)redhat.com> wrote:
On Fri, May 25, 2018 at 10:39 AM, 03CE 007 <03ce007(a)gmail.com> wrote:
> 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 -
>
> - name: "Create VM {{ current_vm.name }}"
> ovirt_vms:
> auth: "{{ ovirt_auth }}"
> name: "{{ current_vm.name }}"
> template: "{{ current_vm.profile.template | default(omit) }}"
>
Does the template contain a NIC definition?
> 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:
> * host_name: "{{ current_vm.name <
http://current_vm.name>
> }}.test.dw"*
> 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
>
I assume more than one NIC is defined for the VM?
> 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 h*ypervisor-ovirt.dw* to *mytest-vm.test.dw*
>
Can you ensure you are running with CentOS / RHEL 7.5? There was a bug in
cloud-init where it did not set the hostname due to some race. What do you
see in the cloud-init logs on the VM?
Y.
>
> 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.
>
>
>
> On 24 May 2018 at 13:43, Yaniv Kaul <ykaul(a)redhat.com> wrote:
>
>>
>>
>> On Wed, May 23, 2018 at 5:43 PM, <03ce007(a)gmail.com> wrote:
>>
>>> I have self-hosted-engine (4.2) deployed successfully on cento (7.4)
>>> server.
>>>
>>> The physical server has 'ovirt' as hostname and the self-hosted
>>> engineVM deployed
>>> and running on it has 'engine.ovirt' as fdqn.
>>>
>>> I can successfully create new VM using the oVirt.vm-infra example
>>> playbook. But what other config/var i need to add in them so that I can ssh
>>> into this new VM. Some example, tips, hints would be helpful.
>>>
>>
>> I think that you'd want (via cloud-init) to set the SSH keys for the
>> root user (or the password), etc.
>> Y.
>>
>>
>>>
>>> Thank you.
>>> _______________________________________________
>>> Users mailing list -- users(a)ovirt.org
>>> To unsubscribe send an email to users-leave(a)ovirt.org
>>>
>>
>>
>