code: func (g *GuestInfo) IpAddress(vm *object.VirtualMachine) (string, error) {
  	ctx := context.TODO()
  	const any = "0.0.0.0"
  	var mvm mo.VirtualMachine
  
  	pc := property.DefaultCollector(g.c)
  	err := pc.RetrieveOne(ctx, vm.Reference(), []string{"runtime.host", "config.uuid"}, &mvm)
  	if err != nil {
  		return "", err
  	}
  
  	h, err := g.hostInfo(mvm.Runtime.Host)
  	if err != nil {
  		return "", err
  	}
  
  	// Normalize uuid, esxcli and mo.VirtualMachine have different formats
  	uuid := strings.Replace(mvm.Config.Uuid, "-", "", -1)
  
  	if wid, ok := h.wids[uuid]; ok {
  		res, err := h.Run([]string{"network", "vm", "port", "list", "--world-id", wid})
  		if err != nil {
  			return "", err
  		}
  
  		for _, val := range res.Values {
  			if ip, ok := val["IPAddress"]; ok {
  				if ip[0] != any {
  					return ip[0], nil
  				}
  			}
  		}
  	}
  
  	return any, nil
  }
docs: // IpAddress attempts to find the guest IP address using esxcli.
  // ESX hosts must be configured with the /Net/GuestIPHack enabled.
  // For example:
  // $ govc host.esxcli -- system settings advanced set -o /Net/GuestIPHack -i 1