Description
Background
I use Hyper-V on Windows 10/11 desktops regularly for development and testing. This is mostly for my personal interest and open-source contributions, but I sometimes use it to reproduce issues developers report at work related to our internal tools.
I have some rough scripts I use to speed up setting up new distros, and generally use those instead of Vagrant so that I can also review and understand changes to the setup experience. Additionally, some desktop distributions still lack a full 'kickstart' or cloud-init which makes them much harder to manage through Vagrant.
Once installed, I generally do some basic checks with lsmod
, journalctl
, and other tools to verify the correct modules are installed. I look at reported resolutions, errors, and other clues around Wayland or X11 initialization. I have been able to submit bugs and/or fixes to Fedora to make hyperv_drm the default, and more recently to diagnose and test a bug that prevented KDE Plasma's wayland compositor from starting in a Hyper-V VM. Resolution switching now works well in Fedora, but some issues still remain in Ubuntu 22+.
Proposal
Since there are already ways to run on Azure, AWS, QEmu, I would like to see a way to wrap up local Hyper-V management with Lisa as well. The desktop distros I normally test are not often used in cloud environments, so I don't see Azure being a replacement for this testing.
Right now it looks like the best way I could take advantage of Lisa is to use the "Ready" runbook, but that still leaves VM management up to me. I think that could work as a good starting point for tests once a VM has been deployed.
One possible workflow I'm considering is:
- Find or create a simple PyTest fixture that will serve as a wrapper to handle the basic VM operations needed. It does not need to be comprehensive, just a set of common configurations that should work for most modern distros. Generation 2, Secure Boot on w/ open-source signing certificate configured, auto snapshot disabled, and default resolution set to 1080p. This could just be a wrapper around some short PowerShell scripts initially
- Capture kickstart files, or manual test steps that could be relayed to a user doing manual testing following the VM configuration, leading them through the remaining steps needed to finish the distro install through enabling SSH. This sounds a lot like Vagrant's job, but as mentioned above, that is not always suitable when working with desktop distro testing from ISO files
- Bootstrap Python and the code in this repo
- Run the "READY" runbook
- Run an additional runbook focused on basic smoke tests for the desktop environment. Capture screenshots at each step to help identify defects. This should include confirming the appropriate display protocol (Wayland preferred), resolution set, resolution enumeration, etc
- Copy results & screenshots out of the VM
- Clean up VM