cannot connect / properly reset gpu vm

I have GPU compute instance it worked, I had changed some of the settings inside the container - via chown and chmod, so I wanted to reset the container using reset option - I thought it would get to the begining settings but it did not worked

Administrator created second image I did the same experiments and now I can not connect to VM so I am sure that that resetting did not got the image to the starting point.

JakubMituraa_1-1656527277005.png

 

 

JakubMituraa_0-1656527235270.png

When I run the instance from cloud shell I get 

jakub_mitura@ ...... .: Permission denied (publickey).

jakub_mitura@ .....  : Permission denied (publickey).

after doing 

```

--troubleshoot --tunnel-through-iap

```

I get at the end

```

You need permission to SSH to a private IP address: iap.tunnelInstances.accessViaIAP.
Help for IAP permissions: https://cloud.google.com/iap/docs/managing-access
- Your organization hasn't blocked access to external IP addresses. IAP changes the source traffic to 35.235.240.0/20 and the tunnel to https://tunnel.cloudproxy.app.

---- Checking VM boot status ----
VM boot: 0 issue(s) found.

```

But I had permissions because I was able to open instance at the beginning

 

 

Without creating new instance which is complicated in my case what can I do?

Solved Solved
0 4 810
1 ACCEPTED SOLUTION

I had to read here ...

https://cloud.google.com/compute/docs/instances/stop-start-instance#resetting_an_instance

Resetting a VM is like "powering off and then powering on your PC".  It is a hard reset of the physical machine but not a logical "factory reset" of your VM image.  As the docs say:

> When you reset a VM, none of the VM properties change. The VM retains its ephemeral IPs, static external IPs, persistent disks, local SSDs (if any), and machine type. However, any data stored in memory is reset unless you back up the data.

If we have broken files in the file system then a VM reset isn't going to change that.  It doesn't "rebuild" the content of the boot disks.  You can create a new boot disk through this recipe:

https://cloud.google.com/compute/docs/disks/create-root-persistent-disks#creatingrootpdalone

and then detach your original boot disk and attach the new boot disk.  This will preserve your original Compute Engine VM definition but reset/replace the bootable disk ... effectively giving you a new Compute Engine.  However, if you went through an administrator to get your Compute Engine in the first place, it isn't clear to me that you will have the permissions/authority to create a NEW bootdisk yourself.  If that's the case, it is questionable whether this is the easiest route or simply requesting a deletion and new creation of a new Compute Engine is warranted.

View solution in original post

4 REPLIES 4

Here is a cheat sheet of things to try getting SSH'd into your VM.  

https://cloud.google.com/compute/docs/troubleshooting/troubleshooting-ssh

I think I'm hearing you say "I was given a Google Cloud Compute Engine instance and tried to get something working.  I executed some chown/chmod commands and maybe I broke something.  I asked my administrator to give me a new Google Cloud Compute Engine and I find that I can't SSH into it".

Is that the summation of the puzzle?

Thanks for response @kolban !, generally I would like to reset the instance I have - becouse as you said I broken something, is the only way to reset the instance is to remove it and recreate it by administrator? becouse the reset option next to ssd connection seem not to do anything for my use case . This troubleshooting and can not ssh to this instance where i had played with chown/chmod. I am asking becouse administrator that can recreate instance is in the other company and it can take a week before they will respond.

Thanks !

I had to read here ...

https://cloud.google.com/compute/docs/instances/stop-start-instance#resetting_an_instance

Resetting a VM is like "powering off and then powering on your PC".  It is a hard reset of the physical machine but not a logical "factory reset" of your VM image.  As the docs say:

> When you reset a VM, none of the VM properties change. The VM retains its ephemeral IPs, static external IPs, persistent disks, local SSDs (if any), and machine type. However, any data stored in memory is reset unless you back up the data.

If we have broken files in the file system then a VM reset isn't going to change that.  It doesn't "rebuild" the content of the boot disks.  You can create a new boot disk through this recipe:

https://cloud.google.com/compute/docs/disks/create-root-persistent-disks#creatingrootpdalone

and then detach your original boot disk and attach the new boot disk.  This will preserve your original Compute Engine VM definition but reset/replace the bootable disk ... effectively giving you a new Compute Engine.  However, if you went through an administrator to get your Compute Engine in the first place, it isn't clear to me that you will have the permissions/authority to create a NEW bootdisk yourself.  If that's the case, it is questionable whether this is the easiest route or simply requesting a deletion and new creation of a new Compute Engine is warranted.

Thank you !