skip to Main Content

Simple question but I can’t seem to find the answer to this. When I launch of VM on GCP, I’m getting into the machine via the serial port due to some testing we’re doing, but the there what looks like logs from process that continuously log out to the screen (assuming this is stdout when accessing via serial port?). I’m trying to turn this off but can’t seem to figure out how to.

here is the version that I’m using:

cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
VERSION_CODENAME=stretch
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

2

Answers


  1. You have 2 way to deactivate the serial ports, as described in the documentation

    • Either you deactivate it on a specific VM with a metadata value
    • Or you can apply an organization policy to avoid the serial port use in your organisation, on folders or on an entire project. (We applied this in my company, for security reasons)
    Login or Signup to reply.
  2. You can let all noisy output to be delivered to the default port ttyS0 (COM1) and enable alternative login prompt on ttyS1 (COM2).

    To enable alternative serial port temporarily until next reboot:

    $ sudo systemctl start [email protected]
    

    To enable alternative serial port permanently:

    $ sudo systectl enable [email protected]
    

    Then you might connect to the enabled alternative serial port ttyS1 from Cloud Shell:

    CloudShell:$ gcloud compute connect-to-serial-port my-vm --zone=my-zone --port=2 
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search