icinga2-diagnostics icon indicating copy to clipboard operation
icinga2-diagnostics copied to clipboard

Rebuild Hypervisor detection

Open widhalmt opened this issue 7 years ago • 2 comments

Change to a more elegant way than lots of nested if's.

widhalmt avatar Jan 02 '18 10:01 widhalmt

The problem is Xen's two line output, otherwise a simple case would be sufficient

widhalmt avatar Jan 02 '18 10:01 widhalmt

As there is no Hyper-V in the Hypervisor detection yet, here is what the output looks like (tested on Ubuntu 14.04 and 16.04

sudo virt-what
hyperv

If I am not mistaken the script part would look like:

elif [ "$(echo ${VIRT} | awk '{print $1}')" = "hyperv" ]
        then
          VIRTUAL=true
          HYPERVISOR="Hyper-V"

log1-c avatar Jan 19 '18 13:01 log1-c