Bringing your own licenses Stay organized with collections Save and categorize content based on your preferences.
This document describes how Google Cloud supports bringing your own licenses(BYOL) that have dedicated hardware requirements to Compute Engine.Before attempting to bring images with existing licenses to Google Cloud,review your licensing terms and conditions.
Bringing your existing physical-core or physical-processor licenses that havededicated hardware requirements requires you to bring your own media and to runthat media on hardware configurations, such assole-tenantnodes, that are compliant with your licenses. You canbring images with existing licenses in anyregion that supports sole-tenantnodes, and although there is no additional chargefor bringing images with existing licenses, you must still pay for your licensesaccording to your agreements.
Licensing scenarios such as licenses related to Linux BYOS with RHEL orSLES, as well as Microsoft applications don't require sole-tenant nodes. If youare considering bringing licenses from Microsoft applications such as SharePointServer and SQL Server, useMicrosoft License Mobility.
Sole-tenant nodes are physical servers dedicated to hosting virtual machine(VM) instances for only your project. You can configure sole-tenant nodes tosupport various workload requirements, such as requirements for minimizing thenumber of physical servers and cores. Consult your licensing agreements todetermine which configuration options are most suitable for your workloads.
To support bringing your own licenses, and to help you manage compliancerequirements related to your licenses, Google Cloud provides tools forimporting images, managing VMs on dedicated hardware by using sole-tenant nodes,minimizing physical core usage, and tracking usage of physical cores forreporting purposes.
To bring images with existing licenses to Google Cloud, you must do thefollowing:
Prepare the images according to your license agreements.
Activate your licenses.
Import virtual disk files and create images from those disk files.
Create sole-tenant node templates.
Create sole-tenant node groups from the node templates.
Provision VMs on the node groups with the imported virtual disk files.
Track the license usage of your VMs. To help you with reporting yourlicense consumption, Google provides tools to help youtrack both license usageand physical core and processor usage.
Report license consumption to your vendor.
If you need support or have questions regarding licensing, contact yourlicensing reseller. If you need support or have questions about bringing imageswith existing licenses to Google Cloud,contact Google CloudSupport.
Before you begin
- Review the node group host maintenance policy:For BYOL there are two options for host maintenance policy that minimize thenumber of physical servers used for licensing purposes. These options are
restart-in-placeandmigrate-within-node-group. - Request additional CPU quota:New projects receive a CPU quota of 72. Make sure you haveenough CPU quota to support your node group. For example, the
n1-node-96-624node type contains 96CPUs, and if your node group uses the minimum number of nodes(2), your CPU quota must be at least192.Depending on your setup and the needs of your workloads, you might alsoneed to request a quota adjustment for VMs or IP addresses. - Enable the Cloud Build API:To import your OS image you must enable the Cloud Build API. When you enablethis API, Compute Engine grants your project the appropriateIAM roles so that you can importimages into your project. To list the roles granted to your project, use the
gcloud projectsget-iam-policycommand. For information about how to grant roles toyour project, seeManaging access toCompute Engine resources. - Enable the Cloud Logging API:Enable this API if your licensing agreements require you to track physicalserver usage. With this API enabled, you can import and view server usageinformation, such as physical core count, by usingBigQuery, which Google stronglyrecommends. For information about how to determine the count of physical cores,seeAnalyzing sole-tenantnode usage.
- If you haven't already, set upauthentication. Authentication verifies your identity for access to Google Cloud services and APIs. To run code or samples from a local development environment, you can authenticate to Compute Engine by selecting one of the following options:
Select the tab for how you plan to use the samples on this page:
Console
When you use the Google Cloud console to access Google Cloud services and APIs, you don't need to set up authentication.
gcloud
Install the Google Cloud CLI. After installation,initialize the Google Cloud CLI by running the following command:
gcloudinit
If you're using an external identity provider (IdP), you must first sign in to the gcloud CLI with your federated identity.
Note: If you installed the gcloud CLI previously, make sure you have the latest version by runninggcloud components update.- Set a default region and zone.
REST
To use the REST API samples on this page in a local development environment, you use the credentials you provide to the gcloud CLI.
Install the Google Cloud CLI. After installation,initialize the Google Cloud CLI by running the following command:
gcloudinit
If you're using an external identity provider (IdP), you must first sign in to the gcloud CLI with your federated identity.
Note: If you installed the gcloud CLI previously, make sure you have the latest version by runninggcloud components update.For more information, seeAuthenticate for using REST in the Google Cloud authentication documentation.
Importing and creating an image from an offline virtual disk
To provision VMs with your existing licenses, you must bring your own media.Images based on a premium image are not eligible for BYOL because premium imagesrequire pay-as-you-go licenses from Google. For information about premiumimages, seeOperating system details.
If you have virtual disks (golden disks orgolden images) in youron-premises environment with software configurations or licenses that you need,theimport virtual disk tool canhelp you do the following:
Import your customized virtual disks with asupported operating systemand create images based on those disks.
Note: If you are importing Windows Server 2008 R2 SP1 or Windows 7 SP1 x64,theimage must support SHA2 signing because Compute Engine drivers are signed with SHA2.Set up the appropriate license configuration.
Install the packages and drivers necessary for compatibility withGoogle Cloud.
Before you import the virtual disk file for your VM, verify that there are noincompatibilitiesin the file bydownloading and running the precheck toolfrom inside your VM. Also, because software from third parties might interferewith the installation of Compute Engine drivers, Google recommends removingthird-party software before importing your image.
To start a VM with your own license, import a virtual disk with the OS you wantto use. You can import virtual disks fromCloud Storagebuckets and local workstations. When importing a virtual disk file from a localworkstation, the image import tool uploads your image file to Cloud Storage,and, if necessary, creates a new Cloud Storage bucket. Then, the importtool copies the file to Compute Engine and creates a bootable image fromthe virtual disk file.
Files stored on Cloud Storage and images in Compute Engineincur charges. After verifying that the image imports and boots correctly as aVM, you can delete the virtual disk file from Cloud Storage.
Permissions required for this task
To perform this task, you must have the followingpermissions:
roles/compute.adminon the Cloud Build service accountroles/iam.serviceAccountUseron the Cloud Build service account
Console
Go to theImages page.
ClickCreate image.
Specify a name for the image.
UnderSource, chooseVirtual disk (VMDK, VHD).
UnderCloud Storage file, chooseBrowse and browse to theCloud Storage location of the image to import.
UnderOperating system on virtual disk, choose the operating systemof the image that you are importing.
Make sure thatInstall guest packages is selected, so that the imageyou are importing is bootable.
ExpandLicense key options. UnderOS License, chooseUse your own license key.
ClickCreate to import the image.
gcloud
Rungcloud compute images importto import a virtual disk file and to create a disk image from the virtualdisk file:
gcloud compute images importIMAGE_NAME \ --source-fileVMDK_NAME \ --byol
Replace the following:
IMAGE_NAME: name to give the image createdfrom the virtual disk file.VMDK_NAME: name of the virtual disk to importand create an image from. You can import a VMDK file from the following:- A local file: If importing from a local file, use an absolutepath or a relative path to the file. Depending on the size of thevirtual disk and the speed of the network connection, the uploadmight take tens of minutes.
- Cloud Storage: If importing fromCloud Storage, the Cloud Storagebucket must be in the same project that you are using to import thevirtual disk, and you must specify the full path to the file as
gs://BUCKET_NAME/OBJECT_NAME.ReplaceBUCKET_NAMEwith the name of the Cloud Storage bucketandOBJECT_NAMEwith the name of theCloud Storage object.
Activating licenses
After verifying that you are importing acompatible OS,you are responsible for checking that your licensing agreements permit you tobring your own licenses and that you are permitted to use the guest OS image andlicense import environment provided by Google. You are also responsible forpreparing your guest OS image for import according to your licensing agreements.
To activate a license, usestartup scripts withyour Multiple Activation Key (MAK), or configure access to your organization'sMicrosoft Key Management Service. You can't activate images with existinglicenses against the Compute Engine license server.
After importing your image and activating the license, provision a VM based onthe imported image onto a sole-tenant node.
Creating a sole-tenant node template
After importing the image, create a sole-tenant node template. You will usethis node template to create a sole-tenant node group to run your image on.
The node templates page doesn't list the region and zone of the template, butnode groups must be created in a zone within the region where you created thenode template. To create a template, you must first create a node group, butyou only need to complete the steps as far as choosing the region and zone.After that, you can create the template and not continue on to create the nodegroup if you want to.
You set node affinity labels in the sole-tenant node template when you createthe template.
Permissions required for this task
To perform this task, you must have the followingpermissions:
compute.nodeTemplates.createon the project or organization
Console
Go to theSole-tenant nodes page.
ClickCreate node group.
Enter aName for the node group.
Select theRegion andZone for the node group.
Take note of the region and zone you used. When you later create a nodegroup that is based on this node template, the node group must be in azone within the region where you created the node template.
UnderNode template properties, selectCreate node template.
In theCreate a node template dialog, specify aName, aNode type, aLocal SSD, and aGPU accelerator.
UnderCPU overcommit, choose whether to enable CPU overcommit.
Optional: UnderAffinity labels, clickAdd affinity label toadd a key-value pair as anode affinity label.
ClickCreate to finish creating your node template.
ClickCancel to cancel out of creating a node group.
gcloud
Create a sole-tenant node template by usinggcloud compute sole-tenancynode-templates create.
gcloud compute sole-tenancy node-templates createTEMPLATE_NAME \ --node-typeNODE_TYPE \ --regionREGION
Replace the following:
TEMPLATE_NAME: name of the node template tocreate.NODE_TYPE:type of sole-tenant node for the nodes in a nodegroup. All nodes in a node group are identical and are created from theparameters specified by a node template.REGION: region to create the node template in.
REST
Create a sole-tenant node template by usingnodeTemplates.insert.
POST https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/regions/REGION/nodeTemplates{ "name": "TEMPLATE_NAME", "nodeType": "NODE_TYPE" "nodeAffinityLabels": { "KEY": "VALUE" }}Replace the following:
PROJECT_ID: ID of your project.REGION: region to create the node template in.TEMPLATE_NAME: name of the node template tocreate.NODE_TYPE:type of sole-tenant node for the nodes in a nodegroup. All nodes in a node group are identical and are created from theparameters specified by a node template."KEY": "VALUE": comma-separated listofaffinity labelsrepresented as key-value pairs. You can only specify affinity labels fora node template when you create the node template.
Creating a sole-tenant node group
To create a node group that is based on a node template, the node group must bein a zone within the region where you created the node template. A sole-tenantnode group inherits properties specified by the sole-tenant node template.The sole-tenant node group has additional values that you must specify. ForBYOL, depending on the license requirements consider the different options forhost maintenance policy:
- If the licenses are assigned per physical cores, then use the
restart-in-placeormigrate-within-node-grouphost maintenance policy tominimize the number of physical servers used. - If the licenses are assigned based on user/device, a model typically used forVirtual Desktop licenses, then use the
defaulthost maintenance policy. Theselicenses are not assigned per physical cores, and therefore do not need aspecial host maintenance policy to limit physical server usage.
Permissions required for this task
To perform this task, you must have the followingpermissions:
compute.nodeTemplates.useon the node templatecompute.nodeGroups.createon the project or organization
Console
Go to theSole-tenant nodes page.
ClickCreate node group.
UnderNode group properties, enter aName for the node group.
Select theRegion andZone for the node group.
If there are any templates available in that region or zone, thetemplates are listed underNode template properties after you clickContinue.
ClickContinue.
UnderNode template properties, select theNode template tobase the node group on. Node groups must be in a zone within the regionwhere you created the node template, so when selecting the template fora node group, select a template from the region that contains the zonewhere you are creating the node group. If no node template exists, youcancreate one.
ClickContinue.
UnderConfigure autoscaling, set theAutoscaling mode to oneof the following values. For more information, seeAutoscaling node groups.
- On: Have nodes automatically added to or removed from thenode group.
- Only scale out: Add nodes to the node group when extracapacity is required.
- Off: Manually manage the size of the nodegroup.
Specify theMinimum number of nodes for the group. If you enable thenode group autoscaler,either specify a range (minimum and maximum number of nodes) for thesize of the node group, or, specify the number of nodes for the group.You can manually change either value later.
ClickContinue.
Optional: UnderConfigure maintenance settings, set theMaintenance policy to one of the following values. The maintenancepolicy lets you configure the behavior of VMs on the node group duringhost maintenance events. For more information, seeHost maintenance policies.
- Default
- Restart in place
- Migrate within node group
ClickCreate.
gcloud
Create a sole-tenant node group by using thegcloud compute sole-tenancynode-groups create command.
gcloud compute sole-tenancy node-groups createGROUP_NAME \ --node-templateTEMPLATE_NAME \ --target-sizeGROUP_SIZE \ --zoneZONE \ --maintenance-policyMAINTENANCE_POLICY
Replace the following:
GROUP_NAME: name of the sole-tenant node group tocreate.TEMPLATE_NAME: name of the node template to createthe node group from.GROUP_SIZE: initial size of the node group. Thenode group autoscalerautomatically manages the size of sole-tenant node groups, or you canmanage the size manually.ZONE: zone to create the node group in. This mustbe in the same region as the node template.MAINTENANCE_POLICY: maintenance policy of the nodegroup. Set the maintenance policy to one of the following values. If novalue is set,defaultis used for the maintenance policy.defaultmigrate-within-node-grouprestart-in-place
REST
Create a sole-tenant node group by usingnodeGroups.insert.
POST https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/zones/ZONE/nodeGroups?initialNodeCount=GROUP_SIZE{ "nodeTemplate": "/regions/REGION/nodeTemplates/TEMPLATE_NAME", "name": "GROUP_NAME", "maintenancePolicy": "MAINTENANCE_POLICY"}Replace the following:
PROJECT_ID: ID of the project to create the nodegroup in.ZONE: zone to create the node group in. This mustbe in the same region as the node template.GROUP_SIZE: initial size of the node group. Thenode group autoscalerautomatically manages the size of sole-tenant node groups, or you canmanage the size manually.REGION: region containing the node template.TEMPLATE_NAME: name of the node template to createthe node group from.GROUP_NAME: name of the sole-tenant node group tocreate.MAINTENANCE_POLICY: maintenance policy of the nodegroup. Set the maintenance policy to one of the following values. If novalue is set,DEFAULTis used for the maintenance policy.DEFAULTRESTART_IN_PLACEMIGRATE_WITHIN_NODE_GROUP
Provisioning a sole-tenant VM
Provision a VM on the node group and specify its host maintenance policy. Beaware of the following requirements:
- To provision in node groups with
restart-in-placehost maintenance policy, makesure that the VM has the valueTERMINATEfor theon host maintenance option. - To provision in node groups with
migrate-within-node-groupmaintenancepolicy, make sure that the VM targets a single node group with thenode-group-nameaffinity label, and that it does not target single nodeswith thenode-nameaffinity label. Any type of host maintenance option isvalid, but the recommendation is to useMIGRATE.
Permissions required for this task
To perform this task, you must have the followingpermissions:
compute.instances.createon the project, andother permissions related to creating an instance that are related to your scenario
Console
If you usednode affinity labels in the template,you can create multiple VMs by using managed instance groups (MIGs) andspecifying the node affinity labels underSole-tenant nodes settings,or, create individual VMs from the node group details page:
Go to theSole-tenant nodes page.
Click theName of the node group to provision a VM on.
Create a VM on a sole-tenant node by doing one of the following:
- To create a VM anywhere in the sole-tenant node group, clickCreate instance.
- To create a VM on a specific sole-tenant node, click theNameof a sole-tenant node group, then click theName of asole-tenant node, then clickCreate instance.
Configure the sole-tenant VM. Because you already selected yournode group or a specific node, theRegion,Zone, andNode affinity labels are already specified by the template.
Select aMachine configuration by specifying theMachine family,Series, andMachine type. Choose theSeries that correspondsto thesole-tenant node type.
Select theBoot disk for the sole-tenant VM, which is the previouslyimported virtual disk image.
Select theManagement tab:
- UnderAvailability policy > On host maintenance,select the restart behavior of the VM.
- UnderAutomatic Restart, selectOn (recommended) orOff.
ClickCreate.
gcloud
Provision a sole-tenant VM on a sole-tenant node group by using thegcloudcompute instances create command.
gcloud compute instances createVM_NAME \ --machine-typeMACHINE_TYPE --imageIMAGE_NAME \ --zoneZONE \ --node-groupGROUP_NAME \RESTART_BEHAVIOR \ --maintenance-policyMAINTENANCE_POLICY
Replace the following:
VM_NAME: name of the VM to create.MACHINE_TYPE: machine type for the new VM.IMAGE_NAME: image to create a VM from. This isthe image created during the import process.ZONE: zone to create the VM in.GROUP_NAME: name of the node group to provisionthe VM on.RESTART_BEHAVIOR: restart behavior of this VM.Set the restart behavior to one of the following values:--restart-on-failure--no-restart-on-failure
MAINTENANCE_POLICY: VM behavior during maintenanceevents. Set the maintenance policy to one of the following values:MIGRATETERMINATE
REST
Provision a sole-tenant VM on a sole-tenant node group by using theinstances.insert method.
POST https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/zones/VM_ZONE/instances{ "name": "VM_NAME", "machineType": "/zones/MACHINE_TYPE_ZONE/machineTypes/MACHINE_TYPE", "scheduling": { "nodeAffinities": [ { "key": "node-group", "operator": "IN", "values": [ "GROUP_NAME" ] } ], "onHostMaintenance": "MAINTENANCE_POLICY", "automaticRestart": "AUTOMATIC_RESTART" }, "networkInterfaces": [ { "network": "/global/networks/NETWORK", "subnetwork": "/regions/region/subnetworks/SUBNETWORK" } ], "disks": [ { "boot": true, "initializeParams": { "sourceImage": "/projects/IMAGE_PROJECT/global/images/family/IMAGE_FAMILY" } } ]}Replace the following:
PROJECT_ID: ID of the project to create the VM in.VM_ZONE: zone to create the VM in.VM_NAME: name of the new VM.MACHINE_TYPE_ZONE: zone containing the machinetype.MACHINE_TYPE: machine type to provision the VM on.GROUP_NAME: name of the node group to provisionthe VM on.MAINTENANCE_POLICY: VM behavior during maintenanceevents, set to eitherMIGRATEorTERMINATE.AUTOMATIC_RESTART: specifies whether the VM isautomatically restarted if Compute Engine stops the VM. Thedefault value istrue.NETWORK: name of the network to connect the VM to.SUBNETWORK: name of the subnetwork to connect theVM to.IMAGE_PROJECT: image project containing the sourceimage.IMAGE_FAMILY: image family of the source image.
What's next
Consult theFAQfor bringing your own licenses to Google Cloud.
Learn aboutWindows on Compute Engine.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-02-05 UTC.