Re: host to VM serial device configuration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Jan 14, 2011, at 9:44 AM, Daniel P. Berrange wrote:

On Sat, Jan 15, 2011 at 01:09:07AM +1100, Justin Clift wrote:
On 14/01/2011, at 9:39 PM, Daniel P. Berrange wrote:
On Fri, Jan 14, 2011 at 11:50:01AM +0800, Osier Yang wrote:
于 2011年01月12日 23:11, John Paul Walters 写道:
Hi,

I'm trying to get a virtual serial device up and running between my host and virtual machine with a device name on the host. I'm using libvirt 0.8.3 and qemu 0.13.0. The challenge that I'm running into is that I'm able to get a serial device, but I cannot fix it to a pre- defined device
name. For example, I'm using the following in my VM's xml file:

<serial type='pty'>
<source path='/dev/pts/19' />
<target port='0' />
</serial>

As I said this works, but it doesn't set the host side to /dev/ pts/19.
Is there any way to do this?

I could reproduce it, trying to find out why.

When using type='type', the source path is an output only
attribute. You can't control it yourself, it is autoassigned
by the kernel as it sees fit.

Any idea if it's the kind of thing whose name could be selected or changed
using udev rules?

No, these aren't normal devices. This is a magic filesystem
which creates entries on the fly.

Thanks for the replies. I'm not necessarily stuck on type='pty'. I just need to be able to pin the device name or a pipe name to something known on the host side. Along those lines, I've tried using type='pipe' like so:

<serial type='pipe'>
	<source path='/tmp/mypipe' />
	<target port='1' />
</serial>

I've created the /tmp/mypipe.in and /tmp/mypipe.out using mkfifo per the qemu directions. But I'm not sure what this is supposed to look like on the VM-side. I notice that I have a ttyS1 in the VM, which I believe is connected to the pipe on the host side, but do I use this as a serial device or as a named pipe?

regards,
JP



[Index of Archives]     [Virt Tools]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux