LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-10-2020, 04:53 AM   #1
starbearer
LQ Newbie
 
Registered: Jan 2020
Posts: 22

Rep: Reputation: Disabled
Passing a USB pen drive to Qemu vm


am trying to get my Windows VM to access my USB pen drive, but I am having problems passing this USB over to the VM.

On my Linux host machine, I ran lsusb where my device was identified as
Quote:
Bus 001 Device 018 : ID 8564:1000 Transcend Information, Inc. Jetflash
I tried to pass it along to VM as
Quote:
qemu-system-x86_64 -m 3G --enable-kvm "Windows 10.qcow2" -usb -device usb-host,hostbus=1,hostaddr=18
I get the error saying "usb-host" is not a valid device.

I tried to change that to usb-storage, since that is the class of device I see for it when doing lsusb -t, but I don't know what to pass for Device ID..If I leave it blank, it says property ".drive" is missing, as expected.

I tried doing a
Quote:
ls /sys/bus/usb/devices
which printed out some information like
Quote:
1-0:10 1-1 1-1.1 ........usb1 usb2
but with the command
Quote:
qemu-system-x86_64 -m 3G --enable-kvm "Windows 10.qcow2" -usb -device usb-storage,drive=<one of the above>
it says no such property with given value exists.

So,
  1. Should I be concerned that usb-host is not a valid device?
  2. What do I need to do to get usb-storage with device id to work?
  3. Does qemu-kvm support usb 2, 3 and streaming camera?

I'm using QEMU emulator version 4.1.0
 
Old 01-11-2020, 12:44 PM   #2
Rickkkk
Senior Member
 
Registered: Dec 2014
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511
Hi starbearer,

I'm *much* more familiar with Virtualbox than I am with KVM/Qemu/libvirt, but anytime I've added a usb device to be captured by a vm guest, I've always used the manufacturer:model syntax. In your case this would be 8564:1000, but you would have to look up the proper syntax to use with your hypervisor.

Hope this helps.
 
Old 01-11-2020, 06:16 PM   #3
phantom_cyph
Senior Member
 
Registered: Feb 2007
Location: The Tropics
Distribution: Slackware & Derivatives
Posts: 2,472
Blog Entries: 1

Rep: Reputation: 128Reputation: 128
If you haven't tried virt-manager, I'd recommend it. Even if you want to go headless you can always setup in UI then manage from cli.

It makes adding devices much easier.
 
1 members found this post helpful.
Old 01-12-2020, 11:23 PM   #4
starbearer
LQ Newbie
 
Registered: Jan 2020
Posts: 22

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by phantom_cyph View Post
If you haven't tried virt-manager, I'd recommend it. Even if you want to go headless you can always setup in UI then manage from cli.

It makes adding devices much easier.
I agree, having virt-manager makes it much easier to manage VMs in every way, unfortunately I am using a considerably locked down version of Linux, where many dependencies are lacking. Only have libvirt, difficult to install virt-manager, can't point dnf repo at centos or fedora repo either, the rpm packages always start complaining about missing dependencies, or wrong version packages. So roughing it out with qemu command line.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Problem passing through usb devices in qemu insectiod Slackware 8 11-09-2014 03:53 PM
LXer: Set up qemu-kvm-1.0+noroms as spice enabled qemu server vs qemu-kvm-spice on Ubuntu Precise LXer Syndicated Linux News 0 05-26-2012 07:41 AM
After qemu-img, qemu is not capable to detect the C drive (empty) frenchn00b Linux - General 3 10-18-2009 05:39 AM
Boot iso on pen drive by grub installed on pen drive jena Linux - Hardware 2 11-01-2008 09:09 AM
passing passing variable in Java as reference djgerbavore Programming 3 11-10-2004 02:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:08 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration