github.com/vmware/govmomi@v0.51.0/scripts/vcsa/assign-licenses.sh (about)

     1  #!/bin/bash -e
     2  
     3  # © Broadcom. All Rights Reserved.
     4  # The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries.
     5  # SPDX-License-Identifier: Apache-2.0
     6  
     7  export GOVC_INSECURE=true
     8  
     9  govc license.add "$VCSA_LICENSE" "$ESX_LICENSE" >/dev/null
    10  
    11  govc license.assign "$VCSA_LICENSE" >/dev/null
    12  
    13  govc find / -type h | xargs -I% -n1 govc license.assign -host % "$ESX_LICENSE" >/dev/null
    14  
    15  echo "Assigned licenses..."
    16  govc license.assigned.ls
    17  
    18  echo ""
    19  echo "License usage..."
    20  govc license.ls