GNU bug report logs - #45867
hurd-vm: custom disk-size ignored

Previous Next

Package: guix;

Reported by: Jan Nieuwenhuizen <janneke <at> gnu.org>

Date: Thu, 14 Jan 2021 18:04:02 UTC

Severity: normal

Done: Jan Nieuwenhuizen <janneke <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 45867 in the body.
You can then email your comments to 45867 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#45867; Package guix. (Thu, 14 Jan 2021 18:04:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jan Nieuwenhuizen <janneke <at> gnu.org>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Thu, 14 Jan 2021 18:04:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Jan Nieuwenhuizen <janneke <at> gnu.org>
To: bug-guix <at> gnu.org
Subject: hurd-vm: custom disk-size ignored
Date: Thu, 14 Jan 2021 19:03:28 +0100
On current master, setting a bigger disk-size for a childhurd

--8<---------------cut here---------------start------------->8---
      (service hurd-vm-service-type
               (hurd-vm-configuration
                (disk-size (* 12 (expt 2 30))) ;12GiB
--8<---------------cut here---------------end--------------->8---

is being ignored.  I am suspecting

> commit 859b362f81598830d7ff276b96a8724aee3c4db7
> Author: Ludovic Courtès <ludo <at> gnu.org>
> AuthorDate: Mon Dec 7 12:38:25 2020 +0100
>
>     services: hurd-vm: Avoid circular dependency with (gnu system images hurd).
>     
>     * gnu/services/virtualization.scm (hurd-vm-disk-image): Use
>     'lookup-image-type-by-name' instead of referring to 'hurd-disk-image'
>     from (gnu system images hurd).
> ---
>  gnu/services/virtualization.scm | 15 ++++++---------
>  1 file changed, 6 insertions(+), 9 deletions(-)
>
> diff --git a/gnu/services/virtualization.scm b/gnu/services/virtualization.scm
> index eaf0bbd..f435630 100644
> --- a/gnu/services/virtualization.scm
> +++ b/gnu/services/virtualization.scm

[..]

> @@ -913,14 +912,12 @@ that will be listening to receive secret keys on port 1004, TCP."
>  (define (hurd-vm-disk-image config)
>    "Return a disk-image for the Hurd according to CONFIG.  The secret-service
>  is added to the OS specified in CONFIG."
> -  (let ((os (secret-service-operating-system (hurd-vm-configuration-os config)))
> -        (disk-size (hurd-vm-configuration-disk-size config)))
> -    (system-image
> -     (image
> -      (inherit hurd-disk-image)
> -      (format 'compressed-qcow2)
> -      (size disk-size)
> -      (operating-system os)))))

This system-image included (size disk-size), and here

> +  (let* ((os        (secret-service-operating-system
> +                     (hurd-vm-configuration-os config)))
> +         (disk-size (hurd-vm-configuration-disk-size config))
> +         (type      (lookup-image-type-by-name 'hurd-qcow2))
> +         (os->image (image-type-constructor type)))
> +    (system-image (os->image os))))

disk-size goes unused.  So we probably need something like

diff --git a/gnu/services/virtualization.scm b/gnu/services/virtualization.scm
index f435630faf..3ede822183 100644
--- a/gnu/services/virtualization.scm
+++ b/gnu/services/virtualization.scm
@@ -917,7 +917,9 @@ is added to the OS specified in CONFIG."
          (disk-size (hurd-vm-configuration-disk-size config))
          (type      (lookup-image-type-by-name 'hurd-qcow2))
          (os->image (image-type-constructor type)))
-    (system-image (os->image os))))
+    (system-image
+     (image (inherit (os->image os))
+            (size disk-size)))))
 
 (define (hurd-vm-port config base)
   "Return the forwarded vm port for this childhurd config."

Greetings,
Janneke

-- 
Jan Nieuwenhuizen <janneke <at> gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com




Reply sent to Jan Nieuwenhuizen <janneke <at> gnu.org>:
You have taken responsibility. (Thu, 14 Jan 2021 19:22:02 GMT) Full text and rfc822 format available.

Notification sent to Jan Nieuwenhuizen <janneke <at> gnu.org>:
bug acknowledged by developer. (Thu, 14 Jan 2021 19:22:02 GMT) Full text and rfc822 format available.

Message #10 received at 45867-done <at> debbugs.gnu.org (full text, mbox):

From: Jan Nieuwenhuizen <janneke <at> gnu.org>
To: 45867-done <at> debbugs.gnu.org
Subject: Re: bug#45867: hurd-vm: custom disk-size ignored
Date: Thu, 14 Jan 2021 20:21:32 +0100
Jan Nieuwenhuizen writes:

> On current master, setting a bigger disk-size for a childhurd
>
>       (service hurd-vm-service-type
>                (hurd-vm-configuration
>                 (disk-size (* 12 (expt 2 30))) ;12GiB
>
>
> is being ignored.  I am suspecting

[..]

> disk-size goes unused.  So we probably need something like
>
> diff --git a/gnu/services/virtualization.scm b/gnu/services/virtualization.scm
> index f435630faf..3ede822183 100644
> --- a/gnu/services/virtualization.scm
> +++ b/gnu/services/virtualization.scm
> @@ -917,7 +917,9 @@ is added to the OS specified in CONFIG."
>           (disk-size (hurd-vm-configuration-disk-size config))
>           (type      (lookup-image-type-by-name 'hurd-qcow2))
>           (os->image (image-type-constructor type)))
> -    (system-image (os->image os))))
> +    (system-image
> +     (image (inherit (os->image os))
> +            (size disk-size)))))
>  
>  (define (hurd-vm-port config base)
>    "Return the forwarded vm port for this childhurd config."

I can connfirm this works, pushed to master as 5b785b2a62b885a65aeece1399f7e3a732dd1cea.

> Greetings,
> Janneke

-- 
Jan Nieuwenhuizen <janneke <at> gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 12 Feb 2021 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 72 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.