Jump to content

Access COM Port from VM


RichardU

Recommended Posts

How did you pass through the serial port? Something similar to this:

 

 <hostdev mode='capabilities' type='misc'>
  <source>
    <char>/dev/ttyS0</char>
  </source>
</hostdev>      

 

Are you sure you have the right com port adapter for the header on the motherboard?

Link to comment

I passed though the USB COM port by clicking on it while in Edit mode. I haven't done anything to pass the motherboard port. The only hostdev code looks like this.

    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x00' slot='0x1b' function='0x0'/>
      </source>
      <alias name='hostdev0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='usb' managed='yes'>
      <source>
        <vendor id='0x067b'/>
        <product id='0x2303'/>
        <address bus='1' device='3'/>
      </source>
      <alias name='hostdev1'/>
    </hostdev>

 

So this VM has both the USB COM port and another COM port that doesn't work, and I don't know where it comes from.

 

The other VM also has one COM port that I don't know where it comes from (the XML has no hostdev code.)

 

 

 

Link to comment

Is it a windows VM? If so it's probably the virtio serial device. Don't know what it's used for though, but it isn't the comport header on your motherboard.

You have to pass through a device for it to show up in the VM.

You can try to figure out which /dev/ttySx device the built-in header is and try the hostdev tag I provided to see if it works.

Link to comment

It is a windows VM. I tried the code you provided and got this:

 

unsupported configuration: hostdev mode 'capabilities' is not supported in kvm

 

I tried changing the mode command to 'subsystem', and tried eliminating it. Neither worked and I was told type-'misc' is also not supported.

 

So I went on a wild google chase looking for documentation on the hostdev command, but haven't been able to figure it out.

 

Thanks, Richard.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...