I am running self-hosted-ovirt engine (4.2) on centos (7.4).
I am trying to deploy vanilla test vm with ipaddr and dns to check the ssh connectivity. However the ansible playbook (below snippet) runs without error but when i try to see vm status, i do not see the ipaddr hence cannot ping or ssh to new vm.
- name: Add vanilla vm
ovirt_vms:
auth: "{{ ovirt_auth }}"
name: test01
cluster: Default
state: running
memory: 2GiB
cpu_cores: 8
operating_system: rhel_7x64
high_availability: true
high_availability_priority: 50 # Available from Ansible 2.5
cloud_init:
nic_boot_protocol: static
nic_ip_address: 10.34.60.86
nic_netmask: 255.255.252.0
nic_gateway: 10.34.63.254
nic_name: eth1
nic_on_boot: true
host_name: test01.ovirt.dw
custom_script: |
write_files:
- content: |
Hello, world!
path: /tmp/greeting.txt
permissions: '0644'
user_name: root
root_password: super_password
nics:
- name: vnet0
network: ovirtmgmt
profile: ovirtmgmt
interface: virtio
Is something missing or needs to be passed on on top of these?
As per your script you are not using any template, so it's by default created from
Blank
template which don't have any OS installed. You must first create some template with OS installed and create virtual machine from that template.Also please note that IP address of the virtual machine is reported only when guest agent is installed on the virtual machine, so it's better to have it pre-installed in the template. Here you have how-to install the guest agent:
https://www.ovirt.org/documentation/how-to/guest-agent/install-the-guest-agent-in-centos/