> ## Documentation Index
> Fetch the complete documentation index at: https://siderolabs-fe86397c-1-11-reference.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a Machine Class

This guide shows you how to create and a machine class.

<Tabs>
  <Tab title="UI">
    First, click the “Machine Classes” section  in the sidebar on the left

    Next, click the “Create Machine Class” button on the right.

    Add machine query conditions by typing them manually in the input box.

    <img src="https://mintcdn.com/siderolabs-fe86397c-1-11-reference/YGuga1UT8xktZXw3/omni/omni-cluster-setup/images/create-a-machine-class-delete-icon-red.png?fit=max&auto=format&n=YGuga1UT8xktZXw3&q=85&s=2255392acd65b8d0ba0c77a24e397ff4" alt="" width="3693" height="1876" data-path="omni/omni-cluster-setup/images/create-a-machine-class-delete-icon-red.png" />

    Clicking the label in the machine list will add them to the input box.

    <img src="https://mintcdn.com/siderolabs-fe86397c-1-11-reference/YGuga1UT8xktZXw3/omni/omni-cluster-setup/images/create-a-machine-class-amd64-red.png?fit=max&auto=format&n=YGuga1UT8xktZXw3&q=85&s=21a38d85a9e808c026bff9e67ea9216a" alt="" width="3693" height="1876" data-path="omni/omni-cluster-setup/images/create-a-machine-class-amd64-red.png" />

    Clicking on “+” will add blocks to match the machines using boolean `OR` operator.

    <img src="https://mintcdn.com/siderolabs-fe86397c-1-11-reference/YGuga1UT8xktZXw3/omni/omni-cluster-setup/images/create-a-machine-class-plus-icon-red.png?fit=max&auto=format&n=YGuga1UT8xktZXw3&q=85&s=a0c0321dbb6dc5c5f1f4b1e354b04fe6" alt="" width="3697" height="1879" data-path="omni/omni-cluster-setup/images/create-a-machine-class-plus-icon-red.png" />

    <img src="https://mintcdn.com/siderolabs-fe86397c-1-11-reference/YGuga1UT8xktZXw3/omni/omni-cluster-setup/images/create-a-machine-class-conditions-red.png?fit=max&auto=format&n=YGuga1UT8xktZXw3&q=85&s=2d957fb600189a7c5670ed15a7e6d727" alt="" width="3696" height="1879" data-path="omni/omni-cluster-setup/images/create-a-machine-class-conditions-red.png" />

    Name the machine class, then click “Create Machine Class”.
  </Tab>

  <Tab title="CLI">
    Create a file called `machine-class.yaml` with the following content:

    ```yaml
    metadata:
      namespace: default
      type: MachineClasses.omni.sidero.dev
      id: test
    spec:
      matchlabels:
        # matches machines with amd64 architecture and more than 2 CPUs
        - omni.sidero.dev/arch = amd64, omni.sidero.dev/cpus > 2
    ```

    Create the machine class:

    ```bash
    omnictl apply -f machine-class.yaml
    ```
  </Tab>
</Tabs>
