Dhirendra Saw
Dhirendra Saw

Reputation: 153

GCP: How to add Local SSD disk to a existing VM instance in google cloud platform

I am working in Google cloud platform and I have a situation where I need to attach local SSD disk to a existing VM machine but I cannot find a way to do it, Basically this is the process I need to do.

1. Attach a new local SSD disk 
2. Copy the existing data to new disk
4. Unmount the old disk
5. Mount new disk to old data path

Thanks.

Upvotes: 1

Views: 3070

Answers (1)

guillaume blaquiere
guillaume blaquiere

Reputation: 75735

As John said, you can't if you initially created your VM without local SSD. But you can do something like this

  • Go to the console, select your current VM
    • Go the the boot disk section and select your boot disk
    • Create an image of the boot disk
    • Go back to the current VM page
    • Click on "create similar" button, on the top
  • Select the boot disk image that you just created
  • Add additional disk, with type local scratch SSD

Now you have a similar VM, with the same boot disk image but with local SSD.

Then, you have to detach the existing persistent disk on the old VM and attach it to the new one, make your copy, and delete it.

Upvotes: 2

Related Questions