In the GCP Console only, you can update the boot disk for a VM in one step.
This feature is only available in the console and is not available using the gcloud tool or through the API.
-
Go to the VM instances page.
-
If prompted, select your project and click Continue.
-
Click on the instance for which you want to attach the boot disk.
-
If the VM instance is not already stopped, click Stop at the top of the page.
-
Next, click the Edit button at the top of the page.
-
Scroll down to the Boot Disk section.
-
Click X next to the current boot disk.
-
Click Add item.
-
Select a boot disk from the dropdown menu.
-
Save your changes.
The console will proceed to detach your existing booth disk and attach the new boot disk that you specified.
Restart the instance once the process is complete.