guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#28198] [PATCH 1/4] vm: Add disk-image-size to <virtual-machine>.


From: Christopher Baines
Subject: [bug#28198] [PATCH 1/4] vm: Add disk-image-size to <virtual-machine>.
Date: Mon, 25 Sep 2017 21:36:48 +0100

On Thu, 31 Aug 2017 14:29:56 +0200
address@hidden (Ludovic Courtès) 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 <address@hidden> skribis:
> 
> > * gnu/system/vm.scm (<virtual-machine>): Add
> >   disk-image-size.
> >   (port-forwardings->qemu-options): Use disk-image-size from
> >   <virtual-machine>.  
> 
> In which case is it useful?  Perhaps if you want to create lots of
> data on the root file system in the MongoDB test?
> 
> Currently <virtual-machine> builds a shared-store VM (like ‘guix
> system vm’) in which the root file system has a fixed size that’s
> 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))))  
> 
> 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: 
  (* (if full-boot? 500 30) 
     (expt 2 20)))

qemu-image default:
  'guess

From my tests, if the default in the <virtual-machine> 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=28600


Attachment: pgpazjJpsFqBO.pgp
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]