Skip to content

Commit

Permalink
attribute may not be available
Browse files Browse the repository at this point in the history
  • Loading branch information
gurubert committed Oct 1, 2024
1 parent 6cf82c8 commit 45709e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion proxmox_migrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def balance_vms(self, vms, dstnodes, maxfree = False):
# is vm HA resource?
haresource = vmid in ha_res
# is VM HA managed (started)?
started = haresource and ha_res[vmid]['state'] == 'started'
started = haresource and ha_res[vmid].get('state', 'started') == 'started'
# is VM for current node based on HA group?
forcurrentnode = haresource and (dstnode['node'] in ha_res[vmid]['group']['nodelist'] or not ha_res[vmid]['group']['restricted'])
if args.debug:
Expand Down

0 comments on commit 45709e8

Please sign in to comment.