Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
En este documento, se incluyen instrucciones para reemplazar un disco de arranque en Google Distributed Cloud (GDC) aislado. Si necesitas crear un disco de arranque antes de reemplazar el disco, consulta la página Crea un disco de arranque.
Puedes desconectar los discos de arranque de tu instancia de máquina virtual (VM) y adjuntar discos de arranque nuevos. Para reparar los discos de arranque, los activas en otra instancia de VM sin borrar la original. Además, en lugar de volver a crear una instancia de VM completa, puedes reemplazar sus discos de arranque.
Antes de comenzar
Para usar los comandos de la interfaz de línea de comandos (CLI) de gdcloud, asegúrate de haber descargado, instalado y configurado la CLI de gdcloud.
Todos los comandos de Distributed Cloud usan la CLI de gdcloud o kubectl y requieren un entorno de sistema operativo (SO).
Obtén la ruta de acceso del archivo kubeconfig
Para ejecutar comandos en el servidor de la API de Management, asegúrate de tener los siguientes recursos:
Accede y genera el archivo kubeconfig para el servidor de la API de Management si no tienes uno.
Usa la ruta de acceso al archivo kubeconfig del servidor de la API de administración para reemplazar MANAGEMENT_API_SERVER en estas instrucciones.
Obtener acceso a los discos de la VM Sigue los pasos para verificar que tienes el rol de administrador de VM del proyecto requerido.
Restricciones
Tienes las siguientes restricciones cuando reemplazas un disco de arranque:
[[["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\u003eThis document provides instructions for replacing a boot disk in Google Distributed Cloud (GDC) air-gapped environments, offering an alternative to recreating an entire VM instance.\u003c/p\u003e\n"],["\u003cp\u003eBoot disks can only be attached or detached from a stopped VM instance, and only one boot disk can be attached to a VM at a time, which can be a new or pre-existing bootable disk.\u003c/p\u003e\n"],["\u003cp\u003eYou can replace a boot disk using either the GDC console or the \u003ccode\u003ekubectl\u003c/code\u003e CLI, and both methods require stopping the VM instance before the replacement.\u003c/p\u003e\n"],["\u003cp\u003eWhen replacing a boot disk, you have the option to provision a new boot disk with a customizable name, size, image, deletion rule, and storage profile, or you can choose an existing boot disk.\u003c/p\u003e\n"],["\u003cp\u003eBefore doing any replacement, ensure you have downloaded, installed, and configured the \u003ccode\u003egdcloud\u003c/code\u003e CLI, and you have access to the kubeconfig file of the management API server.\u003c/p\u003e\n"]]],[],null,["# Replace a boot disk\n\nThis document contains instructions to replace a boot disk in\nGoogle Distributed Cloud (GDC) air-gapped. If you need to\ncreate a boot disk before your replacement, see the\n[Create a boot disk](/distributed-cloud/hosted/docs/latest/gdch/application/ao-user/vms/manage-vm-boot-disks/create-customized-boot-disk)\npage.\n\nYou can detach boot disks from your virtual machine (VM) instance and attach new\nboot disks to it. To repair boot disks, you mount them to another VM instance\nwithout deleting the original one. Also, instead of recreating an entire VM\ninstance, you can replace its boot disks.\n| **Note:** If you try to start a VM instance without a boot disk, you get an error, but you can edit other instance properties.\n\nBefore you begin\n----------------\n\nTo use `gdcloud` command-line interface (CLI) commands, ensure that you have downloaded, installed,\nand configured the [`gdcloud` CLI](/distributed-cloud/hosted/docs/latest/gdch/resources/gdcloud-overview).\nAll commands for Distributed Cloud use the `gdcloud` or\n`kubectl` CLI, and require an operating system (OS) environment.\n\n### Get the kubeconfig file path\n\nTo run commands against the Management API server, ensure you have the following\nresources:\n\n1. [Sign in and generate](/distributed-cloud/hosted/docs/latest/gdch/application/ao-user/iam/sign-in#cli) the\n kubeconfig file for the Management API server if you don't have one.\n\n2. Use the path to the kubeconfig file of the Management API server to replace\n \u003cvar translate=\"no\"\u003eMANAGEMENT_API_SERVER\u003c/var\u003e in these instructions.\n\n3. Obtain access to VM disks. Follow the steps to\n [verify](/distributed-cloud/hosted/docs/latest/gdch/application/ao-user/vms/preparation#verify-user-access)\n that you have the required Project VM Admin role.\n\nRestrictions\n------------\n\nYou have the following restrictions when replacing a boot disk:\n\n- Attach or detach a boot disk only from a [stopped VM instance](/distributed-cloud/hosted/docs/latest/gdch/application/ao-user/vms/manage-vms/operations-and-lifecycle/start-and-stop-vm#stop-a-vm).\n- Attach only one boot disk for each VM instance.\n- Attach only existing boot disks to a VM instance.\n- Replace the boot disk only with a new bootable disk.\n\nReplace a boot disk\n-------------------\n\nReplace a boot disk by using the GDC console or the `kubectl` CLI. \n\n### Console\n\n1. In the navigation menu, click **Virtual Machines \\\u003e Instances**.\n\n2. In the list of VMs, click a VM name to view its details.\n\n3. Click **Replace boot disk**.\n\n4. In the confirmation dialog, click **Stop** to stop the VM.\n\n5. Wait a few minutes for the VM to stop.\n\n6. Click **Refresh**.\n\n7. When the VM is in a stopped state, click **Replace boot disk** again.\n\n8. In the Replace boot disk dialog, choose a new boot disk or an\n existing boot disk.\n\n - To provision a new boot disk, click the **New boot disk** tab.\n\n 1. In the **Disk name** field, enter a new disk name that is unique to the project.\n 2. In the **Size** field, enter a disk size between 12 and 65536 GiB.\n 3. In the **Image name** list, select an image.\n 4. In the Deletion rule section, click **Keep disk** or **Delete disk**.\n 5. In the **Storage profile** section, choose a profile. The default profile is **Standard**.\n - To choose an existing boot disk, click the **Existing boot disk** tab.\n\n 1. In the **Disk** list, select a disk.\n 2. In the Deletion rule section, click **Keep disk** or **Delete disk**.\n9. Click **Save**.\n\n10. [Restart the VM](/distributed-cloud/hosted/docs/latest/gdch/application/ao-user/vms/manage-vms/operations-and-lifecycle/start-and-stop-vm#restart-a-vm).\n\n### kubectl\n\n1. [Stop the VM instance](/distributed-cloud/hosted/docs/latest/gdch/application/ao-user/vms/manage-vms/operations-and-lifecycle/start-and-stop-vm#stop-a-vm).\n\n | **Note:** You don't need to unmount the disk.\n2. Open the current `spec.disks` value to change it for the new virtual machine\n disk:\n\n kubectl --kubeconfig \u003cvar translate=\"no\"\u003eMANAGEMENT_API_SERVER\u003c/var\u003e edit virtualmachines.virtualmachine.gdc.goog --namespace \u003cvar translate=\"no\"\u003ePROJECT\u003c/var\u003e \u003cvar translate=\"no\"\u003eVM_NAME\u003c/var\u003e\n\n Replace the following values:\n - \u003cvar translate=\"no\"\u003eMANAGEMENT_API_SERVER\u003c/var\u003e with the path to the kubeconfig file of the Management API server.\n - \u003cvar translate=\"no\"\u003ePROJECT\u003c/var\u003e with the Distributed Cloud project where you want to replace the boot disk.\n - \u003cvar translate=\"no\"\u003eVM_NAME\u003c/var\u003e with the name of the virtual machine.\n3. Modify the boot disk in the config file by replacing\n \u003cvar translate=\"no\"\u003eVM_BOOT_DISK_NAME\u003c/var\u003e with the new VM boot disk name:\n\n disks:\n - virtualMachineDiskRef:\n name: \u003cvar translate=\"no\"\u003eVM_BOOT_DISK_NAME\u003c/var\u003e\n boot: true\n\n The result must look like the following example: \n\n disks:\n - virtualMachineDiskRef: \n name: NEW_VM_BOOT_DISK_NAME\n boot: true\n\n4. [Restart the VM](/distributed-cloud/hosted/docs/latest/gdch/application/ao-user/vms/manage-vms/operations-and-lifecycle/start-and-stop-vm#restart-a-vm)."]]