[Users] serial (COM) port

Nerijus Baliunas nerijus at users.sourceforge.net
Mon May 14 13:24:13 UTC 2012


My script was OK, the problem was access rights to /dev/ttyS0.
It works OK after I added qemu user to dialout group.

On Mon, 14 May 2012 03:07:23 -0400 (EDT) Dan Yasny <dyasny at redhat.com> wrote:

> A ready hook can be found in http://www.ovirt.org/wiki/Features/Serial_Console_in_CLI#Currently_operational_workaround
> 
> 
> ----- Original Message -----
> > From: "Nerijus Baliunas" <nerijus at users.sourceforge.net>
> > To: users at ovirt.org
> > Cc: "Dan Yasny" <dyasny at redhat.com>
> > Sent: Monday, 14 May, 2012 2:57:15 AM
> > Subject: Re: [Users] serial (COM) port
> > 
> > Thanks, I tried creating
> > /usr/libexec/vdsm/hooks/before_vm_start/60_serial like this:
> > 
> > #!/usr/bin/python
> > 
> > import os
> > import sys
> > import hooking
> > import traceback
> > 
> > domxml = hooking.read_domxml()
> > devices = domxml.getElementsByTagName('devices')[0]
> > 
> > serial = domxml.createElement('serial')
> > serial.setAttribute('type', 'dev')
> > devices.appendChild(serial)
> > 
> > source = domxml.createElement('source')
> > source.setAttribute('path', '/dev/ttyS0')
> > serial.appendChild(source)
> > target = domxml.createElement('target')
> > target.setAttribute('port', '1')
> > serial.appendChild(target)
> > 
> > hooking.write_domxml(domxml)
> > 
> > But VM does not start then. I tried to create the script similar to
> > http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Virtualization/3.0/html/Administration_Guide/ch16s03.html
> > What did I do wrong?
> > 
> > Thanks,
> > Nerijus
> > 
> > On Sun, 13 May 2012 18:21:27 -0400 (EDT) Dan Yasny
> > <dyasny at redhat.com> wrote:
> > 
> > > A simple vdsm hook
> > > 
> > > ----- Original Message -----
> > > > From: "Nerijus Baliunas" <nerijus at users.sourceforge.net>
> > > > To: users at ovirt.org
> > > > Sent: Monday, 14 May, 2012 12:13:58 AM
> > > > Subject: [Users] serial (COM) port
> > > > 
> > > > Hello,
> > > > 
> > > > is there a support for serial port (/dev/ttyS0) redirection in
> > > > ovirt?
> > > > If not,
> > > > how do I add "-serial /dev/ttyS0" option to the qemu command
> > > > line?
> > > > 
> > > > Regards,
> > > > Nerijus




More information about the Users mailing list