From nobody Sat Feb 24 01:51:17 2024 X-Original-To: freebsd-virtualization@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ThVGk6Lrcz5BjSG for ; Sat, 24 Feb 2024 01:51:26 +0000 (UTC) (envelope-from freebsd@shaneware.biz) Received: from mail-relay2.dca2.superb.net (mail-relay2.dca2.superb.net [66.148.95.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4ThVGk2j2Rz4Zds for ; Sat, 24 Feb 2024 01:51:26 +0000 (UTC) (envelope-from freebsd@shaneware.biz) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=superb.net; s=mailrelay; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:To:Subject:MIME-Version:Date:Message-ID:Sender:Reply-To:Cc: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Fg4QF+UHWX/jgsciLKURMKZUCM78vbrzOgk9kbeT+Nc=; b=lLa6f5OR2orxjx2Ty086IK+moU 8LIlJMBcytx2QOc5ARuLejQTPsWz3rtKbwJGBfCosZM5HMnLsVm83Di6ED9X/i/L1BHXn/w/GVBSb qs2RXABbRFBp4zBanI6f9gdKUedKpQQVg2PoeA8NmStKwVwpKIxGxJZ4zdfyhBGV/vf5uq9JHeg/G G9pXyJlQz7dK6+KKXMNOymrGxDhyzayZcpwwZ4j5/x7ZlleSO8pnCw7mi18+tuMHNZ9mBKzEurahC e+V8g1UDWfkd2RcvMxhaie6eKmFvlpHc6hZ7dUqLQHLCroHbAh3mYted3kpyfniQiZoi10RC/8JXn RTYhNP6g==; Received: from ppp230-11.static.internode.on.net ([203.122.230.11] helo=[192.168.9.155]) by mail-relay2.dca2.superb.net with esmtpsa (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (envelope-from ) id 1rdhCF-00086j-E7; Fri, 23 Feb 2024 20:51:24 -0500 Message-ID: <01ccdc98-2b8e-331f-65df-5496f8d16ead@ShaneWare.Biz> Date: Sat, 24 Feb 2024 12:21:17 +1030 List-Id: Discussion List-Archive: https://lists.freebsd.org/archives/freebsd-virtualization List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-virtualization@freebsd.org X-BeenThere: freebsd-virtualization@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: Best way to have a FreeBSD VM for automated testing? To: Jo Durchholz , "freebsd-virtualization@FreeBSD.org" References: <163e57a9-0b61-414c-a8f7-109f5ac90f69@durchholz.org> Content-Language: en-AU From: Shane Ambler In-Reply-To: <163e57a9-0b61-414c-a8f7-109f5ac90f69@durchholz.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-SA-Score: -3.5 X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:14361, ipnet:66.148.95.0/24, country:US] X-Rspamd-Queue-Id: 4ThVGk2j2Rz4Zds On 24/2/24 05:47, Jo Durchholz wrote: > Hi all, > > I'm in repeatable build land, working in Linux and developing a FreeBSD > appliance. > > For tests, I need to run a FreeBSD VM, put some Python code and test > data into it, run the script, and get the test results back. > > Repeatability means: Everything done with the VM needs to be scriptable > (using a GUI for exploring is okay but things have to translate). > Which in turn means that every setup step for a FreeBSD image comes with > a pretty high coding and maintenance cost. > > So my question is: > What's the FreeBSD image that has the least number of steps to get the > base system up and running? I suppose it's the VM-IMAGES section, but is > this correct? > > Follow-up question: > The startup time needs to be as fast as possible. Sub-second would be > great ("don't disrupt the developer's thought stream"). > I see the boot process from a vanilla VM-IMAGES image takes multiple > seconds; can this be sped up to just a few seconds, or do I need to run > the setup and create a VM snapshot at which the VM starts for each test > run? Firecracker - firecracker-microvm.github.io It may add another level of setup but it provides sub-second boot times - and can run FreeBSD https://www.daemonology.net/blog/2022-10-18-FreeBSD-Firecracker.html Not sure if there are any pre-built images with the firecracker kernel, so may not meet your requirements. -- FreeBSD - the place to B...Software Developing Shane Ambler