Virsh Passthrough USB

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen

Dump XML

  • virsh dumpxml orion > orion.xml

LS USB

  • lsusb | grep Alcor
Bus 001 Device 014: ID 058f:6387 Alcor Micro Corp. Flash Drive

Zuweisen

<vendor id='0x058f'/>
<product id='0x6387'/>
<address bus='1' device='14'/>

USB XML

<hostdev mode='subsystem' type='usb' managed='yes'>
      <source>
        <vendor id='0x058f'/>
        <product id='0x6387'/>
        <address bus='1' device='14'/>
      </source>
      <alias name='hostdev0'/>
</hostdev>

Temporäres zuweisen

  • virsh attach-device orion usb.xml

Konfiguration ändern

  • virsh attach-device --config orion usb.xml

Detachen des USB Devices

virsh detach-device orion usb.xml

Start VM

  • virsh start orion