Ovirt - host deployment fails due to engine ip on CentOS 7

This is a mirror of a question I posted on serverfault.

I’m trying to setup ovirt 4.2 on a CentOS 7.5 server. I’m using the command line tool “hosted-engine” (hosted-engine --deploy) because cockpit gave me some errors with no explanation, so I thought the command line might be more verbose (and it is).

The deployment fails with the following errors:

    [ INFO  ] TASK [Check engine VM health]
    [ ERROR ] fatal: [localhost]: FAILED! => {"attempts": 120, "changed": true, "cmd": ["hosted-engine", "--vm-status", "--json"], "delta": "0:00:00.257393", "end": "2018-09-28 16:52:49.528332", "rc": 0, "start": "2018-09-28 16:52:49.270939", "stderr": "", "stderr_lines": [], "stdout": "{\"1\": {\"conf_on_shared_storage\": true, \"live-data\": true, \"extra\": \"metadata_parse_version=1\\nmetadata_feature_version=1\\ntimestamp=7728 (Fri Sep 28 16:52:47 2018)\\nhost-id=1\\nscore=3400\\nvm_conf_refresh_time=7728 (Fri Sep 28 16:52:47 2018)\\nconf_on_shared_storage=True\\nmaintenance=False\\nstate=EngineStarting\\nstopped=False\\n\", \"hostname\": \"Odin\", \"host-id\": 1, \"engine-status\": {\"reason\": \"failed liveliness check\", \"health\": \"bad\", \"vm\": \"up\", \"detail\": \"Up\"}, \"score\": 3400, \"stopped\": false, \"maintenance\": false, \"crc32\": \"69876c6c\", \"local_conf_timestamp\": 7728, \"host-ts\": 7728}, \"global_maintenance\": false}", "stdout_lines": ["{\"1\": {\"conf_on_shared_storage\": true, \"live-data\": true, \"extra\": \"metadata_parse_version=1\\nmetadata_feature_version=1\\ntimestamp=7728 (Fri Sep 28 16:52:47 2018)\\nhost-id=1\\nscore=3400\\nvm_conf_refresh_time=7728 (Fri Sep 28 16:52:47 2018)\\nconf_on_shared_storage=True\\nmaintenance=False\\nstate=EngineStarting\\nstopped=False\\n\", \"hostname\": \"Odin\", \"host-id\": 1, \"engine-status\": {\"reason\": \"failed liveliness check\", \"health\": \"bad\", \"vm\": \"up\", \"detail\": \"Up\"}, \"score\": 3400, \"stopped\": false, \"maintenance\": false, \"crc32\": \"69876c6c\", \"local_conf_timestamp\": 7728, \"host-ts\": 7728}, \"global_maintenance\": false}"]}
    [ INFO  ] TASK [Check VM status at virt level]
    [ INFO  ] changed: [localhost]
    [ INFO  ] TASK [Fail if engine VM is not running]
    [ INFO  ] skipping: [localhost]
    [ INFO  ] TASK [Get target engine VM IPv4 address]
    [ INFO  ] changed: [localhost]
    [ INFO  ] TASK [Get VDSM's target engine VM stats]
    [ INFO  ] changed: [localhost]
    [ INFO  ] TASK [Convert stats to JSON format]
    [ INFO  ] ok: [localhost]
    [ INFO  ] TASK [Get target engine VM IPv4 address from VDSM stats]
    [ INFO  ] ok: [localhost]
    [ INFO  ] TASK [Fail if the Engine has no IP address]
    [ INFO  ] skipping: [localhost]
    [ INFO  ] TASK [Fail if Engine IP is different from engine's FQDN resolved IP]
    [ ERROR ] fatal: [localhost]: FAILED! => {"msg": "The conditional check 'engine_vm_ip_vdsm != engine_vm_ipv4.stdout_lines[0]' failed. The error was: error while evaluating conditional (engine_vm_ip_vdsm != engine_vm_ipv4.stdout_lines[0]): list object has no element 0\n\nThe error appears to have been in '/usr/share/ovirt-hosted-engine-setup/ansible/create_target_vm.yml': line 468, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe
    offending line appears to be:\n\n      when: engine_vm_ip_vdsm == '' or engine_vm_ip_vdsm is not defined\n    - name: Fail if Engine IP is different from engine's FQDN resolved IP\n      ^ here\n"}
    [ ERROR ] Failed to execute stage 'Closing up': Failed executing ansible-playbook

and I don’t know what is causing the issue - it’s my first time setting up this sort of thing. I think it may have something to do with the way I set up the host vm’s FDQN; I set it up as

192.168.0.229 ovirt.home home

in my hosts file (the address of my server is 192.168.0.228), but after the failed attempt the entry is no longer there.

I tried setting the IP of the VM manually as well as with DHCP but that made no difference. For some reason, after exiting it tells me to read a log file which doesn’t exist, so I can’t really provide any more information than this unfortunately.

Does anyone know what I could be doing wrong? The guides I read aren’t very clear on how the FDQN should be set up. The CentOS installation is brand new and the only other things I installed on it are zfs and nfs-utils.

Thank you!

I have a feeling it is failing because you dont have DNS setup and the hostname is localhost?

1 Like

It might be - how am I supposed to set it up? I set it in my hosts file and in my router, I’m not sure what else I should do. I got it working in a different way now but I’m still curious as to why this didn’t work.

run and post the output from " ip addr "

9: enp6s0f1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master ovirtmgmt state UP group default qlen 1000
    link/ether 00:1b:21:2b:26:cd brd ff:ff:ff:ff:ff:ff
10: ovs-system: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether fe:ff:ad:6e:f0:b9 brd ff:ff:ff:ff:ff:ff
11: br-int: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 5a:37:13:61:7b:4f brd ff:ff:ff:ff:ff:ff
28: ovirtmgmt: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 00:1b:21:2b:26:cd brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.228/24 brd 192.168.0.255 scope global dynamic ovirtmgmt
       valid_lft 66369sec preferred_lft 66369sec
    inet6 fe80::21b:21ff:fe2b:26cd/64 scope link
       valid_lft forever preferred_lft forever
29: ;vdsmdummy;: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 3e:86:56:83:62:4f brd ff:ff:ff:ff:ff:ff
34: vnet0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master ovirtmgmt state UNKNOWN group default qlen 1000
    link/ether fe:1a:4a:16:01:01 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::fc1a:4aff:fe16:101/64 scope link
       valid_lft forever preferred_lft forever

(above this are all the interfaces that aren’t connected to anything)

I do have a local ovirt instance running now so some of it may depend from that.

Based on the output above, your machine is configured for IP 228 , but you only have 229 in the hosts file?

I have an entry for .228 as well, the idea is that the hosted ovirt engine should have a different IP - it would be a virtual machine after all. This is the guide I’ve been reading: https://jonbornsteinblog.wordpress.com/2017/06/14/ovirt/ (alongside the official documentation).

my hosts file is like this:

127.0.0.1 localhost
192.168.0.228 [physical server's host name]
192.168.0.229 ovirt.home home

Do you have DNS setup for FQDN resolution of your planned ovirt host??

Well… good question. I had the host name set in my router and in my hosts file, is there anything else I was supposed to do? I couldn’t find any guide on the matter, they all just assumed I knew what FQDN was and how to set it up.

I’ll have to find some time later to try to recreate what you have … it make take a few days before I can.

working on a minimal install from centos 7.1 and waiting for updates to install before rebooting

So looks ovirt 4.1 is EOL now that centos/rhel 7.5 was released… which explains why I am getting this error 404 for the baseurl in the repo.

https://bugzilla.redhat.com/show_bug.cgi?id=1583222

As @nx2l has indicated, oVirt is very picky about FQDN. Annoyingly so if you ask me.

Before you install oVirt, you need a full hostname with at least 3 parts, something like hypervisor1.mysite.com.

Your hosts file should have an entry for the management interface (the one you want to use to login to the web gui). It should look like this:

192.168.xxx.xxx hypervisor1.mysite.com hypervisor1

You can test it with the command host hypervisor1.mysite.com.

I would recommend using something shorter than hypervisor1, but you get the idea.

If you don’t have local DNS configured, or you don’t want to rely on it, put the same entry into your admin station/laptop’s hosts file. oVirt will not allow you to access the web gui via IP address. You will need to use the FQDN.

I haven’t tried this, but the machine should be able to have as many IPs/virtual interfaces as you’d like. However, the oVirt management interface will need to be configured before installing oVirt.

So in your case, 192.168.0.229 doesn’t appear anywhere in ip a output. The interface and IP should be the first thing you configure.


In your case, you have 2 problems.

  1. ovirt.home isn’t a FQDN because it’s missing a 3rd level domain name.

  2. 192.168.0.229 is assigned to the domain name, but isn’t assigned to a interface on the server, so you’ve essentially defined an unreachable host.

1 Like

Ohhh I see… well, that would explain it. I have set ovirt up natively at this point so I won’t be able to try it, but it’s good to know for next time.

@nx2l if you have a similar setup maybe you can confirm this?

I was just trying to recreate what you did using a VM to see how far i got with that tutorial link you posted.