HI, Is there any way to telnet into an Openstack Instance using serial ports ?

asked 2018-07-18 18:32:24 -0600

xwolv1994 gravatar image

The format : telent <hypervisor_ip> <serial_port>. This hack works for Liberty version but not for others.

edit retag flag offensive close merge delete


You telnet to the hypervisor to enter the instance? And you provide a serial port parameter (e.g. COM1)? This doesn't conform to telnet syntax, and telnetting to the hypervisor doesn't connect you to the instance. I doubt this makes sense in Liberty either.

Bernd Bausch gravatar imageBernd Bausch ( 2018-07-18 21:52:35 -0600 )edit

Hi, Thank you for your reply. To be more precise I want to obtain the serial port from driver.py file which can be added to xml file while creating an instance and can be used to telnet into the Openstack VM

xwolv1994 gravatar imagexwolv1994 ( 2018-07-19 00:29:24 -0600 )edit

Do you mean the serial console? It doesn’t involve a driver.py file, but it’s still supported afaik.

Bernd Bausch gravatar imageBernd Bausch ( 2018-07-19 01:40:21 -0600 )edit

Can the serial console be interactive as telnet sessions to send command like ping between VM to test connectivity among physnets ?

xwolv1994 gravatar imagexwolv1994 ( 2018-07-19 19:30:27 -0600 )edit

Yes, the serial console is interactive. However, I am certain that there are other, less complicated ways to check connectivity between VMs.

Bernd Bausch gravatar imageBernd Bausch ( 2018-07-19 23:11:11 -0600 )edit

Hi, Thank you again. Less complicated ways will be ssh but I don't have a floating IP and I am writing a python and except script to test the connectivity using interactive console

xwolv1994 gravatar imagexwolv1994 ( 2018-07-20 12:28:09 -0600 )edit

1 answer

Sort by » oldest newest most voted

answered 2018-07-20 19:45:44 -0600

updated 2018-07-20 19:46:26 -0600

I start to understand your problem. Rather than using the poorly supported serial console (which seems to have the additional inconvenience of removing the console log), allow me to propose alternatives:

  • Upload the script to the instance (you can use user-data at instance launch), have it test network connectivity and report the result to the console. Then check the console log.
  • Connect to the fixed IP from the DHCP network namespace.
edit flag offensive delete link more


Hi, Thank you for your response. I have tried using user-data. If I am not wrong we can write bash-script directly under the user-data param right ?

xwolv1994 gravatar imagexwolv1994 ( 2018-08-06 17:29:38 -0600 )edit

Not quite. You create a separate file that contains a script and starts with #!/bin/bash. Other languages like Python or Perl work as well, as long as there is an interpreter for them on the image. Then --user-data scriptfile.sh.

Bernd Bausch gravatar imageBernd Bausch ( 2018-08-06 22:00:09 -0600 )edit

If however you create the instance via a Heat template, you can write the scripts directly into the server definition. No need for a separate file.

Bernd Bausch gravatar imageBernd Bausch ( 2018-08-07 02:34:15 -0600 )edit

Hi, yes I am creating two instances on different compute nodes but in same physnet to check connectivity between them. Right now I have the heat template which works with VM creation. But when I tried with user-data say a simple script to create a file. its not working

xwolv1994 gravatar imagexwolv1994 ( 2018-08-07 12:33:59 -0600 )edit

does user-data also requires cloud-config ?

xwolv1994 gravatar imagexwolv1994 ( 2018-08-07 12:34:18 -0600 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2018-07-18 18:32:24 -0600

Seen: 233 times

Last updated: Jul 20 '18