From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47882) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dwk5C-0007Jn-3i for guix-patches@gnu.org; Tue, 26 Sep 2017 03:15:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dwk58-0004Lr-Tt for guix-patches@gnu.org; Tue, 26 Sep 2017 03:15:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:50879) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dwk58-0004LT-QC for guix-patches@gnu.org; Tue, 26 Sep 2017 03:15:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dwk58-0003AZ-KE for guix-patches@gnu.org; Tue, 26 Sep 2017 03:15:02 -0400 Subject: [bug#28198] [PATCH 1/4] vm: Add disk-image-size to . Resent-Message-ID: From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <20170823101831.72c11e2f@cbaines.net> <20170823092516.6846-1-mail@cbaines.net> <87y3pzudh7.fsf@gnu.org> <20170925213648.25ef5dd1@cbaines.net> Date: Tue, 26 Sep 2017 09:14:28 +0200 In-Reply-To: <20170925213648.25ef5dd1@cbaines.net> (Christopher Baines's message of "Mon, 25 Sep 2017 21:36:48 +0100") Message-ID: <87y3p22ap7.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: Christopher Baines Cc: 28198@debbugs.gnu.org Hi Chris! Christopher Baines skribis: > 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 >>=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. OK, that=E2=80=99s a good reason anyway. :-) >> > --- 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 >>=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 > > From 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. Indeed. Maybe we can go with your patch as-is and investigate the problem with 'guess separately. Thoughts? (I=E2=80=99ll comment on the other issue separately.) Thanks, Ludo=E2=80=99.