Skip to main content
  1. Posts/

Menghubungkan USB Host ke KVM Libvirt

·1 min·
libvirt kvm libvirt

Berikut adalah panduan singkat untuk menghubungkan perangkat USB host ke VM, baik saat VM sedang berjalan (live) maupun saat VM dimatikan.

Sebelum melanjutkan, Anda perlu mengetahui ID Vendor dan ID Product dari perangkat USB host yang akan dihubungkan ke VM.

lsusb -v | grep -iE 'idvendor|idproduct'
  idVendor           0x0781 SanDisk Corp.
  idProduct          0x5567 Cruzer Blade

Kemudian buat file usb.xml lalu tambahkan ID Vendor dan ID Product seperti berikut.

<hostdev mode="subsystem" type="usb" managed="yes">
  <source>
    <vendor id='0x0781'/>
    <product id='0x5567'/>
  </source>
</hostdev>

Selanjutnya attach ke VM dengan perintah.

virsh attach-device domain --file usb.xml --config --live

Related

Using QEMU Guest Agent with libvirt
·1 min
libvirt kvm libvirt
How to Use QEMU to Emulate Storages Devices
·5 mins
libvirt kvm libvirt
Mengatasi Error Disk SCSI Tidak Terdeteksi di KVM Libvirt
·1 min
libvirt kvm libvirt
KVM guest with SSD and NVMe in Libvirt
·3 mins
libvirt kvm libvirt
QEMU-IMG Cheatsheet
·4 mins
libvirt kvm libvirt
KVM Hypervisor Features
·1 min
libvirt kvm libvirt