Creating custom images

You can create custom images for AE hosted runners.

Note: GitHub Actions is currently in beta for GitHub AE.

Creating an AE hosted runner with a custom image

AE hosted runners can use operating system images that you've customized to suit your needs. This article includes the high level steps for creating the image in Azure and preparing it for GitHub AE. For more information, refer to the Azure documentation.

During this beta, to be able to create a custom image for AE hosted runners, you will need an Azure subscription that is able to provision a virtual machine.

  1. Provision a new VM in your tenant using a marketplace image or a virtual hard drive(VHD).

  2. Optionally, install your required software on the VM.

  3. Deprovision the VM:

  4. Use the Azure CLI to deallocate and generalize the VM:

    $resourceGroupName = "octocat-testgroup"
    $vmName = "octo-vm"
    Stop-AzVM -ResourceGroupName $resourceGroupName -Name $vmName
    Set-AzVM -ResourceGroupName $resourceGroupName -Name $vmName -Generalized
  5. Generate a SAS URI for the VM's operating system disk.

    • Using the Azure Portal: On the disk resource, navigate to Disk Export, set URL expires in (seconds) to 86400 (24 hours), and generate the URL.

    • Using the Azure CLI:

      $resourceGroupName = "octocat-testgroup"
      $vmName = "octo-vm"
      $vm = Get-AzVM -ResourceGroupName $resourceGroupName -Name $vmName
      Grant-AzDiskAccess `
          -ResourceGroupName $resourceGroupName `
          -DiskName $vm.StorageProfile.OsDisk.Name `
          -Access Read `
          -DurationInSecond 86400
      • Replace octo-vm with the name of your virtual machine.

Once you've created the image, you can have it added to GitHub AE. For more information, see "Adding an AE hosted runner with a custom image".

Did this doc help you?Privacy policy

Help us make these docs great!

All GitHub docs are open source. See something that's wrong or unclear? Submit a pull request.

Make a contribution

Or, learn how to contribute.