Score:1

deprecated 'sshKeys' metadata item | centos | latest guest environment already installed

cn flag

When login into GCP VM from browser i get a popup saying

The VM guest environment is outdated and only supports the deprecated 'sshKeys' metadata item. Please follow the steps here to update.

A: I followed the instruction and updated the guest environment as mentioned here and run following cmds

sudo yum makecache
sudo yum install google-compute-engine google-compute-engine-oslogin \
google-guest-agent google-osconfig-agent

B: As a result, I now have the following packages

google-compute-engine-20210204.00-g1.el7.noarch 
google-compute-engine-oslogin-20210429.00-g1.el7.x86_64
google-guest-agent-20210223.01-g1.el7.x86_64 
google-osconfig-agent-20210429.3-g1.el7.x86_64 

C: Restarted the VM and still getting the same msg of The VM guest environment is outdated

What can be the issue?.
Note: I am unable to use SSHMeta feature also, as I am trying SSHKey via meta for the first time on this vm. Also, this vm was created from an image which was more than two-year old


PS: Have validated the environment as mentioned here

>>>sudo systemctl list-unit-files | grep google | grep enabled
google-accounts-manager.service               enabled 
google-address-manager.service                enabled 
google-clock-sync-manager.service             enabled 
google-guest-agent.service                    enabled 
google-osconfig-agent.service                 enabled 
google-shutdown-scripts.service               enabled 
google-startup-scripts.service                enabled 
google-oslogin-cache.timer                    enabled 

serial port console also looks ok

Installed packages are

rpm -qa --queryformat '%{NAME}\n' \
> |grep -iE google\|gce | grep -iE \
> 'google|gce'
google-compute-daemon
google-compute-engine
google-cloud-sdk
google-compute-engine-oslogin
google-guest-agent
google-osconfig-agent

I do see logs that google-agent creates /home/user-configured-in-ssh-meta

But it does not add the key under authorizedkey file

John Hanley avatar
cn flag
Are you using an OS version that is no longer supported?
cn flag
`cat /etc/centos-release` says `CentOS Linux release 7.9.2009 (Core)` and [gcp documentation](https://cloud.google.com/compute/docs/images/install-guest-environment#os_support) says its supported
Score:2
br flag

Faced a similar issue while migrating an old VM. I had to remove google-compute-daemon.noarch from old vm and update the guest environment.

Also make sure that you have installed followings:

gce-disk-expand.x86_64               1:20200716.00-g1.el7                @google-cloud-compute
google-cloud-sdk.noarch              293.0.0-1                           @google-cloud-sdk
google-compute-engine.noarch         1:20210204.00-g1.el7                @google-cloud-compute
google-compute-engine-oslogin.x86_64 1:20210429.00-g1.el7                @google-cloud-compute
google-guest-agent.x86_64            1:20210223.01-g1.el7                @google-cloud-compute
google-osconfig-agent.x86_64         1:20210429.3-g1.el7                 @google-cloud-compute
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.