Results 1 to 7 of 7

Thread: Can not attach usb device to opensuse vm

  1. #1

    Default Can not attach usb device to opensuse vm

    I am trying to attach ipad2 usb device by using virsh from host ubuntu 12.10 to OpenSuse 13, it returns success, but I can not find it on vm, any suggestions?
    Host: ubuntu 12.10
    VM: OpenSuse 13

    Code:
    ===HOST===
    root@o-ubuntu-103:/image# more usb_ipad2.xml 
     <hostdev mode='subsystem' type='usb' managed='yes'>
      <source>
        <vendor id='0x05ac'/>
        <product id='0x129f'/>
      </source>
    </hostdev>
    root@o-ubuntu-103:/image# virsh attach-device suse13-001 usb_ipad2.xml 
    Device attached successfully
    
    root@o-ubuntu-103:/image# lsusb
    Bus 001 Device 002: ID 8087:8008 Intel Corp. 
    Bus 002 Device 002: ID 8087:8000 Intel Corp. 
    Bus 003 Device 036: ID 05ac:129f Apple, Inc. iPad 2
    Bus 003 Device 040: ID 04e8:6866 Samsung Electronics Co., Ltd 
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    
    ===VM===
    v-suse-33:/home/aaron # lsusb
    Bus 001 Device 003: ID 0409:55aa NEC Corp. Hub
    Bus 001 Device 002: ID 0627:0001 Adomax Technology Co., Ltd  Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub


  2. #2
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    12,055
    Blog Entries
    2

    Default Re: Can not attach usb device to opensuse vm

    Quote Originally Posted by aaronchen2k View Post
    I am trying to attach ipad2 usb device by using virsh from host ubuntu 12.10 to OpenSuse 13, it returns success, but I can not find it on vm, any suggestions?
    Host: ubuntu 12.10
    VM: OpenSuse 13

    Code:
    ===HOST===
    root@o-ubuntu-103:/image# more usb_ipad2.xml 
     <hostdev mode='subsystem' type='usb' managed='yes'>
      <source>
        <vendor id='0x05ac'/>
        <product id='0x129f'/>
      </source>
    </hostdev>
    root@o-ubuntu-103:/image# virsh attach-device suse13-001 usb_ipad2.xml 
    Device attached successfully
    
    root@o-ubuntu-103:/image# lsusb
    Bus 001 Device 002: ID 8087:8008 Intel Corp. 
    Bus 002 Device 002: ID 8087:8000 Intel Corp. 
    Bus 003 Device 036: ID 05ac:129f Apple, Inc. iPad 2
    Bus 003 Device 040: ID 04e8:6866 Samsung Electronics Co., Ltd 
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    
    ===VM===
    v-suse-33:/home/aaron # lsusb
    Bus 001 Device 003: ID 0409:55aa NEC Corp. Hub
    Bus 001 Device 002: ID 0627:0001 Adomax Technology Co., Ltd  Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

    It only appears that the ipad device is recognized but my guess is not yet mounted.
    Are you running a Desktop with your openSUSE? Oftentimes the Desktop is able to detect a new device and auto mount.
    If so, then you should be able to view your new device in your Desktop's File Manager.

    Else,
    You may need to mount the device manually.

    TSU

  3. #3

    Default Re: Can not attach usb device to opensuse vm

    Quote Originally Posted by tsu2 View Post
    It only appears that the ipad device is recognized but my guess is not yet mounted.
    Are you running a Desktop with your openSUSE? Oftentimes the Desktop is able to detect a new device and auto mount.
    If so, then you should be able to view your new device in your Desktop's File Manager.

    Else,
    You may need to mount the device manually.

    TSU

    Thank you for your help, just test with android device, also can not find it in suse vm.
    ===HOST===
    root@o-ubuntu-103:/image# more usb_android.xml
    <hostdev mode='subsystem' type='usb' managed='yes'>
    <source>
    <vendor id='0x04e8'/>
    <product id='0x6866'/>
    </source>
    </hostdev>
    root@o-ubuntu-103:/image# virsh attach-device suse13-001 usb_android.xml
    Device attached successfully


    root@o-ubuntu-103:/image# lsusb
    Bus 001 Device 002: ID 8087:8008 Intel Corp.
    Bus 002 Device 002: ID 8087:8000 Intel Corp.
    Bus 003 Device 036: ID 05ac:129f Apple, Inc. iPad 2
    Bus 003 Device 067: ID 04e8:6866 Samsung Electronics Co., Ltd
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    root@o-ubuntu-103:/image#

    ===VM===
    v-suse-33:/home/aaron # lsusb
    Bus 001 Device 003: ID 0409:55aa NEC Corp. Hub
    Bus 001 Device 002: ID 0627:0001 Adomax Technology Co., Ltd
    Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

  4. #4

    Default Re: Can not attach usb device to opensuse vm

    Success to install libimobiledevice on opensuse, still can not find the ipad device.

    Code:
    v-suse-33:/home/aaron # lsusbBus 001 Device 003: ID 0409:55aa NEC Corp. Hub
    Bus 001 Device 002: ID 0627:0001 Adomax Technology Co., Ltd 
    Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    v-suse-33:/home/aaron # ideviceinstaller -l
    No iOS device found, is it plugged in?

  5. #5
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    12,055
    Blog Entries
    2

    Default Re: Can not attach usb device to opensuse vm

    If you haven't tried this, I've often posted in the past that it'd probably be easier and better to mount your external (including USB) storage in the HostOS, then you have numerous options exposing that storage to your Guest as an ordinary file system without the bother of connection issues in the Guest.

    So, for instance for an Android device which I'm more familiar with than an Apple (but the concepts should be similar)
    - Install ADB on the Host if necessary and mount the Android storage on the HostOS. Typically, once you can see the Android storage in a File Manager you've been successful. It can be a bit more of an adventure verifying a successful mount using only a command line.
    - You can setup a shared Folder using my instructions using vm-manager
    https://en.opensuse.org/User:Tsu2/virtfs#Overview
    You can also setup a network based share like NFS, SAMBA, etc between the Guest and Host.

    HTH,
    TSU

  6. #6

    Default Re: Can not attach usb device to opensuse vm

    Quote Originally Posted by tsu2 View Post
    If you haven't tried this, I've often posted in the past that it'd probably be easier and better to mount your external (including USB) storage in the HostOS, then you have numerous options exposing that storage to your Guest as an ordinary file system without the bother of connection issues in the Guest.

    So, for instance for an Android device which I'm more familiar with than an Apple (but the concepts should be similar)
    - Install ADB on the Host if necessary and mount the Android storage on the HostOS. Typically, once you can see the Android storage in a File Manager you've been successful. It can be a bit more of an adventure verifying a successful mount using only a command line.
    - You can setup a shared Folder using my instructions using vm-manager
    https://en.opensuse.org/User:Tsu2/virtfs#Overview
    You can also setup a network based share like NFS, SAMBA, etc between the Guest and Host.

    HTH,
    TSU
    In fact, I want to use libimobiledevice to control the ipad device on guest vm, not just to map a disk, any suggestions? Thanks.

  7. #7
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    12,055
    Blog Entries
    2

    Default Re: Can not attach usb device to opensuse vm

    That's quite a bit more difficult, and I can only offer some things to try and possibly troubleshoot without knowing for sure where each approach might lead.

    First, you should know that how a device is recognized is important. Possibly a first step is to determine if your iPad is recognized as storage which would mean your connection was setup with a storage driver. If you want to do something else with your USB connection (eg modem, network, serial, etc) you might need to blacklist the use of the storage driver and either install or force install a driver supporting non-storage use.

    Another approach might be to implement the Spice protocol. Doing so enables a connection that runs over a quasi-network connection and can be used for many things.

    As I'm wildly imagining possible workarounds, I figure you might also be able to configure a working connection on your Host (There should be plenty of tutorials around to do that. Maybe modify running something like screen) and then your Guest could remote into that instance running on your Host.

    Good Luck,
    I don't know if many people have tried to set this up

    TSU

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •