Gcloud compute connect-to-serial-port opens window with output but no keyboard input possible

667 views
Skip to first unread message

Piet Timmers

unread,
Oct 17, 2017, 10:21:19 AM10/17/17
to gce-discussion
Everybody,

I use the gcloud compute connect-to-serial-port to connect to a serial port. This opens a putty window with the expected console output.
The problem is that there is no reaction on the keyboard.
I cannot give any command on this line.

Any idea?

Thanks.

Piet

Taher (Cloud Platform Support)

unread,
Oct 17, 2017, 5:11:30 PM10/17/17
to gce-discussion

Hi, you can try applying the below command to get the proper outcome by following this document.


gcloud compute connect-to-serial-port [USER@]INSTANCE]


However, the metadata needs to be set properly before doing so. Below is a sample command which might help you to achieve this task. You can follow this help center article which might help you solve the issue.


gcloud compute instances add-metadata  [INSTANCE NAME] --metadata=serial-port-enable=1


Piet Timmers

unread,
Oct 19, 2017, 9:19:08 AM10/19/17
to gce-discussion
Thank you for a fast reponse to my question.

The command you suggested are the ones I have done. First enable serial console, and than connect to the console.
A console window is opened and I can see the console output.
But still I cannot give any command to the console. No reaction.

Any idea?

Greetings.
Piet

Op dinsdag 17 oktober 2017 23:11:30 UTC+2 schreef Taher (Cloud Platform Support):

Taher (Cloud Platform Support)

unread,
Oct 19, 2017, 5:04:36 PM10/19/17
to gce-discussion

Hi Piet,


Can you let me know which host configuration are you using? Are you trying directly via Cloud Console or using any other VM or machine and using the Gcloud command from there?


I have tried with Cloud console from my end and was not able to recreate the issue. You can also try changing browser or use incognito mode in case you are using the Cloud Console from browser.


Piet Timmers

unread,
Oct 20, 2017, 10:46:04 AM10/20/17
to gce-discussion
Hi,

I am using Google Cloud SDK Shell from a windows PC. I asume the nost direct way to give Gcloud commands.
I use my own host configuration, vtserver. I can see the sysyteems boots, but it does not complete the boot procedure. Because I cannot use the keyboard, it is not possible for me to investigate  why.

Greetings,
Piet

Op donderdag 19 oktober 2017 23:04:36 UTC+2 schreef Taher (Cloud Platform Support):

Carlos (Cloud Platform Support)

unread,
Oct 23, 2017, 10:35:36 AM10/23/17
to gce-discussion
Hi Piet, 

Your last comment makes me doubt on whether you are having a connection issue or if the VM is actually not starting.  I would try first to SSH from the browser. You can also try to spin a new VM to make sure the problem is not related to a particular instance. Examining the Serial Console from the browser will also let you confirm if the VM is up. 

Once you make sure the VM is up and running, I would try connecting using the CLI commands from Cloud Shell

Piet Timmers

unread,
Oct 24, 2017, 3:34:56 AM10/24/17
to gce-discussion
Hi,

I understand your doubt. When connecting to th serial console I see the boot window which has a few options and the most important is "Normal boot". It has a counter that goes from 10 to 0 and on a working environment is then boots normal. What I see here is that the counter is going to 0, but the system will not start and I am not able to select the "normal startup" option because there is no keyboard reaction. At that moment, SSH is not yet started, so a connection using SSH from the browser does not work. When I make a connection from the browser I see the same, a boot menu, but no possibility to do anything.
The VM I use is a copy made according the help documentation found for making a disk.raw amd than compress it.The original VM is running on VMware and the disk.raw I made of it is used to create a new VMware client and a instance on a OpenStack environment and they work without problems. I created the image to start SSH after startup and this works on the OpenStack environment. Mayby it will help, but a collegae of me is trying to get it work at AWS, and they also have problems, that look very much the same.

Grt.

Piet

Op maandag 23 oktober 2017 16:35:36 UTC+2 schreef Carlos (Cloud Platform Support):

Taher (Cloud Platform Support)

unread,
Oct 24, 2017, 2:28:36 PM10/24/17
to gce-discussion

Hi Piet,


It seems like you are running a custom instance and having an issue booting it up. Any third party custom instance configuration falls outside of our scope but I will do my best to help you in this case. As the original VM was running on VMware, you should try to use our guide to migrate it from VMware to Google Cloud platform. Also to be sure of using the proper resources to be used after the migration, best practices should be followed for optimum performance.

Julien Andonov

unread,
Jan 24, 2018, 2:33:35 PM1/24/18
to gce-discussion
Dear all
I have similar problem.
I mistakenly changed my SElinux settings to an invalid ones and now I cannot boot my machine. I tried to access my VM via serial connection, but to no success. 
I opened also a call to the support: 14797769
But they are not able to help me also :( Please tell me how to boot the VM into a single user / rescue mode. I have important data on my machine.

Best regards
Julien Andonov
Reply all
Reply to author
Forward
0 new messages