Ask Your Question

connect serial ports between instances

asked 2019-09-13 18:00:02 -0500

jamesopst gravatar image

updated 2019-09-13 18:05:02 -0500

hi all, I have been give a task to attempt to get a windbg debugger connection via serial port between openstack instances.
from what I read I guess I need to setup something called a named pipe or setup type='tcp' serial ports on the instances.

I would appreciate anyone's advice on how to proceed or just suggestions on what it is I should be looking to do. as you might be able to tell I'm not 100% sure how to word what I am looking for. I basically need to make virtually what used to be a null modem cable between physical servers.

can I use flavor/image extraspec to have openstack add more serial ports to an instance? say a type='tcp' serial port.
are there settings in the nova configuration that can change the instance's serial configuration?
when searching around for info on this topic I've mostly seen info about accessing the serial console which i think is different than I need.

this what our current openstack config generates for serial in the libvirt XML. -- thanks!

<serial type='file'>
  <source path='/var/lib/nova/instances/9718928f-7e7c-43d8-ad10-1d6bd48fe8ef/console.log'/>
  <target port='0'/>
  <alias name='serial0'/>
<serial type='pty'>
  <source path='/dev/pts/0'/>
  <target port='1'/>
  <alias name='serial1'/>
<console type='file'>
  <source path='/var/lib/nova/instances/9718928f-7e7c-43d8-ad10-1d6bd48fe8ef/console.log'/>
  <target type='serial' port='0'/>
  <alias name='serial0'/>
edit retag flag offensive close merge delete

1 answer

Sort by ┬╗ oldest newest most voted

answered 2019-09-19 17:04:36 -0500

jamesopst gravatar image

updated 2019-11-19 16:16:58 -0500

i have managed to cobble something that works using edits to the XML on the libvirt level. I edit the XML of two windows instances on the same hypervisor to get the serial ports to communication via broadcast to a tcp port. of course this unknown to openstack so you have to trick reboot the instance so openstack doesn't rewrite the XML

one instance
<serial type='tcp'>
<source mode='connect' host='' service='2445'/>
<protocol type='raw'/>
<target port='1'/>

second instance
<serial type='tcp'>
<source mode='bind' host='' service='2445'/>
<protocol type='raw'/>
<target port='1'/>

then,this is how I got these settings applied to the instance without openstack overwriting the settings. while the instance is running do this from the hypervisor's command line

virsh edit instance-00003a37 (add the serial-tcp changes mentioned above buy changing the existing port not adding a new port)
cd /etc/libvirt/qemu
virsh destroy instance-00003a37; virsh start instance-00003a37
(in some cases you may need to go a step further and virsh define instance-00003a37.xml after you destroy and before you start)
edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2019-09-13 18:00:02 -0500

Seen: 234 times

Last updated: Nov 19 '19