Search the VMware Knowledge Base (KB)
View by Article ID

VIO viocli inventory-admin sync-availability-zones command shows "viocli operation failed: local variable 'instances' referenced before assignment" (2151497)

  • 1 Ratings


  • After running viocli inventory-admin show-availability-zones command on OMS (as root user), and displaying of the availability zones table, you can get the following error message:
 | name        | hosts          |
 | Test1       | [u'compute01'] |
 | Test2       | [u'compute02'] |
 Traceback (most recent call last):
 File "/usr/local/bin/viocli", line 10, in <module> sys.exit(main())
 File "/usr/local/lib/python2.7/dist-packages/viocli/", line 96, in main args.func(args, args.verbose)
 File "/usr/local/lib/python2.7/dist-packages/viocli/bundle/", line 204, in show_availability_zones availability_zones)
 File "/usr/local/lib/python2.7/dist-packages/viocli/inventory_ops/", line 1198, in get_out_of_sync_zones oms_compute_list = ComputeCluster.extract_compute_cluster_list(cluster)
 File "/usr/local/lib/python2.7/dist-packages/viocli/inventory_ops/", line 66, in extract_compute_cluster_list instance['attributes']) for instance in instances 
 UnboundLocalError: local variable 'instances' referenced before assignment
  • running the viocli inventory-admin show-availability-zones command again, shows the following error message:
viocli operation failed: local variable 'instances' referenced before assignment


This is a known issue and is being addressed in future versions of the product.

Request a Product Feature

To request a new product feature or to provide feedback on a VMware product, please visit the Request a Product Feature page.


  • 1 Ratings

Did this article help you?
This article resolved my issue.
This article did not resolve my issue.
This article helped but additional information was required to resolve my issue.

What can we do to improve this information? (4000 or fewer characters)

Please enter the Captcha code before clicking Submit.
  • 1 Ratings