---
title: Edit the boot order of a virtual machine
---

# Edit the boot order of a virtual machine {#virt-edit-boot-order}

You can configure the boot order of disks and network devices on your virtual machine (VM) by using the web console or the CLI.

With **Boot Order** in the **VirtualMachine details** page, you can:

- Select a disk or network interface controller (NIC) and add it to the boot order list.
- Edit the order of the disks or NICs in the boot order list.
- Remove a disk or NIC from the boot order list, and return it back to the inventory of bootable sources.

## Adding items to a boot order list in the web console {#virt-add-boot-order-web_virt-edit-boot-order}

You can add items to a boot order list by using the web console.

**Procedure**

1. Click **Virtualization** → **VirtualMachines** from the side menu.
2. Click the **Virtual machines** tab.
3. Select a virtual machine to open the **VirtualMachine details** page.
4. Click the **Configuration** tab.
5. Expand **Boot management**.
6. Click the pencil icon that is located on the right side of **Boot Order**. If a YAML configuration does not exist, or if this is the first time that you are creating a boot order list, the following message displays: **No resource selected. VM will attempt to boot from disks by order of appearance in YAML file.**
7. Click **Add Source** and select a bootable disk or network interface controller (NIC) for the virtual machine.
8. Add any additional disks or NICs to the boot order list.
9. Click **Save**.

   > [!NOTE]
   > If the virtual machine is running, changes to **Boot Order** will not take effect until you restart the virtual machine.
   >
   > You can view pending changes by clicking **View Pending Changes** on the right side of the **Boot Order** field. The **Pending Changes** banner at the top of the page displays a list of all changes that will be applied when the virtual machine restarts.

## Editing a boot order list in the web console {#virt-edit-boot-order-web_virt-edit-boot-order}

You can edit the boot order list in the web console.

**Procedure**

1. Click **Virtualization** → **VirtualMachines** from the side menu.
2. Click the **Virtual machines** tab.
3. Select a virtual machine to open the **VirtualMachine details** page.
4. Click the **Configuration** tab.
5. Expand **Boot management**.
6. Click the pencil icon that is located on the right side of **Boot Order**.
7. Choose the appropriate method to move the item in the boot order list:

   - If you do not use a screen reader, hover over the arrow icon next to the item that you want to move, drag the item up or down, and drop it in a location of your choice.
   - If you use a screen reader, press the Up Arrow key or Down Arrow key to move the item in the boot order list. Then, press the **Tab** key to drop the item in a location of your choice.
8. Click **Save**.

   > [!NOTE]
   > If the virtual machine is running, changes to the boot order list will not take effect until you restart the virtual machine.
   >
   > You can view pending changes by clicking **View Pending Changes** on the right side of the **Boot Order** field. The **Pending Changes** banner at the top of the page displays a list of all changes that will be applied when the virtual machine restarts.

## Editing a boot order list in the YAML configuration file {#virt-edit-boot-order-yaml-web_virt-edit-boot-order}

You can edit the boot order list in a YAML configuration file by using the CLI.

**Prerequisites**

- You have installed the OpenShift CLI (`oc`).

**Procedure**

1. Open the YAML configuration file for the virtual machine by running the following command:

   ```terminal
   $ oc edit vm <vm_name> -n <namespace>
   ```
2. Edit the YAML file and modify the values for the boot order associated with a disk or network interface controller (NIC). For example:

   ```yaml
   disks:
     - bootOrder: 1
       disk:
         bus: virtio
       name: containerdisk
     - disk:
         bus: virtio
       name: cloudinitdisk
     - cdrom:
         bus: virtio
       name: cd-drive-1
   interfaces:
     - boot Order: 2
       macAddress: '02:96:c4:00:00'
       masquerade: {}
       name: default
   ```

   - `disks.bootOrder` defines the boot order value specified for the disk.
   - `interfaces.bootOrder` defines the boot order value specified for the network interface controller.
3. Save the YAML file.

## Removing items from a boot order list in the web console {#virt-remove-boot-order-item-web_virt-edit-boot-order}

Remove items from a boot order list by using the web console.

**Procedure**

1. Click **Virtualization** → **VirtualMachines** from the side menu.
2. Click the **Virtual machines** tab.
3. Select a virtual machine to open the **VirtualMachine details** page.
4. Click the **Configuration** tab.
5. Expand **Boot management**.
6. Click the pencil icon that is located on the right side of **Boot Order**.
7. Click the **Remove** icon ![](/openshift-docs-markdown/images/delete.png "Delete") next to the item. The item is removed from the boot order list and saved in the list of available boot sources. If you remove all items from the boot order list, the following message displays: **No resource selected. VM will attempt to boot from disks by order of appearance in YAML file.**

   > [!NOTE]
   > If the virtual machine is running, changes to **Boot Order** will not take effect until you restart the virtual machine.
   >
   > You can view pending changes by clicking **View Pending Changes** on the right side of the **Boot Order** field. The **Pending Changes** banner at the top of the page displays a list of all changes that will be applied when the virtual machine restarts.
