1

I made a mistake in the script of a service in my linux VM in Google Cloud Platform. Now the VM does not boot properly, and no ssh server starts.

Is there any other way to rescue this instance and its files, like, somehow edit files without starting the instance?

Maybe somehow download a snapshot and use some tool to edit?

5
  • What mistake did you make? This is a very broad question without knowing what you did.
    – austinian
    Aug 12, 2015 at 17:34
  • @austinian The point is that no SSH server starts (and no other server for that matter). Restarting the VM doesn't fix anything. I have no SSH access. Port 22 is not in use by any process. I think it is clear in my question that I'm looking to rescue a VM without access to it other than the GCP account. Aug 12, 2015 at 17:46
  • You can delete the instance without deleting the boot disk. Attach and mount the disk to any other running VM make the modification and than create an instance with this disk. You can refer to this link for steps (cloud.google.com/compute/docs/disks/…). Make sure to take the snapshot of the disk before deleting the instance, which will make sure you have a disk backup in case if anything goes wrong.
    – Faizan
    Aug 12, 2015 at 18:39
  • @Faizan this is what I was looking for. You should go ahead and make this an answer if you want. Helped me a lot! Aug 13, 2015 at 13:03
  • I'm glad that it was helpful.
    – Faizan
    Aug 13, 2015 at 14:07

1 Answer 1

3

You can delete the instance without deleting the boot disk. Attach and mount the disk to any other running VM make the modification and than create an instance with this disk. You can refer to this link for steps.

Make sure to take the snapshot of the disk before deleting the instance, which will make sure you have a disk backup in case if anything goes wrong

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .