Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
Puedes aumentar el tamaño de la partición del disco de tu máquina virtual (VM) cuando la instancia de VM requiere espacio de almacenamiento adicional o límites de rendimiento aumentados.
Solo puedes aumentar y no disminuir el tamaño de un disco. Para disminuir el tamaño del disco, debes crear un disco nuevo con un tamaño menor. Se te cobrará por los discos hasta que se borre el disco original y más grande.
En esta página, se proporcionan instrucciones para aumentar el tamaño de los discos de arranque y los que no son de arranque.
Antes de comenzar
Para obtener los permisos que necesitas para expandir el disco, pídele al administrador de IAM del proyecto que te otorgue el rol de administrador de VirtualMachine del proyecto (project-vm-admin) en el espacio de nombres en el que reside la VM. Sigue los pasos para verificar que tienes los permisos necesarios.
Expansión de disco
Sigue los pasos de gcloud o de la API para expandir el tamaño del disco.
Es el archivo kubeconfig del servidor de la API de Management.
PROJECT
Es el proyecto de GDC en el que se creará la VM.
VM_BOOT_DISK_NAME
Nombre del nuevo disco de arranque de la VM.
BOOT_DISK_IMAGE_NAME
Nombre de la imagen que se usará para el disco de arranque de la VM nueva.
BOOT_DISK_SIZE
Tamaño del disco de arranque, como 20Gi.
Este valor siempre debe ser mayor o igual que el minimumDiskSize de la imagen del disco de arranque.
Espera hasta que el campo .spec.size se actualice al nuevo tamaño.
Expande los sistemas de archivos y las particiones
Después de expandir el dispositivo de almacenamiento en bloques, debes expandir la partición y el sistema de archivos del invitado para que las aplicaciones puedan consumir el espacio adicional. Algunos SO lo hacen automáticamente con cloud-init.
[[["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)"],[],[],null,["# Expand VM disks\n\nYou can increase the size of your virtual machine (VM) disk partition when your\nVM instance requires additional storage space or increased performance limits.\n\nYou can only increase, and not decrease, the size of a disk. To decrease the disk\nsize, you must create a new disk with a smaller size. Until you delete the\noriginal, larger disk, you are charged for both disks.\n\nThis page provides instructions to increase the size of both boot and non-boot\ndisks.\n\nBefore you begin\n----------------\n\nTo get the permissions you need to perform disk expansion, ask your Project IAM\nAdmin to grant you the Project VirtualMachine Admin (`project-vm-admin`) role in\nthe namespace where the VM resides. Follow the steps to\n[verify](/distributed-cloud/hosted/docs/latest/appliance/application/ao-user/vms/preparation#verify-user-access)\nthat you have the required permissions.\n\nDisk expansion\n--------------\n\nFollow the gdcloud or API steps to expand the disk size. \n\n### gdcloud\n\nExpand the VM disk: \n\n gdcloud compute disks resize \u003cvar translate=\"no\"\u003eDISK_NAME\u003c/var\u003e --project=\u003cvar translate=\"no\"\u003ePROJECT\u003c/var\u003e --size=\u003cvar translate=\"no\"\u003eNEW_SIZE\u003c/var\u003e\n\n- Replace \u003cvar translate=\"no\"\u003eDISK_NAME\u003c/var\u003e with the name of the disk.\n\n- Replace \u003cvar translate=\"no\"\u003ePROJECT\u003c/var\u003e with the name of the\n GDC project in which the VM lives.\n\n- Replace \u003cvar translate=\"no\"\u003eNEW_SIZE\u003c/var\u003e with the new size of the disk.\n\n### API\n\n1. Expand the `VirtualMachineDisk` by updating the `.spec.size` field:\n\n kubectl --kubeconfig \u003cvar translate=\"no\"\u003eMANAGEMENT_API_SERVER\u003c/var\u003e \\\n apply -n \u003cvar translate=\"no\"\u003ePROJECT\u003c/var\u003e -f - \u003c\u003cEOF\n apiVersion: virtualmachine.gdc.goog/v1\n kind: VirtualMachineDisk\n metadata:\n name: \u003cvar translate=\"no\"\u003eVM_BOOT_DISK_NAME\u003c/var\u003e\n spec:\n source:\n image:\n name: \u003cvar translate=\"no\"\u003eBOOT_DISK_IMAGE_NAME\u003c/var\u003e\n namespace: vm-system\n size: \u003cvar translate=\"no\"\u003eBOOT_DISK_SIZE\u003c/var\u003e\n EOF\n\n Replace the following variables:\n\n2. Wait until the `.spec.size` field updates to the new size.\n\nExpand the file systems and partitions\n--------------------------------------\n\nAfter expanding the block device, you must expand the guest's partition and file\nsystem so that applications can consume the additional space. Some OS's do this\nautomatically using `cloud-init`."]]