-
Notifications
You must be signed in to change notification settings - Fork 792
feat: QEMU SPICE display and audio support #4479
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
- Add SPICEOptions to YAML schema (GL, streamingVideo, agent, audio) - Detect SPICE audio configuration and route through spice audiodev - Query SPICE port via QMP for display connection - Add SPICE password change support via QMP - Add unit tests for SPICE audio detection Signed-off-by: stuffbucket <231133237+stuffbucket@users.noreply.github.com>
d90ead1 to
9337bf6
Compare
|
There is a trailing new line on the ubuntu-desktop-spice.yaml template. I can resubmit the PR if you'd like. I tried to catch all the linting in the branch but this one got through. I don't want to trigger CI runners for a blank line at the end of the file unless that's what is desired (assuming the PR gets accepted). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems too many templates; they could be consolidated with params?
Lines 96 to 97 in cb0e125
| param: | |
| containerdSnapshotter: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should only add the minimal template, the rest (ubuntu desktop) are better off downstream?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's fine with me. I can put them on my github page if folks are ok with that. I'm not sure what the convention is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ubuntu-desktop
This seems xubuntu, not ubuntu
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True. I wasn't sure if the naming convention should reflect Ubuntu or Xubuntu. I can change or reduce the number of templates and host them elsewhere. These were only intended as examples.
| loadDotSSHPubKeys: true | ||
|
|
||
| firmware: | ||
| legacyBIOS: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Default configurations do not need to be copied
|
|
||
| ssh: | ||
| localPort: 0 | ||
| loadDotSSHPubKeys: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why?
| mounts: | ||
| - location: "~" | ||
| - location: "/tmp/lima" | ||
| writable: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why?
|
|
||
| cpus: 4 | ||
| memory: "8GiB" | ||
| disk: "50GiB" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use the default values?
They are automatically adjusted depending on the amount of the host resources.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I specified resources in the template so that it was clearer what a well performing VM with a full desktop would probably need. I've run the debian-trixie-plasma template on 2 vCPUS with less RAM. These could be removed or turned into a comment that points to the distro's resource suggestions.
| This will take several minutes and the VM will reboot automatically. | ||
|
|
||
| After the VM reboots, connect to the SPICE display: | ||
| remote-viewer spice://127.0.0.1:5930 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Password?
like
lima/templates/experimental/vnc.yaml
Line 47 in cb0e125
| * VNC Password: see <file://{{.Dir}}/vncpassword> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I can tell, the code is reusing the VNC password for the SPICE password.
We might want to make the messages and filenames more generic, some day?
| macOS: brew install virt-viewer | ||
| Linux: sudo apt-get install virt-viewer | ||
|
|
||
| The desktop will auto-login as user: lima |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is the user name changed?
|
I'm getting an error from the message: template: format:21:19: executing "format" at <.Video.Display>: can't evaluate field Video in type store.FormatData] |
|
Will need some better checking and reporting, right now the driver will crash with only a debug message. "qemu[stderr]: qemu-system-x86_64: -audiodev spice,id=default: Parameter 'driver' does not accept value 'spice'" |
|
@stuffbucket the DCO will require you to use your real name for signing the commits:
|
Adds SPICE protocol support for QEMU VMs. SPICE provides remote display with audio streaming, clipboard sharing, and optional OpenGL acceleration.
Changes:
Templates: