On 5/20/19 9:14 AM, Thomas Huth wrote: > On 20/05/2019 07.26, Gerd Hoffmann wrote: >> On Sun, May 19, 2019 at 12:55:09AM +0200, Philippe Mathieu-Daudé wrote: >>> Hi Gerd, >>> >>> On 5/10/19 12:46 PM, Gerd Hoffmann wrote: >>>> Instead of fetching the prebuilt image from patchew download the install >>>> iso and prepare the image locally. Install to disk, using the serial >>>> console. Create qemu user, configure ssh login. Install packages >>>> needed for qemu builds. >>> >>> I'm impressed how charmly this works :) >>> >>> 3 comments so far. >>> >>> 1/ We could record (in tests/vm/freebsd header?) roughly how many local >>> storage will be used (or display in 'make vm-help'?). FYI this image >>> takes ~3.1GiB. >> >> vm-help would be more useful I think. >> >>> 2/ "Autoboot in 9 seconds, hit [Enter] to boot or any other key to stop" >> >> Probably tweakable via loader.conf, I'll check. >> >>> 3/ I am a bit annoyed it overwrote my previous >>> ~/.cache/qemu-vm/images/freebsd.img VM. Not sure what's the best hash to >>> use, maybe "git log -n 1 --pretty=format:%H -- tests/vm/freebsd"? >>> (Similarly for other images). >> >> Then use ~/.cache/qemu-vm/images/freebsd-${hash}.img ? >> >> Which will fill ~/.cache/qemu-vm/images with stale images over time, >> which isn't great either ... >> >> Or do you have something else in mind?
Maybe we can simply use a ${VM_IMG_VERSION} and manually increase it when there are significant changes. We could add a "make vm-clean-cache-older-than-%" parsing the "20days/3months/2y" formats? > I'd vote to keep the current approach to overwrite "freebsd.img". It's a > "cache" directory - if you want to have something persisten, Philippe, I > think you should simply copy your image to a different location instead. My concern came when thinking about bisecting: $ git log --oneline \ $(git log --pretty=format:%H \ --diff-filter=A -- tests/vm/freebsd)..origin/master | wc -l 13016 But then I only used "make check-vm" while bisecting twice, so I can stop worrying about testing old VMs. Regards, Phil.