Set enable-oslogin in metadata of an existing instance:
-
Go to the VM instances page.
-
Click the name of the instance on which you want to set the metadata value.
-
At the top of the instance details page, click Edit to edit the instance settings.
-
Under Custom metadata, add a metadata entry where the key is enable-oslogin and the value is TRUE. Alternatively, set the value to FALSE to exclude the instance from the feature.
-
At the bottom of the instance details page, click Save to apply your changes to the instance.
For all operating systems except CoreOS, this change is applied instantaneously; you do not need to restart your instance. For CoreOS distributions, reboot or restart the instance for the change to take effect. To restart, perform a stop and then start operation on your instances.