Technical Overview and Setup for VM Solutions

This page outlines how to create the key technical components required for distributing your solution with Google Cloud Marketplace. Most of our partners develop a standard solution that uses a single virtual machine instance. For others, a custom solution that uses Google Cloud Deployment Manager templates is a better path. The following section describes the differences between a standard and custom solution, and outlines the integration process for both development paths. In either case, after you decide whether to develop a standard or custom solution, your first step is to complete the setup tasks described on this page.

If you have questions during the onboarding process, talk to your GCP Marketplace Partner Engineer. If you don't know who your assigned Partner Engineer is, contact us at

Before you begin

Difference between standard and custom solutions

Use the standard solution if you need only a single instance deployment with no additional resources (such as attached disks and new networks). For this solution, deployment input options are also standardized.

Custom solutions have additional requirements involving creating and configuring Google Cloud Platform resources. You can use custom-built Deployment Manager templates to meet these requirements. For custom solutions, deployment inputs are also customizable. You'll be able to build Deployment Manager templates to create and test your solution deployments before uploading the Deployment Manager templates with Partner Portal.

For more information about standard and custom solutions, see the following topics:

Initial setup explained

This section describes how to setup and configure your workspace. The instructions on the remainder of this page apply to all solutions.

Open source compliance

Products that include open source software need to comply with Google’s open source compliance practices listed below. Many Googlers are also open source contributors or maintainers, so we're especially sensitive to treating the community with respect. We have found that the easiest and fastest way for vendors to ensure open source compliance for most libraries is to include the full source code and license text on the image directly.

  • If you're not installing an open source component but merely using what is pre-installed on the Google Compute Engine supported OS image, you do not need to provide the source code or license text for this component.
  • If you're installing an open source component that is under a GPL or LGPL license, then you must install the license text along with the source code on the instance image.
  • If you're installing an open source component, on top of the Google Compute Engine supported OS image, AND the component license is one of the whitelisted licenses (MIT, BSD, and Apache or other), then you must provide only the license text file on the instance image along with list of components.
  • Do not use AGPL license components.

Complete the open source compliance requirements

Use this template to complete this step of the process. Once completed, upload the sheet URL through your Partner Portal solution draft in the Open Source Compliance section.

Create your workspace

Create two projects in the GCP Console. One will be used as a scratchpad for development and testing, and the other will be used as a public project to host your final components. For information about creating projects, see Creating and Managing Google Cloud Platform Projects.

Use the following format when creating an ID for your project:

  • Scratchpad Project ID format (for development): <partner_name>-dev
  • Public Project ID format (for final components): <partner_name>-public

After you have created the project, grant the Project Viewer role to For steps to grant access to your project, see Granting, changing and revoking access to resources.

While you are creating your solution, if you need help debugging your project, such as troubleshooting VM images, grant the Project Editor role to

Configure Google access

Configure your project so that your Google Partner Engineer has edit-level access. For information about adding project members and managing their access, see Adding Project Team Members in the Google Compute Engine documentation.

Enable required APIs

Enable the Google Compute Engine API for your projects. For information about enabling APIs, see Enable and disable APIs in the Google Cloud Platform Console Help.

Partner Details

To enable Partner Portal and set up billing, we need to collect some details about your organization. Complete the project info form.

Pricing Model

GCP Marketplace offers two different pricing models for VM based solutions: usage-based or "bring your own license" (BYOL).

Usage based pricing

For usage based pricing, you select one of the following options:

  • Fixed pricing: Charge a single hourly rate for your solution. Customers are charged based on the length of time the solution is used, in increments of minutes.

  • Resource-based pricing: Charge a rate based on the resources in the solution. Depending on their workloads, users can choose the number of vCPUs and the RAM that they can add to their VMs. For solutions with heavy computation needs, users can also add GPUs to their VMs.

    You can charge by the number of vCPUs, size of the system's memory, number of GPUs, or a combination of these options.

    If you choose resource-based pricing, for each type of resource, choose one of the following models:

    • Flat rate: Set a per-unit price for resources. For example, you can set a price for every vCPU used in the solution.
    • Tiered: Set a price by tiers. For example, you can set one price for 1 to 5 vCPUs, another for 6 to 10 vCPUs, and so on.

Google bills users on a monthly basis for software and infrastructure use.

Google takes care of these tasks:

  • Monitoring the usage of partner solutions from GCP Marketplace
  • Calculating the amount customers should be charged (based on pricing set by partners)
  • Billing customers (unified with other GCP charges), collecting payments, handling refunds
  • Remitting payments to partners. Full details are available here.

Trial software

If you want to offer a trial of your software to GCP users, contact your Partner Engineer with the following information:

  • The trial period, for example, 30 days.
  • The maximum credit, in USD, that the trial is limited to.

The trial ends when the credit limit is reached, or at the end of the trial period, whichever comes first. For example, if you offer a 15-day trial with a maximum credit of $100, the trial ends when users reach the $100 limit, or at the end of 15 days.

We recommend a credit limit that is twice the cost of running your solution on your recommended configuration.

Bring your own license (BYOL)

You have the option to bill customers yourself, instead of Google. If you prefer to bill customers, then you need to provide a way for customers to get a software license, either from your website or by contacting your sales rep. GCP Marketplace asks customers to get your license ID before deploying a BYOL solution. After the deployment, you are responsible for validating the license ID entered by the customer.

Google will bill the customer independently for infrastructure usage costs of running the solution.

Let us know you're set up!

Send an email to your Google Partner Engineer with the following information:

  • Your project details (project names, project IDs, and project numbers). For help finding this information, see Locate the project ID and project number in the Google Cloud Platform Console Help.

  • The number of solutions you want to list in GCP Marketplace.

  • The Linux base OS image you want to use for your solutions. To see the complete list of images, see the Images page in the Cloud Console.

    Go to the Images page

  • An architecture diagram and a description of your solution showing us firewall rules, interactions with other Google resources like Google Cloud Storage, external resource interactions, and so on.

Build your VM image

This section helps you create a public machine image for your product to run on Google Compute Engine. An image contains a boot loader, an operating system, and a root file system that is necessary for starting an instance. You can configure the image with a set of applications and services for your solution. The image is used by customers to launch a virtual machine instance in the cloud. We recommend you start with creating an image in your development project and then move it to your public project after your Google Partner Engineer has verified the image.

Setup to create an image

  1. Download the Google Cloud SDK.

Create the base solution VM

To create a custom machine image for GCP Marketplace, you need to complete these steps (described in the sections that follow):

  • Use one of Google's supported base OS images to create a VM and install your application-specific packages and configs.
  • Install scripts to retrieve the application user credentials, if necessary.
  • Install the open source component's license text and source code to comply with Google open source requirements.

Create a licensed VM image

  1. Use gcloud to set defaults for the Google Cloud SDK:

    gcloud config set project <project_id>
    gcloud config set compute/zone <zone>
  2. Create a master instance that will be used to install your software, and later, converted to an image to use on GCP Marketplace. For more information about Create Instance and other options, see Creating and Starting an Instance.

    gcloud compute instances create ${INSTANCE} --scopes 
  3. Install and customize the software. Include any startup scripts required. For example creating auth credentials using autogenerated password.

  4. Add open source license text files and source code on the VM (if applicable). Refer to the open source compliance document for requirements.

    When you've created and customized the master instance, prepare the disk which is needed to create a VM image.

  5. Clean up your disk. Creating a VM image directly from your VM will also transfer your user directories and SSH keys eventually into a user's VM, which is not desirable. Therefore, you need to clean the disk that is used as an input for VM image creation. To clean the disk:

    1. In the Compute Engine > VM Instances menu, click the name of the instance you want to clean up, and then click Edit.

    2. Scroll down and uncheck Delete boot disk when instance is deleted and click Save. You'll need the disk to create the image.

    3. Delete the VM while preserving the disk. You will be prompted to confirm the deletion. Do not select Also delete book disk.

    4. Next, you need to create a new VM Instance. Expand the Management, disk, networking, SSH keys options.

    5. Under disk, attach the disk from your previous instance as an additional data disk. Ensure that Keep disk is selected for When deleting instance.

      You can now SSH into the instance and remove any home directories or other temporary files created during the software installation process. You will need to mount the data disk before you can access it. For more information on mounting disks, see Adding or Resizing Persistent Disks.

    6. When you're done, shutdown and delete the instance while preserving your updated data disk. Now you can create a VM image by completing the following steps.

  6. Create your solution listing in Partner Portal, using the steps described in Create a new solution. Get the license name for your solution using these steps:

    1. To edit the solution, click the solution ID.

    2. Edit the Solution Metadata.

    3. In the solution metadata, in the Licensing & Pricing section, under License name, note your license name. You use this license name later, when you use gcloud to create your image.

  7. Create a licensed image by running the following gcloud command:

    gcloud compute images create CREATE_IMAGE_NAME \
     --project PUBLIC_PROJECT_NAME \
     --source-disk projects/DEV_PROJECT_NAME/zones/SOURCE_DISK_ZONE/disks/SOURCE_DISK_NAME \
     --licenses projects/PUBLIC_PROJECT_NAME/global/licenses/LICENSE_NAME \
     --description ADD_DESCRIPTION

Make the image public

You must make your image publicly available, so that your customers can deploy it to their Compute Engine instances. To make the image public, use the GCP Console, or the gcloud command-line tool:


  1. In your public project, under Compute Engine, go to the Images page.

    Go to the Images page

  2. Select your image, as shown below:

  3. If you don't see an info panel on the top-right, click Show Info Panel.

  4. In the info panel, in the Add Members field, enter allAuthenticatedUsers, and from the Select a role menu, select Compute Image User.

  5. Click Add to make your image public.

Command Line

Use the following gcloud beta command in Cloud Shell, or on your local machine:

gcloud beta compute images add-iam-policy-binding IMAGE_NAME --member=allAuthenticatedUsers --role=roles/compute.imageUser

Test the VM image

Create a virtual machine instance with your newly created image and verify the functionality.

Also, to verify the license ID, SSH into the instance and verify that valid licenses are attached:

curl -s -H "Metadata-Flavor: Google"

Verify that Python 2.6 or greater is installed.

python -V

Verify that the following packages are installed.

gcloud --version
gsutil --version
ssh -V
ps aux | grep sshd
curl -V
ps aux | grep dhcp

Check to ensure there are no other user directories installed on the instance except your own and there aren't any remaining user directories and credentials other than your own.

Setting and retrieving application user credentials

The username and password key values can be set in the solution’s metadata and read during instance or application startup using the following format.

"adminPasswordSourceMetadata": "<solution>_user_password", "adminUser": "user",

If your solution requires a login, then be sure to complete these fields in Partner Portal, under Edit deployment package.

The password is auto-generated by the GCP Marketplace and can be accessed from the instance using the following command:

curl -H "Metadata-Flavor: Google"<solution>_user_password

Creating your solution

This section describes the steps to create a GCP Marketplace solution using Partner Portal.

You must first create Deployment Manager templates for the solution's deployment package. We recommend using the open source deploymentmanager-autogen tool to generate Deployment Manager templates. With Autogen, your deployment package includes the following capabilities:

  • Quota checks for CPUs and GPUs, so that users cannot deploy your solution if they exceed the quota requirements.
  • Dynamic price updates in the Deployment Manager page.
  • Prevents users from choosing GPUs that are not available in the zone that they choose.

You can create either a standard solution, which typically has a single VM and basic resources such as disks, or a custom solution, which might include multiple VMs, load balancers, and so on. The user's view of deploying a standard solution is described in Deployment flow for Google Cloud Marketplace Standard Solutions.

Before you begin

Create a new solution in Partner Portal

The direct link to Partner Portal is:

Link to your
Partner Portal, on the GCP Marketplace page

If you don't see the link or cannot access the URL, verify that you have the correct project selected. If you still cannot access the URL, contact

  1. Click Add solution at the top of the page.

  2. Name your solution and check the solution ID.

  3. Select a pricing model:

    • For a usage-based pricing model:

      • Solution Type: VM Deployment
      • Pricing Type: Billed by Google
    • For a BYOL pricing model:

      • Solution Type: VM Deployment
      • Pricing Type: Billed by Partner

    Selecting a solution type and pricing model

  4. To create the solution, click Create.

Add marketing information and documentation

  1. To edit the solution, click the solution ID.

    Click your solution ID

  2. Complete the Solution Details and Documentation & Support sections.

Set up pricing for your solution

If you selected usage-based pricing billed by Google, you must set up a pricing model for your solution. You select your pricing in US dollars, and it is automatically converted to your customers' preferred currency.

While you are editing the pricing for your solution, you see a preview of your solution's page as it is shown to your customers. The estimated cost of your solution is updated before your solution goes live.

  1. Edit the Pricing section.

    Edit the Pricing section

  2. To charge a fixed hourly rate, select Fixed price, and type the hourly rate.

  3. To charge a rate based on the resources used for the solution, select Resource-based pricing. You can charge based on the number of vCPUs, GPUs, memory used in the deployment, or a combination of resources. To select the resources you want to set a price by, follow these steps:

    1. To add a resource to set the price by, click Add another.
    2. To edit the pricing for the resource, click Edit Edit pricing button.
    3. In the Price By section, select the resource that you want to set your price by. For example, if you are setting your price by vCPUs, select CPU.
    4. To set a flat rate for every resource, select Flat per-unit cost, and type the rate.
    5. To set up pricing tiers, select Tiered rates, and click Add tier to add pricing tiers.
    6. To save your changes, click Save.
    7. If you want to add another resource to your pricing, repeat these steps.
  4. To save your pricing model, click Save.

Upload a deployment package

If you created a deployment package using the deploymentmanager-autogen tool, or from scratch using Deployment Manager templates, you must upload the deployment package that you created for the solution.

  1. Select Upload a package.

  2. Upload your ZIP file, then click Done to validate. If there are any errors in the package you uploaded, correct them and re-upload the package.

Preview and test your solution

To see how users will experience your solution, preview and test the solution. The preview walks you through the process of viewing and deploying your solution, as a customer would see it.

To preview and test your solution, click Preview & test. By default, this previews the solution in your public project, which fails due to quota limitations in your public project. You can resolve this by modifying the project parameter in the URL, and changing it from your public project to your development project.

Default URL:

Modify the URL to:

After you have successfully deployed your solution and verified that it behaves as you'd expect, you can exit your preview. To delete the preview deployment, open the Deployment Manager page and delete the deployment. Then, return to Partner Portal.

Move your image to your public project

Before launching your solution, move your image to your public project

Execute the following command:

gcloud compute images create --project PROD_PROJECT --source-disk DISK_NAME --source-disk-zone us-central1-a --description IMAGE_DESCRIPTION

Update the solution with the new VM image created in the public project.

Testing guidelines

For information about testing your VM solution, see GCP Marketplace VM testing guidelines.

Submit your solution

Now you can submit your solution! This starts automatic validation and notifies your contact at Google that your submission is ready for review!

If you find a mistake in your solution or your contact at Google requests changes, you can always cancel your submission, make changes, and then submit again.

Integrating support with your solution

If you want to verify support eligibility for customers who have purchased support through Google, a subscriptions API is available.

To integrate with the subscriptions API, Google provides you with a key that you can use to verify a user’s support eligibility as part of the sign-up process. You verify the user's eligibility by periodically passing the key to poll the user's status.

For information about this integration, see Support Integration.

Оцените, насколько информация на этой странице была вам полезна:

Оставить отзыв о...

Текущей странице
GCP Marketplace