Message ID | 20230531200906.17790-1-philmd@linaro.org |
---|---|
Headers | show |
Series | tests/vm/freebsd: Get up-to-date package list from lcitool | expand |
On Wed, May 31, 2023 at 10:09:03PM +0200, Philippe Mathieu-Daudé wrote: > Inspired by this patch from Thomas: > https://lore.kernel.org/qemu-devel/20230531090415.40421-1-thuth@redhat.com/ > > Instead of updating the package list manually, use lcitool vars file. > > Philippe Mathieu-Daudé (3): > tests/vm: Pass project source path to build_image() > tests/vm: Introduce get_qemu_packages_from_lcitool_vars() helper > tests/vm/freebsd: Get up-to-date package list from lcitool vars file > > tests/vm/Makefile.include | 1 + > tests/vm/basevm.py | 10 +++++++-- > tests/vm/centos | 2 +- > tests/vm/centos.aarch64 | 2 +- > tests/vm/freebsd | 46 +++++---------------------------------- > tests/vm/haiku.x86_64 | 2 +- > tests/vm/netbsd | 2 +- > tests/vm/openbsd | 2 +- > tests/vm/ubuntuvm.py | 2 +- > 9 files changed, 20 insertions(+), 49 deletions(-) > > -- > 2.38.1 > From my POV the changes are pretty straight-forward, but I'll let others who use this code on pretty much daily basis to comment. What I'll say though is that I only just now looked at the Python VM spawner helpers you have and it left me wondering whether there'd be interest in dropping much of the code in favour of lcitool invocations - not all, not even trying to say it would be 100% smooth, but it would 1) give lcitool even bigger exposure 2) find bugs 3) generalize the functionality even more 4) open doors for more features needed by the community Specifically looking at the vm/centos source file, we recently added support for downloading guests from vendor-provided cloud images (asking libosinfo for the URL to download from )which are cached essentially the same way as your code does and then provisions it using a storage overlay. Package installation and other configuration is done via Ansible, so root SSH is taken care of, serial console is force enabled, etc. If the community were interested in migrating the aforementioned functionality to lcitool wrt/ provisioning local VMs (no FreeBSD at the moment though :( [1]) I'd be happy to help with that. Regards, Erik [1] recently I saw a statement somewhere that FreeBSD is finally considering providing official cloud-init template images and that it should happen some time this year, so knowing this I'd rather wait some more than to add yet another code to special-case the cloud-init provisions with lcitool for FreeBSD