Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
Si borras una máquina virtual (VM), esta se quita junto con los recursos asociados de tu proyecto. Si no quieres borrar una instancia, puedes detenerla temporalmente. Consulta Inicia y detén una VM para obtener esas instrucciones.
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 para el dispositivo aislado de GDC 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:
Ubica el nombre del servidor de la API de Management o pregúntale a tu administrador de la plataforma (PA) cuál es el nombre del servidor.
Accede y genera el archivo kubeconfig para el servidor de la API de Management si no tienes uno.
Usa la ruta de acceso para reemplazar MANAGEMENT_API_SERVER{"</var>"}} en estas instrucciones.
Solicita permisos y acceso
Para realizar las tareas que se indican en esta página, debes tener el rol de administrador de la VM del proyecto. Sigue los pasos para verificar o para que el administrador de IAM del proyecto te asigne el rol de administrador de máquinas virtuales del proyecto (project-vm-admin) en el espacio de nombres del proyecto en el que reside la VM.
Para las operaciones de VM con la consola de GDC o la CLI de gdcloud, solicita a tu administrador de IAM del proyecto que te asigne el rol de administrador de máquinas virtuales del proyecto y el rol de visualizador del proyecto (project-viewer).
Borra una VM
Borra una VM con la consola de GDC o kubectl. La VM no debe estar en un estado de finalización o desconocido.
Console
En el menú de navegación, haz clic en Virtual Machines > Instances.
En la lista de VMs, selecciona la casilla de verificación de la VM que deseas borrar.
Haz clic en Borrar.
En el diálogo de confirmación, haz clic en Borrar.
[[["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\u003eDeleting a virtual machine (VM) permanently removes it and its resources from your project, as opposed to temporarily stopping it.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003egdcloud\u003c/code\u003e CLI must be downloaded, installed, and configured to use its commands for managing VMs on the GDC air-gapped appliance.\u003c/p\u003e\n"],["\u003cp\u003eVMs can be deleted via the GDC console, by selecting the VM from the list and confirming deletion, or via the \u003ccode\u003egdcloud\u003c/code\u003e command-line tool by using \u003ccode\u003egdcloud compute instances delete VM_NAME --project PROJECT\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eVMs can be deleted using the \u003ccode\u003ekubectl\u003c/code\u003e command-line tool by using the command: \u003ccode\u003ekubectl --kubeconfig ADMIN_KUBECONFIG delete virtualmachines.virtualmachine.gdc.goog VM_NAME -n NAMESPACE_NAME\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eYou can verify a VM has been deleted by using \u003ccode\u003ekubectl --kubeconfig ADMIN_KUBECONFIG get virtualmachines.virtualmachine.gdc.goog VM_NAME -n PROJECT\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Delete VMs\n\nDeleting a virtual machine (VM) removes the VM and its associated resources from\nyour project. If you don't want to delete an instance, you can temporarily stop\nit. See [Stop and start a VM](/distributed-cloud/hosted/docs/latest/appliance/application/ao-user/vms/manage-vms/operations-and-lifecycle/start-and-stop-vm) for those instructions.\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/appliance/resources/gdcloud-overview).\nAll commands for GDC air-gapped appliance 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. Locate the Management API server name, or ask your Platform Administrator (PA)\n what the server name is.\n\n2. [Sign in and generate](/distributed-cloud/hosted/docs/latest/appliance/application/ao-user/iam/sign-in#cli) the\n kubeconfig file for the Management API server if you don't have one.\n\n3. Use the path to replace \u003cvar translate=\"no\"\u003eMANAGEMENT_API_SERVER{\"</var>\"}}\u003c/var\u003e in these instructions.\n\n### Request permissions and access\n\nTo perform the tasks listed in this page, you must have the Project\nVirtualMachine Admin role. Follow the steps to either\n[verify](/distributed-cloud/hosted/docs/latest/appliance/application/ao-user/vms/preparation#verify-user-access)\nor have your Project IAM Admin\n[assign](/distributed-cloud/hosted/docs/latest/appliance/application/ao-user/vms/preparation#grant-user-access-vm-resources)\nyou the Project VirtualMachine Admin (`project-vm-admin`) role in the namespace\nof the project where the VM resides.\n\nFor VM operations using the GDC console or the gdcloud CLI,\nrequest your Project IAM Admin to assign you both the\nProject VirtualMachine Admin role and the Project Viewer (`project-viewer`)\nrole.\n\nDelete a VM\n-----------\n\nDelete a VM by using the GDC console or `kubectl`. The VM must not be\nin a terminating or unknown state. \n\n### Console\n\n1. In the navigation menu, click **Virtual Machines \\\u003e Instances**.\n\n2. In the list of VMs, select the checkbox for the VM that you want to delete.\n\n3. Click **Delete**.\n\n4. In the confirmation dialog, click **Delete**.\n\n### gdcloud\n\nTo delete a VM: \n\n gdcloud compute instances delete \u003cvar translate=\"no\"\u003eVM_NAME\u003c/var\u003e --project \u003cvar translate=\"no\"\u003ePROJECT\u003c/var\u003e\n\n- Replace \u003cvar translate=\"no\"\u003eVM_NAME\u003c/var\u003e with the name of the VM.\n- Replace \u003cvar translate=\"no\"\u003ePROJECT\u003c/var\u003e with the name of the GDC project in which the VM lives.\n\n### kubectl\n\n1. Delete the VM:\n\n kubectl --kubeconfig \u003cvar translate=\"no\"\u003eMANAGEMENT_API_SERVER\u003c/var\u003e delete virtualmachines.virtualmachine.gdc.goog \u003cvar translate=\"no\"\u003eVM_NAME\u003c/var\u003e -n \u003cvar translate=\"no\"\u003eNAMESPACE_NAME\u003c/var\u003e\n\n2. Replace \u003cvar translate=\"no\"\u003eVM_NAME\u003c/var\u003e and \u003cvar translate=\"no\"\u003eNAMESPACE_NAME\u003c/var\u003e\n with the name and namespace, respectively, of the VM.\n\n3. Verify that you've deleted the VM:\n\n kubectl --kubeconfig \u003cvar translate=\"no\"\u003eMANAGEMENT_API_SERVER\u003c/var\u003e get virtualmachines.virtualmachine.gdc.goog \u003cvar translate=\"no\"\u003eVM_NAME\u003c/var\u003e -n \u003cvar translate=\"no\"\u003ePROJECT\u003c/var\u003e\n\n Replace \u003cvar translate=\"no\"\u003e\u003ccode translate=\"no\" dir=\"ltr\"\u003ePROJECT\u003c/code\u003e\u003c/var\u003e with the VM project name."]]