diff --git a/bundles/vmhost/files/check_vm_status b/bundles/vmhost/files/check_vm_status index d75d610..82d2227 100644 --- a/bundles/vmhost/files/check_vm_status +++ b/bundles/vmhost/files/check_vm_status @@ -4,7 +4,7 @@ from subprocess import check_output from sys import exit try: - result = check_output(['virsh', '--readonly', 'list', '--all']).decode('utf-8').split('\n') + result = check_output(['virsh', '--readonly', 'list', '--all']).decode('utf-8').splitlines() except Exception as e: # If something fails, this means libvirt is not responding. This is # an error. @@ -22,6 +22,9 @@ for vm in result[2:]: info = vm.split() + if info[1].startswith('EXCLUDE_FROM_MONITORING_'): + continue + if info[2] in {'crashed', 'dying'}: crashed.add('{}: {}'.format(info[1], info[2])) elif info[2] in {'running'}: