# Managing Machines

> Machine objects are typically used by administrators to configure unattended infrastructure settings.

Machine objects are typically used by administrators to configure unattended infrastructure settings.

[Learn more about machine objects in Orchestrator.](https://docs.uipath.com/orchestrator/automation-cloud/latest/user-guide/about-machines#machines)

## Adding a Machine Template

To create a machine template, follow these steps:

1. Go to **Tenant** &gt; **Machines**. The **Machines** page is displayed with a list of all machine objects in the tenant.
2. On the **Machines** page, click **Add machine** &gt; **Machine template**. The **Machine template** page is displayed.
3. In the **Template Name** field, enter a name for your template to easily identify it.
4. In the **Description** field, enter a description for your machine.
5. In the **Runtime details** section, assign the desired runtimes of each type to the machine. The number of runtimes represents the number of jobs you can execute simultaneously on **each host machine** connected to Orchestrator using this template.
   :::note
   The **App Testing** runtime type works only with Test Cloud. You can use App Testing to run tests and non-production processes. The **Performance Testing** runtime type works only with Test Cloud. You can use Performance Testing to run performance scenario executions.
   :::
6. In the **Process type** and **Process compatibility** fields, specify the type of processes the host machines can execute.

 <colgroup>
  <col/>
  <col/>
 </colgroup>
 
  
     Field  
     Description  
  
  
    Process type 
     On the machine infrastructure employing that machine template you can execute: 
      
         Foreground only - only foreground processes, 
         Background only - only background processes, 
         All - both background and foreground processes. 
      

  
  
    Process compatibility 
     On the machine infrastructure employing that machine template you can execute: 
      
         Windows only - Windows-compatible processes only, 
         Cross-platform only - cross-platform processes only, 
         All - both Windows-compatible and cross-platform processes. 
      

  
 

:::important
Orchestrator prevents starting jobs on a certain host machine if the underlying processes do not match the configuration on the template. Trying to start a job in an invalid setup results in a descriptive error message providing you with details about how to fix your configuration.
:::
7. In the **Client binaries (Robot, Assistant and Studio) auto update policy** field, select the [update policy](https://docs.uipath.com/orchestrator/automation-cloud/latest/user-guide/auto-updating-client-components#auto-updating-client-components) based on which the Robot, Assistant, and Studio get updated.
   * **Latest patch** - Installs the latest available version in the Update Server.
   * **Latest version** - Installs the latest patch available for each of the supported versions, e.g., latest 2021.10 patch.
   * **Specific version** - Installs a specific patch from the list of the ones available in the Update Server.
8. Select the mapping strategy. Learn how on the [account-machine mappings](https://docs.uipath.com/orchestrator/automation-cloud/latest/user-guide/configuring-account-machine-mappings#configuring-account-machine-mappings).
   * **Any account can use this machine** - No specific mappings in place.
   * **Specific accounts only can be assigned to this machine** - Configure specific account-machine pairs on which execution is allowed.
9. Click **Provision**. Your machine is created and a confirmation window is displayed along with the **Client ID** and **Client secret** needed to connect your robots to Orchestrator.
   :::important
   * The client secret is
   only visible once, right after its creation. If you want to use the same secret multiple times, copy it and store it in a safe storage location. Consider using encryption or hashing to secure the storage.
   * You can add a new
   client secret after you create a machine template. For further information, refer to [Generating new client secrets](https://docs.uipath.com/orchestrator/automation-cloud/latest/user-guide/robot-authentication-with-client-credentials#generating-new-client-secrets).
   :::
10. Once done, click **Close**. The **Machine template** window is closed and the **Machines** page is displayed listing all machine objects in the tenant, including the one you just created.

## Deleting a Machine

To delete a machine, take the following steps:

1. Select **More Actions** for a machine, then select **Remove**. Alternatively, select one or multiple machines from the grid and select **Remove**.
2. When presented with the machine deletion dialog, enter the confirmation text string in the **Confirmation for removal** field, then select **Yes**.
   :::note
   * You cannot delete machines with
   currently running, stopping, or terminating jobs.
   * When attempting to delete
   machines that have pending jobs or triggers attached, the confirmation dialog displays the number of pending jobs, as well as the numbers and types of triggers attached to each affected machine.
   * For machines with time triggers
   or queue triggers attached, the following scenarios are recorded in the audit log and result in notifications:
   + A machine deletion
   results in an enabled trigger not being assigned to any machine. In this case, the trigger is disabled, and you receive a **Trigger automatically disabled** notification.
   + A machine deletion
   results in an enabled trigger being unassigned from some but not all the machines to which it was assigned, or a disabled trigger not being assigned to any machine. In this case, you receive a **Trigger configuration was changed** notification.
   * Pending, resumed, or suspended
   jobs associated with a deleted machine are sent to a final state of **Faulted**.
   :::

## Displaying Logs for a Machine

To view a specific machine's logs, click the corresponding **More Actions** button and then **View Installed Versions & Logs**.

## Displaying Robot Versions for a Machine

On the **Machines** page, you can also view the robots' versions on the **Installed Versions** column. The version of a standard tobot is obtained when the **UiRobotSvc** service is either started or restarted. The version of an floating robot is obtained when the UiPath® Robot connects to Orchestrator.

To view the versions of every Robot connected to a specific machine, click the **More Actions** button and then **View Installed Versions & Logs**.

You can also see a cumulative output of the created Robots' versions on the **Installed Version** column on the **Machines** page according to various scenarios:

1. **No Robots**
   * no Robots were ever provisioned on the machine.
2. **Unknown**
   * 1 or more Robots were created, but none of them is connected;
   * 1 or more Robots were created after the Robot-Orchestrator connection had been established.
3. **[installed version]**
   * 1 Robot with a version later than 18.2.0 was registered, and it is connected;
   * more Robots having a version later than 18.2.0 (the same one) were provisioned, and they are all connected. For example, if you have provisioned one 18.2.4 Robot, which is connected, then **18.2.4** is displayed. If you provisioned a number of 18.3.0 Robots, say 11, and they are all connected, then **18.3.0** is displayed.
4. **&lt; 18.2.0**
   * 1 Robot with a version before 18.2.0 was provisioned, and it is connected;
   * more Robots having a version before 18.2.0 were provisioned, and they are all connected. For example, if you have provisioned one 18.1 Robot, which is connected, then **&lt;18.2.0** is displayed. Similarly, if you provisioned a number of 17.1.0 and 18.2.0 Robots, say 9 and 5, and they are all connected, then **&lt;18.2.0** is displayed.
5. **[number of distinct known versions]**
   * 2 or more Robots having different versions were registered, and they are all connected. For example, you have provisioned a total of 14 Robots (10 with 18.3.0, 2 with 18.2.4, 2 with a version before 18.2.0). In this case, **3 versions** is displayed.

If you hover over the values in this column, more details are displayed in the tooltip.

Figure 1. Installed version tooltip

![Screenshot of the installed version tooltip](https://dev-assets.cms.uipath.com/assets/images/orchestrator/orchestrator-screenshot-of-the-installed-version-tooltip-226379-b97631c6-9af56620.webp)

The table below illustrates how the **Installed Version** column is populated and the tooltip of each value for different scenarios.

| Scenario | Installed Version Column | TooltipContentExamples |
| --- | --- | --- |
| No Robots were ever created on the machine | No Robots | No Robots |
| You created 4 Robots, none are connected | Unknown | Unknown: 4 robot(s) |
| You provisioned a number of 18.3.0 Robots, say 11, and they are all connected | 18.3.0 | 18.3.0: 11 robot(s) |
| You provisioned a number of 17.1.0 and 18.2.0 Robots, say 9 and 5, and they are all connected | &lt;18.2.0 | &lt;18.2.0: 14 robot(s) |
| You provisioned a total of 14 Robots (10 with 18.3.0, 2 with 18.2.4, 2 with a version before 18.2.0) | 3 versions | 18.3.0: 10 robot(s)  18.2.4: 2 robot(s)  &lt;18.2.0: 2 robot(s)  Total: 14 robot(s) |

## Displaying the Robots Connected to a Machine

To view the Robots connected to a specific machine, click the **More Actions** button and then **View Robots**. You are automatically redirected to the **Robots** page, where all Robots connected to your machine are displayed.

## Enabling/Disabling a Machine

Only available for **Unattended**, **NonProduction**, **Testing**, **App Testing**, **App Test Robot**, and **Performance Testing**-purposed machines. Disable a machine from the corresponding license pages in order to prevent instant license consumption.

1. In the **License** page, click **See More** for the type of license that interests you. The corresponding page is displayed.
2. Turn off the toggle in the **Active** column. A dialog is displayed asking for confirmation on disabling the machine.
3. Click **Yes**. The machine is disabled.
4. Turn on the toggle to enable the machine.

Keep in mind that you cannot disable a machine as long as Robots on that machine are still running, regardless of what folder they are in.

## Assigning Machines to Folders

Assigning machines to folders has multiple implications. See [Assigning Machine Objects to Folders](https://docs.uipath.com/orchestrator/automation-cloud/latest/user-guide/assigning-machine-objects-to-folders#assigning-machine-objects-to-folders) for details.

## Adding Tags to Machine Objects

:::note
You need **Edit** on Machines and **View** on Tags to add existing tags to machine objects. You need **Edit** on Machines and **Create** on Tags to add new tags to machine objects.
:::
:::note
* Each machine object can have a maximum of one million key/value pairs.
* Labels and key/value properties are limited to 256 characters.
* Tag names can't contain these characters: `&lt;`, `&gt;`, `%`, `&`, `\`, `?`, `/`, `:`.
:::

You can apply tags to a machine either when creating one or editing an existing one. To add tags to a machine when editing it, follow these steps:

1. From the **Machines** page, click **More Actions** &gt; **Edit** next to the desired machine object. The machine object is opened for editing.
2. On the **Labels** field, start typing the name of the label. You can choose an existing label or create a new one.
3. On the **Properties (key-value pairs)** field, click **Add new**.
4. Add new keys and values. You can choose existing keys and/or values or you can create new ones.
5. When done, click **Update**. Your machine object is updated and the newly created tags, if any, become available for other objects.

## Removing Tags From Machine Objects

To remove tags from a object, follow these steps:

1. From the **Machines** page, click **More Actions** &gt; **Edit** next to the desired machine object. The machine object is opened for editing.
2. On the **Labels** field, click the **X** adjacent to the name of the label to remove it. The label is removed.
3. On the Properties (key-value pairs) field, click the **X** adjacent to the keys and/or values to remove them. The keys and/or values are removed.
4. To delete a key/value pair click the **Remove** icon corresponding to that entry. The key/value pair is removed.
5. When done, click **Update**. Your machines is updated and tags are removed.

## Optimizing Unattended Infrastructure Using Machine Templates

Maximize efficiency and cut infrastructure costs by distributing unattended automation workload to existing infrastructure by specializing machines in executing particular processes.

See [Optimizing unattended infrastructure using machine templates](https://docs.uipath.com/orchestrator/automation-cloud/latest/user-guide/optimizing-unattended-infrastructure-using-machine-templates#optimizing-unattended-infrastructure-using-machine-templates) for details.

## Enabling machine maintenance

You can take your machine offline whenever you want to perform maintenance on it. This is enabled from the tenant-level **[Monitoring](https://docs.uipath.com/orchestrator/automation-cloud/latest/user-guide/monitoring-unattended-sessions)** page, in the **Unattended sessions** section, by switching the toggle in the **Maintenance** column to **On**.

Figure 2. Enabling machine maintenance

![Screenshot of the Unattended sessions interface](https://dev-assets.cms.uipath.com/assets/images/orchestrator/orchestrator-screenshot-of-the-unattended-sessions-interface-642841-db9cdc15-26ade32a.webp)

Once you enable the toggle, a confirmation window is displayed, asking you if you would like to:

* **Wait for running jobs to finish before maintenance** (this is the default option).
  + A machine in maintenance mode does not accept any new jobs. If you enable maintenance mode and choose this option, all running jobs will be completed, but no new jobs will be picked up during that time.
  + This option will wait for all jobs to finish and it does not issue a stop command.
* **Stop all running jobs and wait for them to finish**.
  :::note
  Jobs can only shut down gracefully if the underlying automation is designed to handle stop requests by implementing proper graceful stop logic. The behavior also depends on how the automation was built.
  :::
* **Kill all running jobs now**.

Clicking **Confirm** enables the maintenance mode, while **Cancel** revokes the request to enter maintenance mode.

### Notes
* Pending jobs keep their status while they wait to be picked up by another available machine or by the same machine, once it is back online.
* Maintenance mode is set per session (machine + hostname), so you can perform maintenance on a virtual/physical machine. If a session has several runtimes associated to it, they will all be selected by default.
