Bug 1492096

Summary: [downstream clone - 4.1.7] [ovirt-ansible-roles] ovirt-vm-infra: cannot add network interface to VM
Product: Red Hat Enterprise Virtualization Manager Reporter: rhev-integ
Component: ovirt-ansible-rolesAssignee: Ondra Machacek <omachace>
Status: CLOSED ERRATA QA Contact: Petr Kubica <pkubica>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.1.5CC: mgoldboi, mperina, pstehlik
Target Milestone: ovirt-4.1.7Keywords: ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-ansible-roles-1.0.4-1.el7ev Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1490934 Environment:
Last Closed: 2017-11-07 17:27:31 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1490934    
Bug Blocks:    

Description rhev-integ 2017-09-15 12:50:58 UTC
+++ This bug is a downstream clone. The original bug is: +++
+++   bug 1490934 +++
======================================================================

Description of problem:
cannot add network interface to VM

  - name: Create VMs
    no_log: "{{ not debug_vm_create }}"
    ovirt_vms:
      auth: "{{ ovirt_auth }}"
      cluster: "{{ item.profile.cluster }}"
      template: "{{ item.profile.template }}"
      name: "{{ item.name }}"
      memory: "{{ item.profile.memory }}"
      cpu_cores: "{{ item.profile.cores }}"
      high_availability: "{{ item.profile.high_availability | default(omit) }}"
      cloud_init:
        host_name: "{{ item.name }}.{{ item.profile.domain | default(omit) }}"
        authorized_ssh_keys: "{{ item.profile.ssh_key | default('') }}"
        user_name: root
        root_password: "{{ item.profile.root_password | default(omit) }}"
      cloud_init_nics: "{{ item.profile.nics | default([]) }}"
    with_items:
      - "{{ vms }}"
    changed_when: false
    async: 800
    poll: 0
    register: all_vms
    tags:
      - ovirt-vm-infra

Version-Release number of selected component (if applicable):
ovirt-ansible-roles-1.0.3-1.el7ev.noarch
ansible-2.3.2.0-2.el7.noarch

(Originally by Petr Kubica)

Comment 2 Petr Kubica 2017-10-18 06:27:07 UTC
Still cannot add interface with network to VM from template

nics:
 - {name: nic1, 'network': ovirtmgmt}

will create a VM with nic1: <Empty>

Comment 3 Petr Kubica 2017-10-18 06:27:36 UTC
tested version:
ansible-2.3.2.0-2.el7.noarch
ovirt-ansible-roles-1.0.4-1.el7ev.noarch

Comment 4 Ondra Machacek 2017-10-18 06:34:05 UTC
You forgot to specify profile of the network. Please try with specifying profile.

Comment 5 Petr Kubica 2017-10-18 07:22:08 UTC
Yes, I forgot
Verified in
ansible-2.3.2.0-2.el7.noarch
ovirt-ansible-roles-1.0.4-1.el7ev.noarch

Comment 7 errata-xmlrpc 2017-11-07 17:27:31 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:3137