Using a KVM switch with an unraid virtual machine


Recommended Posts

Hi, I am having a problem trying to set up a KVM switch (the other KVM that is used to switch keyboards and monitors, not the KVM virtualization software more likely to be mentioned on this forum) with an unraid virtual machine.  I have several computers that I want to be able to switch between rather than have 3-4 separate keyboards, monitors etc.  I have linux and windows virtual machines within unraid i would like to be able to plug into the KVM system.  The unraid virtual machine works fine when I first boot it.  The issue is when I switch to another computer and then come back to the original VM monitor, I cannot get the keyboard or mouse input working again.  I assume that the USB devices I passed through to the VM lost contact when I switched away on the KVM switcher, and never got reconnected/passed through when i switched back to the VM. 

 

Is there any sort of plugin or setting that will force a virtual machine to pass back through the same keyboard mouse after they have been briefly disconnected while the virtual machine is still running?

Link to comment
  • 2 weeks later...

Hi, I just wanted to follow up again.    I installed the usbip-gui plugin which said it needed usbip to run, but i did not see that as an installable community plugin.  I found 

and then added the text to the /etc/libvirt/hooks/qemu configuration file and enabled USBIP, but even after doing that I get at the top "Following are missing or not loaded: usbip_host module vhci_hcd module" and then below on USB page under USBIP setting and load kernel modules it also says "The usbipd command missing or usbip_host module not loaded..", "The usbip_host module does not exist..", and "The vhci_hcd module does not exist.." 

 

I clearly am missing a step and something is not installed.   I saw something mentioned in the comments about "The module is the kernel module usbip_host, I think initially limetech only included vhci_hcd and usbip_core. I guess it could be sideloaded with the new process but ideally it should be baked into standard modules if the other two are there already." which implied Limetech might have left something out?  Just wanted to know how do I go about installing what needs to be installed.  Is there some reference or page you could point me to?

 

Thanks for your help

Link to comment
32 minutes ago, WorldTraveller said:

which implied Limetech might have left something out?

The plugin installs the USBIP components if required, but is only supported on 6.9.

 

But I dont think you need the USBIP parts for your requirements,

 

You can turn them off in the USB settings page. You may need to change Enable USBIP to see the other parts, but the load kernel modules should be No and Run Daemon should be disabled. Then change Enable USBIP back to disabled and those messages should be hidden.

 

image.thumb.png.1d2b2309625cdd42271cf50e5e0de1ea.png

 

Link to comment
  • 9 months later...
1 hour ago, PicPoc said:

I use USBIP, nice program.

Me too, with my KVM hardware, I wanted to automatic plug USB & Mouse whenb I switch between different VMs.

Any solution to automoatic assign 1 USB Keyboard & Mouse ?

Thanks ;)

Do you have a separate usb connection for K&M for each VM.

You can create a port mapping to allocate the port to each VM on my plugin. Port will be auto connected when a device is connected.

 

image.thumb.png.e2925bbf7f1fd1ecdd80387b36851c7c.png

image.thumb.png.a903cd07986da9576dfffd963cabd1bc.png

Link to comment
  • 2 weeks later...

I'm in the same boat as others above - need to use my physical KVM switch to move between unraid VMs with my single keyboard and mouse.  As other have said, when the kvm switches to a different unraid VM, things lock up.  Right now I'm just trying to switch between my laptop and a single unraid VM.  So I have mapped the USB devices for mouse and kbd to that vm.  When I first save the config, it works great.  I switch the physical KVM to my laptop, and that works great.  I switch back to the VM and the KBD and Mouse are dead.  I have to unmap them and remap them in unraid control panel to get them to work again.

 

I'll try the suggested solution to see if that works.  If not, I'm eager to work with someone to figure out whats going on & what to do about it.

 

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.