Some what new to the VM and Ovirt world here and need some help understanding 
terminologies and get the VM to work as per requirement. 

I have a self-hosted-engine (4.2) running on centos (7.4). The engine is in 
good health and I have deployed a test VM using below playbook successfully. It 
is currently in "up" state.


- name: oVirt Self-Hosted-Engine - Manage VMs
  hosts: hypervisor_ovirt
  gather_facts: false

  vars_files:
    # Contains encrypted `engine_password` varibale using ansible-vault
    - ovirt-secrets.yml

  vars:
    engine_url: https://engine-ovirt.dw/ovirt-engine/api
    engine_user: admin@internal
    engine_cafile: /etc/pki/ovirt-engine/ca.pem

    mytest_vm:
      cluster: Default
      memory: 64GiB
      memory_guaranteed: 1GiB
      cores: 2
      nics:
        - name: vnet0
          network: ovirtmgmt
          profile: ovirtmgmt
          interface: virtio
      wait: true
      domain: node.dev.dw
      os_type: rhel_7x64
      ssh_key: ssh-rsa AAA...LGx user01@mytestvm
      root_password: super_password
      disks:
        - size: 20GiB
          name: data
          storage_domain: hosted_storage
          interface: virtio
          bootable: true
      nics:
        - name: vnet0
          network: ovirtmgmt
          profile: ovirtmgmt
          interface: virtio

    vms:
      - name: mytest_vm
        tag: mytest_vm
        profile: "{{ mytest_vm }}"
        cloud_init:
          dns_servers:
            - 10.90.x.1
            - 10.90.x.1
          nic_boot_protocol: static
          nic_ip_address: 10.90.x.y
          nic_netmask: 255.255.255.0
          nic_gateway: 10.90.x.z
          nic_name: eth0
          nic_on_boot: true
          host_name: mytestvm.test.dw
          custom_script: |
            write_files:
             - content: |
                 Hello, world!
               path: /tmp/greeting.txt
               permissions: '0644'
          user_name: root
          root_password: super_password
        cloud_init_persist: true

  roles:
    - oVirt.vm-infra


Above playbook runs fine, but when i see summary using ovirt4.py, i do not see 
ipaddr for this test vm. 

- I do not see the ipaddr for this VM despite specifying it using cloud_init
- does the "up" status mean it has "booted" or I need to do something else to 
boot it with centos 7.4 minimal

Thank you in advance.
_______________________________________________
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/site/privacy-policy/
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/YF635QVUMPZTMVX3CMPSNUORXK527OFA/

Reply via email to