automated vm setup
This is more of a brainstorming bug for now than something actionable. I've been spinning my wheels since learning that I need software GL (and thus mesa drivers) for save states to work properly. I don't want to change the proprietary nvidia drivers on my host system. So far I haven't been able to set up mesa locally, I'm not sure if it's even possible. If I'm going to set up a new Linux install for this, I want to automate it so the time I spend learning how to do this isn't wasted.
System requirements that I know of:
- PulseAudio disabled or simply not present
- Either an X11 server or ssh-forwarding
- Mesa drivers, LIBGL_ALWAYS_SOFTWARE=1
Nice to have:
- Host-agnostic. If I'm automating vm setup, it'd be nice to do it in a way that would work on Windows.
- Binaries for 32-bit libTAS. I don't think any current binary releases have this feature.
- Support & libraries for Wine.
I need to choose a distribution as well as a technology for automating the install.
My go-to for automating vm setup is Vagrant. It can work with X11 forwarding through ssh, but this requires extra setup on a Windows host.
Another possibility is to create a Virtual Appliance that VirtualBox can import. This may require some manual effort on my part for the VirtualBox side, but most distributions provide some mechanism to automate an install.
Are there other options I'm missing?
I also don't know what distribution is best for this. Here are a couple I'm considering.
Gentoo - Pros:
- Highly customizable. One could build without pulseaudio by disabling the corresponding USE flag.
- FAudio, a recent requirement of Wine, is actually packaged. (But does it work with multilib?)
- No need to install separate -dev packages if you want to build things.
- I've used this one before. Cons:
- I'd have to build everything as part of the vm creation.
- The rolling-release nature of Gentoo means that a given image cannot be reproduced once it's made, we can only build with the newest version of everything.
- Things tend to break a lot, or at least that was my experience using Gentoo many years ago.
Debian - Pros:
- FAudio, a recent requirement of Wine, is actually packaged.
- I've used this one before. Cons:
- Unsure if it's possible to install a desktop without pulseaudio.
Any thoughts or other suggestions welcome.
I made some progress using a preseed file with Ubuntu/lxde. Pulse at least uninstalls cleanly, and I have llvmpipe. I've learned that the current binary packages require bionic for libavutil55.
I'm not sure if PulseAudio must be disabled now, as of 77c2229bf9cb21ec11557d3cbd45cd1837b27931 (still better if it could). Yeah, there's a thing with ffmpeg libraries that were renamed (now libavutil56 and libswresample3) because of incompatibilities. I may provide both packages for the next releases.
The nice thing about using a script is that I can easily change such things. I'll use whatever is the recommended version.
I made a repository for my preseed script: https://github.com/madewokherd/libtas-vm
In theory, it should download and install the .deb. I don't have time to test it today.
I would also like to enable autologin and put a shortcut on the desktop.
I'm happy with where this is now, but the exported vm is 1.8 GB, and I'm not sure why it's so big.
https://github.com/madewokherd/libtas-vm/releases/tag/v1.3.4-1