Agrega una licencia de SQL Server a un servidor de Linux existente
Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
Linux
Compute Engine te permite instalar instancias de SQL Server en máquinas virtuales (VM) de Linux y usar licencias prepagas (PAYG). En este documento, se describe cómo usar SQL Server en una VM de Linux mediante las siguientes acciones:
Después de agregar una string de licencia al disco de arranque de la VM de Linux, se te facturará de acuerdo con los precios de las imágenes de SQL Server.
Limitaciones
Solo puedes instalar SQL Server en las siguientes distribuciones de Linux:
Red Hat Enterprise Linux (RHEL)
SUSE Linux Enterprise Server (SLES)
Ubuntu
Agrega una licencia de SQL Server a un Linux Server
Los metadatos de licencia de SQL Server en un disco de arranque permiten que Google Cloud realice un seguimiento, informe y facture con precisión sobre el uso de la licencia de SQL Server. Estos metadatos son obligatorios cuando se usan licencias de PAYG SQL Server. Agrega una licencia de SQL Server a un disco de arranque existente mediante el siguiente procedimiento:
Identifica la licencia que deseas agregar a una VM. Para SQL Server, la licencia debe coincidir con la versión y la edición que deseas ejecutar. Para obtener la lista de strings de licencia de SQL Server válidas, consulta la pestaña Strings de licencia en el documento Detalles del sistema operativo de SQL Server.
Detén la VM:
gcloud compute instances stop VM_NAME
Reemplaza VM_NAME por el nombre de la VM que debe detenerse.
Identifica el disco de arranque:
gcloud compute instances describe VM_NAME
Reemplaza VM_NAME por el nombre de la VM.
Verifica que el resultado sea similar al siguiente:
[[["Fácil de comprender","easyToUnderstand","thumb-up"],["Resolvió mi problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Información o código de muestra incorrectos","incorrectInformationOrSampleCode","thumb-down"],["Faltan la información o los ejemplos que necesito","missingTheInformationSamplesINeed","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-09-04 (UTC)"],[[["\u003cp\u003eCompute Engine allows you to install SQL Server on Linux virtual machines (VMs) with pay-as-you-go (PAYG) licensing.\u003c/p\u003e\n"],["\u003cp\u003eAdding SQL Server license metadata to a Linux VM's boot disk is necessary for accurate billing and license usage tracking.\u003c/p\u003e\n"],["\u003cp\u003eYou can only install SQL Server on Linux distributions such as Red Hat Enterprise Linux (RHEL), SUSE Linux Enterprise Server (SLES), and Ubuntu.\u003c/p\u003e\n"],["\u003cp\u003eThe process to add a SQL Server license involves stopping the VM, detaching the boot disk, cloning it with the license, attaching the new disk as the boot disk, and restarting the VM.\u003c/p\u003e\n"],["\u003cp\u003eOnce a license is added to a VM, it cannot be removed, and billing for SQL Server images is based on the set pricing structure.\u003c/p\u003e\n"]]],[],null,["# Add a SQL Server license to an existing Linux server\n\nLinux\n\n*** ** * ** ***\n\nCompute Engine lets you install SQL Server on Linux virtual machines (VM)\ninstances and use pay-as-you-go (PAYG) licenses. This document describes how to\nuse SQL Server on a Linux VM by doing the following:\n\n1. [Add SQL Server license metadata to a boot disk](#add-sql-server-license)\n2. [Install SQL Server on Linux](#install-sql-server-on-linux)\n\nBilling\n-------\n\nAfter adding a license string to the Linux VM's boot disk, you are billed\naccording to the pricing of [SQL Server images](/compute/disks-image-pricing#sql_server_pricing).\n\nLimitations\n-----------\n\n- You can only install SQL Server on the following Linux distributions:\n\n - Red Hat Enterprise Linux (RHEL)\n - SUSE Linux Enterprise Server (SLES)\n - Ubuntu\n\nAdd a SQL Server license to a Linux Server\n------------------------------------------\n\nSQL Server license metadata on a boot disk allows Google Cloud to accurately\ntrack, bill, and report on SQL Server license usage. This metadata is required\nwhen using PAYG SQL Server licenses. Add a SQL Server license to an existing boot\ndisk using the following procedure:\n| **Caution:** After you add a license to a VM, you cannot remove the license from the VM.\n\n1. Identify the license you want to add to a VM. For SQL Server, the\n license needs to match both the version and edition you want to run. For the\n list of valid SQL Server license strings, see the **License strings** tab in\n the [operating system details for SQL Server](/compute/docs/images/os-details#sql_server)\n document.\n\n2. Stop the VM:\n\n ```\n gcloud compute instances stop VM_NAME\n ```\n\n Replace \u003cvar translate=\"no\"\u003eVM_NAME\u003c/var\u003e with the name of the VM instance to\n stop.\n3. Identify the boot disk:\n\n ```\n gcloud compute instances describe VM_NAME\n ```\n\n Replace \u003cvar translate=\"no\"\u003eVM_NAME\u003c/var\u003e with the name of the VM.\n4. Verify that the output is similar to the following:\n\n disks:\n - autoDelete: true\n boot: true\n deviceName: \u003cvar translate=\"no\"\u003eBOOT_DISK_NAME\u003c/var\u003e\n diskSizeGb: '20'\n guestOsFeatures:\n - type: UEFI_COMPATIBLE\n index: 0\n interface: SCSI\n kind: compute#attachedDisk\n licenses:\n - \u003cvar translate=\"no\"\u003eBOOT_DISK_LICENSE_STRING\u003c/var\u003e\n mode: READ_WRITE\n source: https://www.googleapis.com/compute/v1/projects/\u003cvar translate=\"no\"\u003ePROJECT_NAME\u003c/var\u003e/zones/\u003cvar translate=\"no\"\u003eZONE\u003c/var\u003e/disks/\u003cvar translate=\"no\"\u003eBOOT_DISK_NAME\u003c/var\u003e\n type: PERSISTENT\n\n5. Detach the boot disk:\n\n ```\n gcloud compute instances detach-disk VM_NAME --disk=BOOT_DISK_NAME\n ```\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003eVM_NAME\u003c/var\u003e: the name of the VM\n - \u003cvar translate=\"no\"\u003eBOOT_DISK_NAME\u003c/var\u003e: the name of the boot disk\n6. Clone the boot disk and add the additional license:\n\n ```\n gcloud compute disks create CLONED_BOOT_DISK_NAME \\\n --licenses=SQL_SERVER_LICENSE \\\n --source-disk=BOOT_DISK_NAME \\\n --source-disk-zone=BOOT_DISK_ZONE \\\n --zone=CLONED_BOOT_DISK_ZONE\n ```\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003eCLONED_BOOT_DISK_NAME\u003c/var\u003e: the name you want to give the cloned book disk\n - \u003cvar translate=\"no\"\u003eSQL_SERVER_LICENSE\u003c/var\u003e: the SQL Server license you want to add to the boot disk\n - \u003cvar translate=\"no\"\u003eBOOT_DISK_NAME\u003c/var\u003e: the name of the source boot disk that you want to clone\n - \u003cvar translate=\"no\"\u003eBOOT_DISK_ZONE\u003c/var\u003e: the zone of the source boot disk\n - \u003cvar translate=\"no\"\u003eCLONED_BOOT_DISK_ZONE\u003c/var\u003e: the zone in which you want to create the cloned boot disk\n7. Verify that the new disk has the correct license:\n\n ```\n gcloud compute disks describe CLONED_BOOT_DISK_NAME \\\n --zone=CLONED_BOOT_DISK_ZONE\n ```\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003eCLONED_BOOT_DISK_NAME\u003c/var\u003e: the name of the cloned book disk\n - \u003cvar translate=\"no\"\u003eCLONED_BOOT_DISK_ZONE\u003c/var\u003e: the zone of the cloned boot disk\n8. Attach the new disk as the boot disk for the VM instance:\n\n ```\n gcloud compute instances attach-disk VM_NAME \\\n --disk=CLONED_BOOT_DISK_NAME\n --boot\n ```\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003eVM_NAME\u003c/var\u003e: the name of the VM instance to which you want to attach the cloned boot disk\n - \u003cvar translate=\"no\"\u003eCLONED_BOOT_DISK_NAME\u003c/var\u003e: the name of the cloned book disk\n9. Verify that the VM's boot disk is the new cloned disk with SQL Server\n licensing.\n\n ```\n gcloud compute instances describe VM_NAME\n ```\n\n Replace \u003cvar translate=\"no\"\u003eVM_NAME\u003c/var\u003e with the name of the VM.\n10. Start the VM instance.\n\n ```\n gcloud compute instances start VM_NAME\n ```\n\n Replace \u003cvar translate=\"no\"\u003eVM_NAME\u003c/var\u003e with the name of the VM.\n11. (Optional) When you are sure that you don't want to revert back to the earlier\n boot disk, you can delete the disk.\n\n ```\n gcloud compute disks delete BOOT_DISK_NAME \\\n --zone=BOOT_DISK_ZONE\n ```\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003eBOOT_DISK_NAME\u003c/var\u003e: the name of the boot disk that you want to delete\n - \u003cvar translate=\"no\"\u003eBOOT_DISK_ZONE\u003c/var\u003e: the zone of the boot disk\n\nInstall SQL Server on Linux\n---------------------------\n\nFor guidance on installing, updating, and uninstalling SQL Server on Linux, see [Installation guidance for SQL Server on Linux](https://learn.microsoft.com/en-us/sql/linux/sql-server-linux-setup?view=sql-server-ver16).\n\nWhat's next\n-----------\n\n- [Learn about licenses](/compute/docs/licenses/about)\n\n- [View the SQL Server tutorials](/compute/docs/tutorials#sql-server)\n\n- [View the supported editions of SQL Server](/compute/docs/images/os-details#sql_server)"]]