Create a high-performance VM

For memory-intensive workloads that require performance optimizations, you can create a virtual machine (VM) with an N4 shape. These VMs use compute and virtualization optimizations to meet performance requirements.

This page is for platform administrators within platform administrator groups responsible for creating virtual machines. For more information, see Audiences for GDC air-gapped documentation.

Before you begin

Open a ticket to request that the Infrastructure Operator provisions the necessary o3-highmem1-192-gdc-metal servers and enables HPC optimizations. When the ticket is resolved, you can create a high performance VM.

Required permissions

To get the permissions you need to create a high performance VM, ask your Project IAM Admin to grant you the Project VirtualMachine Admin (project-vm-admin) role in the namespace of the project where the VM resides. For more information on roles, see Role definitions.

Create a high performance VM

To enable high performance computing (HPC) on a VM, you add the virtualmachine.gdc.goog/enable-high-perf: "true" label to the VirtualMachine manifest. When this label is applied, taints and labels are automatically added to the VM to ensure it runs on dedicated, optimized nodes.

  1. To create a disk for your VM, save the following VirtualMachineDisk manifest as DISK_NAME.yaml:

    apiVersion: virtualmachine.gdc.goog/v1
    kind: VirtualMachineDisk
    metadata:
      name: DISK_NAME
    spec:
      source:
        image:
          name: VM_IMAGE
          namespace: vm-system
      size: 20Gi
    
  2. Create the disk:

    kubectl apply -f DISK_NAME.yaml
    
  3. To create the high-performance VM, save the following VirtualMachine manifest as VM_NAME.yaml. Note the inclusion of the virtualmachine.gdc.goog/enable-high-perf: "true" label.

    apiVersion: virtualmachine.gdc.goog/v1
    kind: VirtualMachine
    metadata:
      name: VM_NAME
      labels:
        virtualmachine.gdc.goog/enable-high-perf: "true"
    spec:
      compute:
        virtualMachineType: VM_TYPE
      disks:
      - virtualMachineDiskRef:
          name: DISK_NAME
        boot: true
        autoDelete: true
      shieldConfig:
        bootType: uefi
        enableSecureBoot: true
        enableVtpm: false
    
  4. Create the VM:

    kubectl apply -f VM_NAME.yaml