LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices


Reply
  Search this Thread
Old 02-06-2020, 04:42 AM   #1
Ulysses_
Senior Member
 
Registered: Jul 2009
Posts: 1,303

Rep: Reputation: 57
How to automatically connect a specific USB device to a VM with a KVM GUI like virt-manager or any other


In VMware workstation you can edit the configuration file of a VM with a line like:

usb.autoConnect.device0 = "0x431:0x5BA" # this is my smartphone's ID (edited)

and thereafter every time the VM is started or resumed the USB device is automatically connected to this particular VM.

How do you do the same with virt-manager or Gnome Boxes or any other GUI for KVM such as those below?

https://www.how2shout.com/tools/free...ger-linux.html
 
Old 02-06-2020, 05:47 AM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
I don't know if virtmanager can do this, but if you are not afraid of the command line and XML files, you should read https://libvirt.org/formatdomain.html#elementsHostDev.

Edit: How to do this with virtmanager. I found this by searching for virtmanager usb.

Last edited by berndbausch; 02-06-2020 at 05:49 AM.
 
Old 02-06-2020, 07:25 AM   #3
Ulysses_
Senior Member
 
Registered: Jul 2009
Posts: 1,303

Original Poster
Rep: Reputation: 57
The solution with virt-manager works. Except you cannot boot the VM if the USB device is not present, you must reconfigure it. Bit of a pain, you have to shut it down and restart it to use a PIM for example.
 
Old 02-06-2020, 07:58 AM   #4
Ulysses_
Senior Member
 
Registered: Jul 2009
Posts: 1,303

Original Poster
Rep: Reputation: 57
When you physically plug in the USB device it should be connected to the specific running VM automatically, how do you do that?
 
Old 02-07-2020, 02:42 AM   #5
Brandon58
LQ Newbie
 
Registered: Feb 2020
Posts: 1

Rep: Reputation: Disabled
In the previous chapter we explored the creation and management of KVM guest operating systems using the virt-manager graphical tool. In this chapter we will turn our attention to the creation of KVM guest operating system using the virt-install command-line tool mcdvoice

Last edited by Brandon58; 02-09-2020 at 11:51 PM.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] installing virt-manager and virt-viewer on desktop for managing remote server yvesjv Slackware 4 04-24-2019 03:00 PM
Virsh/Virt-Manager/Virt-Install broken after upgrade to Xubuntu 17.10 Zabzoo Linux - Desktop 2 02-01-2018 08:05 AM
USB redirection issues on WinXP guest, KVM host (created with virt-manager) gradinaruvasile Linux - Virtualization and Cloud 2 12-07-2015 07:00 AM
LXer: Hacking libvirt/virsh/virt-manager/virt-install at Xen 4.0 Dom0 on top of Ubunt LXer Syndicated Linux News 0 05-06-2010 02:50 PM
LXer: Virt-install&Virt-manager at Xen 4.0-rc8 (2.6.32.10 pvops) Dom0 on top Ubuntu K LXer Syndicated Linux News 0 03-26-2010 09:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 12:27 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