Add existing hard disk to virtual machine
Adding an existing hard disk to a virtual machine (VM) in Google Cloud Platform (GCP) allows users to expand storage capacity, migrate data, or attach additional disks for specific purposes. This process is crucial for scaling resources and optimizing performance within cloud environments.
In GCP, users can add an existing hard disk to a VM by navigating to the Compute Engine section of the Cloud Console and selecting the VM instance to which they want to attach the disk. Within the VM instance details, users can click on the “Edit” button to modify the instance’s configuration.
Prerequisites
Hardware : GCP
Google Account
We can add the existing disk which is not used in any GCP instance but it is in that zone.
Open the Cloud Console
Click on Menu > Compute Engine > VM Instances.
Click on which Instance you want to add the disk.
NB: To add the existing disk into another instance, the instance and the disk should be in the same zone.
Click on Edit.
Click on Attach existing disk.
It will list the disk which is available in that zone. Select that and press done.
Then click Save. It will save the disk into another instance.
Click the Disks. It will show the disk which was allocated to one machine, now it is allocated to another machine.
To make the disk operational, check the below link for formatting and mounting.
Add existing hard disk to virtual machine