Re-introducing USB pass-though but using YAML argument "usb" instead o…#4825
Open
FlUxIuS wants to merge 1 commit intolima-vm:masterfrom
Open
Re-introducing USB pass-though but using YAML argument "usb" instead o…#4825FlUxIuS wants to merge 1 commit intolima-vm:masterfrom
FlUxIuS wants to merge 1 commit intolima-vm:masterfrom
Conversation
…f twiking with "video"
AkihiroSuda
reviewed
Apr 10, 2026
| @@ -1 +0,0 @@ | |||
| cidata.TEMPLATE.d/user-data No newline at end of file | |||
AkihiroSuda
reviewed
Apr 10, 2026
| args = append(args, "-device", "qemu-xhci,id=usb-bus") | ||
| } else if *y.USB { | ||
| // Add USB controller without display for USB device passthrough | ||
| args = append(args, "-device", "qemu-xhci,id=usb-bus") |
Member
There was a problem hiding this comment.
I guess the qemu-xhci device can be unconditionally added?
Author
There was a problem hiding this comment.
Yes, maybe I'm also focusing too much on making it work on macOS Apple Silicon. So maybe the parameter usb should be qemu-xhci instead of true
AkihiroSuda
reviewed
Apr 10, 2026
| @@ -1 +0,0 @@ | |||
| ../../templates/default.yaml No newline at end of file | |||
AkihiroSuda
reviewed
Apr 10, 2026
| Firmware Firmware `yaml:"firmware,omitempty" json:"firmware,omitempty"` | ||
| Audio Audio `yaml:"audio,omitempty" json:"audio,omitempty"` | ||
| Video Video `yaml:"video,omitempty" json:"video,omitempty"` | ||
| USB *bool `yaml:"usb,omitempty" json:"usb,omitempty" jsonschema:"nullable"` |
Member
There was a problem hiding this comment.
Suggested change
| USB *bool `yaml:"usb,omitempty" json:"usb,omitempty" jsonschema:"nullable"` | |
| USB USB `yaml:"usb,omitempty" json:"usb,omitempty" jsonschema:"nullable"` |
For consistency with Audio and Video
AkihiroSuda
reviewed
Apr 10, 2026
| args = append(args, "-device", "virtio-"+input+"-pci") | ||
| args = append(args, "-device", "qemu-xhci,id=usb-bus") | ||
| } else if *y.USB { | ||
| // Add USB controller without display for USB device passthrough |
Member
There was a problem hiding this comment.
Where is the passthrough implementation?
How did you test it?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Compared to v1.2.3, attaching a USB device is impossible without using the
videoparameter in a YAML configuration for an instance to injectqemu-xhci,id=usbwhen running QEMU.So we introduced a
usb: true|falseparameters that allows to do so.