diff --git a/vdiclient.py b/vdiclient.py index 2d89327..b461339 100644 --- a/vdiclient.py +++ b/vdiclient.py @@ -172,7 +172,14 @@ def setmainlayout(): def getvms(listonly = False): vms = [] try: + nodes = [] + for node in G.proxmox.cluster.resources.get(type='node'): + if node['status'] == 'online': + nodes.append(node['node']) + for vm in G.proxmox.cluster.resources.get(type='vm'): + if vm['node'] not in nodes: + continue if 'template' in vm and vm['template']: continue if G.guest_type == 'both' or G.guest_type == vm['type']: