Re: serial console

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

 



* John Wayne schrieb:

> hi,
> 
> when creating a domain using libvirt python api, how would i tell libvirt to use a unique serial port number for domains?
> in the libvirt.virConnect.defineXML(conn,domainxml) call when i create the domainxml object, i need to ensure that the part below has a unique # for target port
> 
> <serial type='pty'>
>   <target port='0'/>
> </serial>
> <console type='pty'>
>   <target type='serial' port='0'/>
> </console>

try: 
   <serial type="dev">
      <source path="/dev/ttyS0"/>
      <target port="0"/>
    </serial>

    /dev/ttyS0  of host is connected to port 0 (linux: /dev/ttyS0) of guest.

try:
    <serial type="dev">
      <source path="/dev/ttyUSB0"/> 
      <target port="1"/>
    </serial>
    /dev/ttyUSB0  (usb -> serial adapter) is connected to port 1 (linux: /dev/ttyS1) of guest. 

I works like this on a server of one of my customers.

Don't forget to restart libvirt-bin after changing xml file:
/etc/init.d/libvirt-bin stop   -> start  , then start your guest.

bye
Ekkard

_______________________________________________
libvirt-users mailing list
libvirt-users@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvirt-users



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

  Powered by Linux