Bug 1734679

Summary: Support on USB cutter devices for ovirt Windows guest
Product: [oVirt] ovirt-engine Reporter: Navneet Kumar Dubey <navneet.dubey>
Component: GeneralAssignee: bugs <bugs>
Status: CLOSED DEFERRED QA Contact: Lukas Svaty <lsvaty>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.3.5CC: bugs, michal.skrivanek, rbarry
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
The screenshot is from the ovirt manager VM where the host devices are connected
none
The setup diagrammatic view is attached
none
xml dump from the guest Windows 10 machine
none
screenshot from the Windows device manager
none
engine log from ovirt manager node
none
vdsm logs from the host node
none
Latest XML dump after changing to VNC
none
Windows XML
none
options of q35
none
Windows XML dump after repeating comment#10
none
Device manager USB controller before USB attaching
none
Device manager USB controller after USB attaching
none
BIOS type of the guest VM none

Description Navneet Kumar Dubey 2019-07-31 07:54:53 UTC
Created attachment 1594933 [details]
The screenshot is from the ovirt manager VM where the host devices are connected

Description of problem: We were using the USB dongle on the Windows guest on ovirt host node and was working fine. We have a situation where we want to use USB cutter device which makes the USB dongle Switching off and on when  required depending on the test cases as radiation makes the over heating of the dongle. 
When we connect the dongle with the USB cutter we are able to discover on the host node. We then added as host_devices as  well to the guest but neither the USB cutter nor the USB dongle connected to it is seen on the guest node. Attached is the snapshot from the VMs host_devices. 

Can this be supported on ovirt managed Windows VM.  The VM is Windows 10 installed with ovirt-guest-tools and usbdk. 


Version-Release number of selected component (if applicable): 4.3.5.3-1.el7

From Host node  : vdsm-4.30.8-9.gitf28e377.el7.x86_64

Output from host node : 

[root@localhost ~]# lsusb
Bus 002 Device 011: ID 04e8:6889 Samsung Electronics Co., Ltd GT-B3730 Composite LTE device (Commercial)
Bus 002 Device 005: ID 0bda:5411 Realtek Semiconductor Corp.
Bus 002 Device 004: ID 0bda:5411 Realtek Semiconductor Corp.
Bus 002 Device 002: ID 8087:8002 Intel Corp.
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 113: ID 0d50:0008 Cleware GmbH
Bus 001 Device 004: ID 046b:ff10 American Megatrends, Inc. Virtual Keyboard and Mouse
Bus 001 Device 003: ID 046b:ff01 American Megatrends, Inc.
Bus 001 Device 002: ID 8087:800a Intel Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Where, 04e8:6889 Samsung Electronics  is the USB dongle and 0d50:0008 Cleware GmbH is the USB cutter . 

Reference for USB cutter : 
http://www.cleware-shop.de/USB-Cutter/en
http://www.cleware-shop.de/epages/63698188.sf/en_US/?ObjectPath=/Shops/63698188/Categories/USB_Cutter

How reproducible:


Steps to Reproduce:
1. Connected the USB cutter to the host and the USB dongle to the USB cutter. 
2. Checked in host with lsusb and it had discovered. Then added both cutter and dongle to the Host device of the VM. Check the attachment.
3. The USB support is also enabled for the guest with SPICE as the Graphics mode for console. 
4. Powered on the VM but was not able to see the cutter as well as the USB dongle. 

Actual results: USB cutter and USB dongle not being able to detect . Physical Windows PC works with both the USB devices


Expected results: USB cutter and USB dongle should be discovered. 


Additional info: Please let me know if you any other details on priority and I will be able to provide you. I work in IST time zone (GMT +5:30)

Comment 1 Navneet Kumar Dubey 2019-07-31 10:14:51 UTC
I have also attached the diagrammatic representation of our setup. The attached file "setup" has two parts . 
The first part is ovirt setup which is having the issue. The second part is Standalone physical Windows PC on which it works fine.

Comment 2 Navneet Kumar Dubey 2019-07-31 10:16:40 UTC
Created attachment 1595012 [details]
The setup diagrammatic view is attached

Comment 3 Ryan Barry 2019-08-01 01:03:07 UTC
I very much doubt if this has ever been tested with such a device. Is it visible in the Windows device manager anywhere?

Once it's passed through, it should no longer be visible from the host. Can you add the libvirt XML? Available from engine.log or vdsm.log (alternatively, from virsh dumpxml)?

Comment 4 Navneet Kumar Dubey 2019-08-01 05:38:59 UTC
I don't see the device under the Windows device manager. Please check the attached screenshot named as "device_manager.

I have attached the xml file for the Winsows. Additionally I have also attached the vdsm.log from the host and the engine.log from the manager node.

Comment 5 Navneet Kumar Dubey 2019-08-01 05:40:05 UTC
Created attachment 1596863 [details]
xml dump from the guest Windows 10 machine

Comment 6 Navneet Kumar Dubey 2019-08-01 05:40:42 UTC
Created attachment 1596864 [details]
screenshot from the Windows device manager

Comment 7 Navneet Kumar Dubey 2019-08-01 05:41:33 UTC
Created attachment 1596865 [details]
engine log from ovirt manager node

Comment 8 Navneet Kumar Dubey 2019-08-01 05:42:15 UTC
Created attachment 1596866 [details]
vdsm logs from the host node

Comment 9 Navneet Kumar Dubey 2019-08-01 05:43:07 UTC
Hi Ryan,

I have all the required logs to check. 

Regards
Navneet

Comment 10 Michal Skrivanek 2019-08-01 07:52:14 UTC
it's getting mixed up with the SPICE USB redir devices, you could see in xml that your 2 host devs are plugged into ports 1 and 6. But there are also redir devices  in all the other 4 ports. Maybe your devices don't like to be plugged into USB 2 or USB 1 controllers, or maybe even the whole companion controller stuff

Anyway, disable SPICE and use just VNC, that may change things. You may also try creating a new VM definition - or maybe first try removing those host devices, switching to VNC, run VM, shutdown, assign host devices again.
Another alternative is to switch to Q35+seabios since there we use a single USB3 XHCI controller. It's likely going to work better.

Comment 11 Navneet Kumar Dubey 2019-08-01 09:17:28 UTC
Hi Michal,

Thanks for the analysis and the actions. 

I tried removing those host devices, switching to VNC, run VM, shutdown, assign host devices again.

Still no success. 

How I can try switching to Q35+seabios. If you can let me know I can try that too. 

Latest xml file is attached . 

Regards
Navneet

Comment 12 Navneet Kumar Dubey 2019-08-01 09:18:13 UTC
Created attachment 1596891 [details]
Latest XML dump after changing to VNC

Comment 13 Navneet Kumar Dubey 2019-08-01 09:29:38 UTC
Should I change the value in the file /etc/ovirt-engine/osinfo.conf.d/00-defaults.properties. 

As of now it shows as below :

os.other.devices.usb.controller.value = piix3-uhci,q35/qemu-xhci

Shoudl I change the value to something and then restart the engine services

Comment 14 Navneet Kumar Dubey 2019-08-01 11:24:55 UTC
Hi Michal,

I tried to change the BIOS type to q35 from the edit option of the guest then tried to run it but the the VM was not able to come up. 

It has the Below error :

 Exit message: unsupported configuration: IDE controllers are unsupported for this QEMU binary or machine type

Regards
Navneet

Comment 15 Ryan Barry 2019-08-01 12:03:15 UTC
This is due to the cdrom. Also, I'd suggest that Windows is going to be happy with a change in the emulated hardware.

I don't see the USB devices in the new XML. They're passed through as host devices. Still present in the UI?

Comment 16 Navneet Kumar Dubey 2019-08-01 12:23:16 UTC
Hi Ryan,

As per Michal I can try to recreate the Windows guest VM. Could you please let me know with what properties I can go forward creating it. 

Regards
navneet

Comment 17 Ryan Barry 2019-08-01 12:25:18 UTC
The same USB settings as before.

Michal suggested Q35 since the USB configuration is less complex from a virtual hardware level, but the interface is otherwise the same.

Comment 18 Navneet Kumar Dubey 2019-08-01 13:42:13 UTC
Hi Ryan,

I tried on a newly created machine but the machine is not able to start when i use Q35 . Attached are the option that is being listed. We get the below error:
VM 10.58.178.145_win10 is down with error. Exit message: unsupported configuration: IDE controllers are unsupported for this QEMU binary or machine type.

Also, while using the VNC instead of SPICE the VM does not come up saying the below error. 
VM 10.58.178.146_win10 is down with error. Exit message: XML error: requested USB port 6 not present on USB bus 0.

I have attached the latest XML dump of the VM

Comment 19 Navneet Kumar Dubey 2019-08-01 13:43:25 UTC
Created attachment 1597467 [details]
Windows XML

Comment 20 Navneet Kumar Dubey 2019-08-01 13:45:20 UTC
Created attachment 1597468 [details]
options of q35

Comment 21 Ryan Barry 2019-08-01 14:07:50 UTC
This doesn't appear to be Q35 (no xhci usb controller, and the machine type is still i440fx:

  <os>
    <type arch='x86_64' machine='pc-i440fx-rhel7.3.0'>hvm</type>
    <smbios mode='sysinfo'/>
  </os>

Is this actually a new VM?

Please attempt the suggestion in comment#10. Shut down the VM, change the console type to SPICE, remove the USB passthrough from host devices, then re-add them. Please post the XML when finished

Comment 22 Navneet Kumar Dubey 2019-08-01 15:29:42 UTC
1. Machine set to SPICE , removed the the USB passthrough from host devices, then re-add them.
2. Also changed the Custom Emulated Machine to "Q35"
2. Tried to start the machine it throws the error :
VM 10.58.178.145_win10 is down with error. Exit message: unsupported configuration: IDE controllers are unsupported for this QEMU binary or machine type.

How can I make sure when i Change the Custom Emulated Machine to "Q35" then machines then starts normally.

Comment 23 Navneet Kumar Dubey 2019-08-01 16:50:00 UTC
Still Wondering why the VM when set to Custom Emulated Machine to "Q35" or any of the "pc-q35-rhel7.X.X" does not boot. You were telling something the issue related to the cdrom. Could you please let me if we can do something for this.

Comment 24 Navneet Kumar Dubey 2019-08-01 17:01:47 UTC
Is it due to the vdsm and the ovirt version from the host node :

[root@localhost qemu]# rpm -qa | grep -i vdsm
vdsm-hook-fcoe-4.30.8-9.gitf28e377.el7.noarch
vdsm-hook-vmfex-dev-4.30.8-9.gitf28e377.el7.noarch
vdsm-jsonrpc-4.30.8-9.gitf28e377.el7.noarch
vdsm-python-4.30.8-9.gitf28e377.el7.noarch
vdsm-common-4.30.8-9.gitf28e377.el7.noarch
vdsm-network-4.30.8-9.gitf28e377.el7.x86_64
vdsm-hook-openstacknet-4.30.8-9.gitf28e377.el7.noarch
vdsm-http-4.30.8-9.gitf28e377.el7.noarch
vdsm-4.30.8-9.gitf28e377.el7.x86_64
vdsm-api-4.30.8-9.gitf28e377.el7.noarch
vdsm-hook-ethtool-options-4.30.8-9.gitf28e377.el7.noarch
vdsm-yajsonrpc-4.30.8-9.gitf28e377.el7.noarch
vdsm-client-4.30.8-9.gitf28e377.el7.noarch
vdsm-hook-vhostmd-4.30.8-9.gitf28e377.el7.noarch
[root@localhost qemu]# rpm -qa | grep -i ovirt
ovirt-release-master-4.4.0-0.2.master.20190723000137.gitea53f6e.el7.noarch
python2-ovirt-setup-lib-1.2.1-0.0.master.20190108150145.gite04a5af.el7.noarch
cockpit-ovirt-dashboard-0.12.2-0.0.master.20190122.git634e961.el7.noarch
python2-ovirt-host-deploy-1.8.0-0.0.master.20181220124603.git6a3fda8.el7.noarch
ovirt-ansible-engine-setup-1.1.8-0.1.master.20190117095028.el7.noarch
ovirt-provider-ovn-driver-1.2.20-0.20190125152832.git6aec408.el7.noarch
ovirt-engine-cli-3.6.9.3-0.1.20180209.gitad0561a.el7.centos.noarch
ovirt-vmconsole-host-1.0.6-3.el7.noarch
cockpit-machines-ovirt-176-4.el7.centos.noarch
ovirt-host-dependencies-4.3.1-0.0.master.20190115090506.gitc8ad67d.el7.x86_64
ovirt-hosted-engine-setup-2.3.4-0.0.master.20190125093207.git6c233f5.el7.noarch
ovirt-vmconsole-1.0.6-3.el7.noarch
ovirt-imageio-common-1.5.0-0.201901061024.gita4be4ca.el7.x86_64
libgovirt-0.3.4-1.el7.x86_64
ovirt-ansible-repositories-1.1.5-0.1.master.20190125081537.el7.noarch
ovirt-engine-sdk-python-3.6.9.2-0.1.20180209.gite99bbd1.el7.centos.noarch
python-ovirt-engine-sdk4-4.3.0-2.20190116gitf8b704b.el7.x86_64
ovirt-host-4.3.1-0.0.master.20190115090506.gitc8ad67d.el7.x86_64
ovirt-ansible-hosted-engine-setup-1.0.8-0.1.master.20190125145004.el7.noarch
ovirt-host-deploy-common-1.8.0-0.0.master.20181220124603.git6a3fda8.el7.noarch
ovirt-hosted-engine-ha-2.3.2-0.0.master.20190122143022.20190122143015.git7da170e.el7.noarch
ovirt-imageio-daemon-1.5.0-0.201901061024.gita4be4ca.el7.noarch

Comment 25 Ryan Barry 2019-08-01 18:55:21 UTC
Ok, so changing from i440fx to Q35 isn't supported for this reason (the IDE controller) until 4.4. It would need to be a new VM. Please move back to i440fx and attempt comment#10

Comment 26 Navneet Kumar Dubey 2019-08-01 19:27:33 UTC
Changed to pc-i440fx-rhel7.3.0 and then repeated comment 10 : removing those host devices, switching to VNC, run VM, shutdown, assign host devices again.

Still no luck ad the device manager still does not shows the USBs. Attached is the xml file .

Comment 27 Navneet Kumar Dubey 2019-08-01 19:28:21 UTC
Created attachment 1599249 [details]
Windows XML dump after repeating comment#10

Comment 28 Navneet Kumar Dubey 2019-08-02 06:47:22 UTC
Any updates ??

Comment 29 Ryan Barry 2019-08-02 15:13:05 UTC
Ok, so they're present in the XML.

Can you please try:

set DEVMGR_SHOW_DETAILS=1
set DEVMGR_SHOW_NONPRESENT_DEVICES=1
start devmgmt.msc

And see if the devices are present, but hidden?

Comment 30 Navneet Kumar Dubey 2019-08-02 16:11:38 UTC
Tried the steps still not found

Comment 31 Ryan Barry 2019-08-03 00:42:30 UTC
Is it possible to attempt with a Linux guest and the same passthrough settings to see if it appears in lsusb? I can't reproduce your symptoms, but I also don't have a cutter to check with

Comment 32 Navneet Kumar Dubey 2019-08-03 09:12:37 UTC
Yes, I tried on the linux machine and both the cutter and the dongle was discovered 

[root@localhost ~]# lsusb
Bus 001 Device 002: ID 04e8:6889 Samsung Electronics Co., Ltd GT-B3730 Composite LTE device (Commercial)
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 0d50:0008 Cleware GmbH
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
[root@localhost ~]#

Comment 33 Ryan Barry 2019-08-05 00:22:17 UTC
Ok, positive. Is the USB controller visible in Windows?

Comment 34 Navneet Kumar Dubey 2019-08-05 11:45:03 UTC
Yes, they are visible. I have taken the screenshot of the device manager page : one before the USB was attached and the other after attaching the USB

Comment 35 Navneet Kumar Dubey 2019-08-05 11:46:04 UTC
Created attachment 1600636 [details]
Device manager USB controller before USB attaching

Comment 36 Navneet Kumar Dubey 2019-08-05 11:55:04 UTC
Created attachment 1600637 [details]
Device manager USB controller after  USB attaching

Comment 37 Michal Skrivanek 2019-08-05 12:21:04 UTC
(In reply to Ryan Barry from comment #25)
> Ok, so changing from i440fx to Q35 isn't supported for this reason (the IDE controller) until 4.4. It would need to be a new VM. Please move back to i440fx and attempt comment#10

you're not supposed to use custom emulated machine type. that's not the right "thing" to change. Change the "BIOS Type" only.

Comment 38 Navneet Kumar Dubey 2019-08-05 13:52:30 UTC
The BIOS type has not been changed. It is still in "default". Please check the screenshot

Comment 39 Navneet Kumar Dubey 2019-08-05 13:53:15 UTC
Created attachment 1600649 [details]
BIOS type of the guest VM

Comment 40 Navneet Kumar Dubey 2019-08-23 07:26:57 UTC
Hi Team,

Can I have an update on this issue . 

Regards
Navneet

Comment 41 Ryan Barry 2019-08-23 07:39:42 UTC
General take is that, if it works in Linux and not Windows (lsusb vs device manager), I'd suspect Windows in some way. Are the virtio drivers installed?

Comment 42 Navneet Kumar Dubey 2019-08-26 14:00:47 UTC
I have doubt in that case as It was said that the individual Modem when connected to the host was able to get mapped and detected at the guest VM it mean we have all the required drivers installed. 
The issue is only seen when we connect the dongle to the USB cutter and it is the cutter that is not getting detected in the guest VM

Comment 43 Ryan Barry 2019-08-26 15:09:05 UTC
USB device initialization isn't particularly standardized, especially anything which may mode switch. I'm not familiar with the cutter in particular, but I'll try to dig a little in USB sources

Comment 44 Michal Skrivanek 2020-03-18 15:50:35 UTC
This bug didn't get any attention for a while, we didn't have the capacity to make any progress. If you deeply care about it or want to work on it please assign/target accordingly

Comment 45 Michal Skrivanek 2020-03-18 15:55:04 UTC
This bug didn't get any attention for a while, we didn't have the capacity to make any progress. If you deeply care about it or want to work on it please assign/target accordingly

Comment 46 Navneet Kumar Dubey 2020-03-19 05:17:48 UTC
Hi Michal,

I did not heard from Ryan after the comment 43 . Could you please take a note and try to get an update here . 

Regards
Navneet

Comment 47 Ryan Barry 2020-03-19 05:31:57 UTC
No update because I didn't find anything, and we don't have the hardware to reproduce

Comment 48 Navneet Kumar Dubey 2020-03-19 05:34:39 UTC
ohhh !! Okay. Then may be you can close this case or whatever you feel is good

Comment 49 Michal Skrivanek 2020-04-01 14:49:20 UTC
ok, closing. Please reopen if still relevant/you want to work on it.

Comment 50 Michal Skrivanek 2020-04-01 14:52:10 UTC
ok, closing. Please reopen if still relevant/you want to work on it.