code: func getScaleSetVMInstanceID(machineName string) (string, error) {
  	nameLength := len(machineName)
  	if nameLength < 6 {
  		return "", ErrorNotVmssInstance
  	}
  
  	instanceID, err := strconv.ParseUint(machineName[nameLength-6:], 36, 64)
  	if err != nil {
  		return "", ErrorNotVmssInstance
  	}
  
  	return fmt.Sprintf("%d", instanceID), nil
  }
docs: // machineName is composed of computerNamePrefix and 36-based instanceID.
  // And instanceID part if in fixed length of 6 characters.
  // Refer https://msftstack.wordpress.com/2017/05/10/figuring-out-azure-vm-scale-set-machine-names/.