我尝试使用 virt-manager 添加大量 USB 硬件,但这样做时它们不会出现在客户虚拟机中lsusb
。以下是机器的日志:
2017-12-23 01:39:21.773+0000: starting up libvirt version: 1.3.1, package: 1ubuntu10.15 (Christian Ehrhardt <[email protected]> Mon, 06 Nov 2017 16:36:11 +0100), qemu version: 2.5.0 (Debian 1:2.5+dfsg-5ubuntu10.16), hostname: blade
LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin QEMU_AUDIO_DRV=spice /usr/bin/kvm-spice -name ubuntu_16_04_3_base-clone_multipurpose -S -machine pc-i440fx-xenial,accel=kvm,usb=off -cpu Broadwell-noTSX -m 4096 -realtime mlock=off -smp 4,sockets=4,cores=1,threads=1 -uuid 1211cbb7-97d8-4879-b7e5-f834a595e9bb -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/domain-ubuntu_16_04_3_base-clone_multipurpose/monitor.sock,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc,driftfix=slew -global kvm-pit.lost_tick_policy=discard -no-hpet -no-shutdown -global PIIX4_PM.disable_s3=1 -global PIIX4_PM.disable_s4=1 -boot strict=on -device ich9-usb-ehci1,id=usb,bus=pci.0,addr=0x6.0x7 -device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0,multifunction=on,addr=0x6 -device ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pci.0,addr=0x6.0x1 -device ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pci.0,addr=0x6.0x2 -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x5 -drive file=/var/lib/libvirt/images/ubuntu_16_04_3_base-clone-3.qcow2,format=qcow2,if=none,id=drive-ide0-0-0 -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 -drive if=none,id=drive-ide0-0-1,readonly=on -device ide-cd,bus=ide.0,unit=1,drive=drive-ide0-0-1,id=ide0-0-1 -netdev tap,fd=26,id=hostnet0 -device rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:4e:b9:5a,bus=pci.0,addr=0x3 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -chardev spicevmc,id=charchannel0,name=vdagent -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.spice.0 -spice port=5900,addr=127.0.0.1,disable-ticketing,image-compression=off,seamless-migration=on -device qxl-vga,id=video0,ram_size=67108864,vram_size=67108864,vgamem_mb=16,bus=pci.0,addr=0x2 -device intel-hda,id=sound0,bus=pci.0,addr=0x4 -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -chardev spicevmc,id=charredir0,name=usbredir -device usb-redir,chardev=charredir0,id=redir0 -chardev spicevmc,id=charredir1,name=usbredir -device usb-redir,chardev=charredir1,id=redir1 -chardev spicevmc,id=charredir2,name=usbredir -device usb-redir,chardev=charredir2,id=redir2 -device usb-host,hostbus=1,hostaddr=10,id=hostdev0 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x7 -msg timestamp=on
char device redirected to /dev/pts/21 (label charserial0)
main_channel_link: add main channel client
main_channel_handle_parsed: net test: latency 0.109000 ms, bitrate 66064516129 bps (63004.032258 Mbps)
red_dispatcher_set_cursor_peer:
inputs_connect: inputs channel client create
inputs_detach_tablet:
inputs_detach_tablet:
你能发现什么错误吗?
另外,USB 重定向器有什么用?我使用“添加硬件”选项,然后选择设备。我重启了好几次,还是没找到办法。
我在客户机和主机上都使用 Ubuntu 16.04。在客户机上尝试了 debian,但问题是一样的。搜索了与 virt-manager 和 USB 相关的所有内容,但找不到答案。
这是机器的 XML:https://pastebin.com/gTAX2bKX
谢谢!