From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59781) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dwa7m-0003gS-OM for guix-patches@gnu.org; Mon, 25 Sep 2017 16:37:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dwa7i-0005Ys-IJ for guix-patches@gnu.org; Mon, 25 Sep 2017 16:37:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:50337) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dwa7i-0005Yg-Fg for guix-patches@gnu.org; Mon, 25 Sep 2017 16:37:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dwa7i-0005gx-7d for guix-patches@gnu.org; Mon, 25 Sep 2017 16:37:02 -0400 Subject: [bug#28198] [PATCH 1/4] vm: Add disk-image-size to . Resent-Message-ID: Date: Mon, 25 Sep 2017 21:36:48 +0100 From: Christopher Baines Message-ID: <20170925213648.25ef5dd1@cbaines.net> In-Reply-To: <87y3pzudh7.fsf@gnu.org> References: <20170823101831.72c11e2f@cbaines.net> <20170823092516.6846-1-mail@cbaines.net> <87y3pzudh7.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/IRb_FnYoGJ83gh_IMEavEP5"; protocol="application/pgp-signature" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 28198@debbugs.gnu.org --Sig_/IRb_FnYoGJ83gh_IMEavEP5 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Thu, 31 Aug 2017 14:29:56 +0200 ludo@gnu.org (Ludovic Court=C3=A8s) wrote: > Hi Chris, Thanks for reviewing these patches Ludo, unfortunately its taken me nearly a month to get around to replying. Thankfully, I've made some progress in that time. > Christopher Baines skribis: >=20 > > * gnu/system/vm.scm (): Add > > disk-image-size. > > (port-forwardings->qemu-options): Use disk-image-size from > > . =20 >=20 > In which case is it useful? Perhaps if you want to create lots of > data on the root file system in the MongoDB test? >=20 > Currently builds a shared-store VM (like =E2=80=98guix > system vm=E2=80=99) in which the root file system has a fixed size that= =E2=80=99s > usually good enough. The best answer I have at the moment is that I think MongoDB creates a rather large file, even if it has no data to store in it. I'll do some more investigation to confirm this though. > > --- a/gnu/system/vm.scm > > +++ b/gnu/system/vm.scm > > @@ -653,6 +653,8 @@ it is mostly useful when FULL-BOOT? is true." > > (default #f)) > > (memory-size virtual-machine-memory-size ;integer (MiB) > > (default 256)) > > + (disk-image-size virtual-machine-disk-image-size ;integer > > (bytes) > > + (default (* 70 (expt 2 20)))) =20 >=20 > I think we can use 'guess here as the default value (and we should do > the same in places where #:disk-image-size has an arbitrary default.) I've been looking at this in the last few days. Making 'guess the default value here does mean something, and I think it's a good idea. As far as I can tell, for this specific test, these are the 3 functions that are called on the way to using the actual size, and the defaults they have: system-qemu-image/shared-store-script default: (* (if full-boot? 500 70) (expt 2 20))) system-qemu-image/shared-store default:=20 (* (if full-boot? 500 30)=20 (expt 2 20))) qemu-image default: 'guess =46rom my tests, if the default in the is set to 'guess, then for the mongodb test the guess seems to be 0 MiB at the moment, which doesn't work. I've started looking at setting a sensible default in qemu-image, so that the root filesystem size isn't 0 MiB. While testing with the system tests, I noticed that the ones I was testing with didn't pass without my changes, so I've started looking in to that now. So far, I've got one patch that helps [1], but I think there are other issues. 1: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D28600 --Sig_/IRb_FnYoGJ83gh_IMEavEP5 Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAlnJaOBfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE 9XdZCw/9HUxDzHqWgoE3phxoppE/TUjUufp2rzkCd121meZpm/139UWRDiQdv9Eg icHvsq6iFS46xLyWYndtHoDCTeWwl7/079uRFZjekodmsNxC6YK9JuvgJeXLolwU Kat+1l7ajvG/N46sSbCUHlAIb1obwJLx2jxDariDN/Gnt0/cgAurLIDkuAIYTG+I p3OKGL71J8CmKFY9lQZG1pw/gsCCISSwV6ZHHN6W32AsSRT8fuL4ITwFKXGIGZAz rlT7WPHgD1CE/5UWLkkbC63QTYaOPT0Lz90zJQR6yH2pa1+gqlSdz4T2Pn51tXq6 3V6e7Gk1Okz6Mi8lwvgWBcrrFm6Dc8bU57wCxpsoW7TU/mm9CzrZOcq11BY1wk0L ylYyzA/leMskbRv4hQUQSdjHIaZ3lyHv2myYeXn7FrfYdoVDJme68rNhDxl+iCZO kVJpBpKB9bzpJpnbc4DFzoZ0EphX/SLiYf/yapThns+40C8oAjIvw5Vuz/OYs5zb nXu6awdYb62KUAvjPLS+kRnbZ83cqwXVyEVlgbmxTuwmVStpOxPAahGAEFJqkASy 5L64k2FRNZjGusfaidEH3jX7dg70Q5N0eDc11S1fL0xcYqqETGRyHRT6IXSDAAw/ TUp3nDWdPCRQ3VJ/lrubgBlCpymrKqwIWUY3XbWHlAkNofKLGjo= =Xzkb -----END PGP SIGNATURE----- --Sig_/IRb_FnYoGJ83gh_IMEavEP5--