Skip to content

Conversation

@yaroslavborbat
Copy link
Member

@yaroslavborbat yaroslavborbat commented Nov 28, 2025

Description

Add usb-redirect.

Primary functionality added is support for USB redirection in virtualization.
A new subresource usbredir acts as a proxy for attaching a USB flash drive to a VM.
If the VM already existed, it must be restarted before a USB device can be attached this way.
All newly created VMs come with usbredir support enabled by default.
https://kubevirt.io/user-guide/compute/client_passthrough/

usb-redirect provides two operation modes:

  1. native — d8v is built with CGO and requires no external dependencies.
  2. tool — d8v invokes the external usbredirect binary, which must be installed or built manually.
git clone https://gitlab.freedesktop.org/spice/usbredir.git
cd usbredir
meson . build
meson compile -C build
sudo cp ./build/tools/usbredirect /usr/local/bin/

d8v usb-redirect is a helper command that performs the actual USB flash drive attachment.

Why do we need it, and what problem does it solve?

What is the expected result?

Checklist

  • The code is covered by unit tests.
  • e2e tests passed.
  • Documentation updated according to the changes.
  • Changes were tested in the Kubernetes cluster manually.

Changelog entries

section: vm
type: feature
summary: add usbredir

@fl64
Copy link
Member

fl64 commented Dec 1, 2025

Is there a standard package in well-known distributions?

@yaroslavborbat yaroslavborbat marked this pull request as draft December 3, 2025 15:50
@yaroslavborbat yaroslavborbat force-pushed the feat/usbredir branch 2 times, most recently from f1f80ed to 9d2c4db Compare December 9, 2025 20:15
@yaroslavborbat yaroslavborbat marked this pull request as ready for review December 9, 2025 20:15
@yaroslavborbat yaroslavborbat force-pushed the feat/usbredir branch 2 times, most recently from 4be207b to c4c4ef8 Compare December 9, 2025 20:37
@yaroslavborbat yaroslavborbat requested a review from fl64 December 9, 2025 20:38
Signed-off-by: Yaroslav Borbat <[email protected]>
Signed-off-by: Yaroslav Borbat <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants