VM Runtime on GDC lets you configure virtual machines (VMs) to use
Unified Extensible Firmware Interface (UEFI) boot instead of the default BIOS
process. You can also enable
[Secure Boot](https://docs.cloud.google.com/compute/shielded-vm/docs/shielded-vm.md.txt#secure-boot) and set up
emulated `smbios` fields, such as `uuid` and `serial`, that your applications
require.

## Before you begin

To complete this document, you need access to the following resources:

- Access to Google Distributed Cloud version 1.12.0 (`anthosBareMetalVersion: 1.12.0`) or higher cluster. You can use any cluster type capable of running workloads. If needed, [try Google Distributed Cloud on Compute
  Engine](https://docs.cloud.google.com/kubernetes-engine/distributed-cloud/bare-metal/docs/try/gce-vms) or see the [cluster
  creation
  overview](https://docs.cloud.google.com/kubernetes-engine/distributed-cloud/bare-metal/docs/installing/creating-clusters/create-clusters-overview).

## Enable UEFI booting

You can enable UEFI booting for both new and existing VMs. To enable UEFI
booting in an existing VM, the VM must have an EFI partition.

1. [Create a manifest](https://docs.cloud.google.com/kubernetes-engine/distributed-cloud/bare-metal/docs/vm-runtime/tutorial-create-vm.md.txt#create_a_vm) that defines a `VirtualMachine` or edit the manifest of an existing `VirtualMachine`.
2. Add the `firmware` field to the `VirtualMachine` manifest as shown in the
   example below:

   ```yaml
   apiVersion: vm.cluster.gke.io/v1
   kind: VirtualMachine
   metadata:
     labels:
       kubevirt.io/vm: vm1
     name: vm1
     namespace: test-vm-ns
   spec:
     compute:
       cpu:
         vcpus: 2
       memory:
         capacity: 4Gi
     interfaces:
     - name: eth0
       networkName: pod-network
       default: true
     firmware:
   bootloader:
   type: "uefi"
   enableSecureBoot: false
     disks:
     - virtualMachineDiskName: disk-from-gcs
       boot: true
       readOnly: true
   ```

## Enable secure boot

If UEFI booting is enabled for a VM you can also enable Secure Boot by setting
the `enableSecureBoot` field to `true` as shown below:

```yaml
  firmware:
    bootloader:
      type: "uefi"
      enableSecureBoot: true
```

For more information about Secure Boot, see [Secure
Boot](https://docs.cloud.google.com/compute/shielded-vm/docs/shielded-vm#secure-boot) in the Compute Engine
documentation.

## Provide emulated `smbios` fields

You can set up emulated `smbios` fields like `uuid` and `serial` by adding them
in the firmware field of the `VirtualMachine` manifest as shown in the example
below:

```yaml
  firmware:
    FIELD_NAME: FIELD_VALUE
FIELD_NAME: FIELD_VALUE
```

Replace <var translate="no">FIELD_NAME</var> and <var translate="no">FIELD_VALUE</var> with the `smbios` field
names and values that your application requires.

You can set up emulated `smbios` fields when using either UEFI or BIOS booting.