diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2025-11-13 22:39:32 +0100 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2025-12-03 17:56:15 +0100 |
| commit | d4e06997e4d6288111801c852b0b8a10177815e9 (patch) | |
| tree | d4ca4afae6f14586809c77b02332f2ca59ee5ffe /doc | |
| parent | e7da674bc7edd2321e42ef021c8925fefa995313 (diff) | |
services: hurd-vm: Support persistent images again.
Fixes a regression introduced in bab6434f5855b92631615fdd8a2d2a225da28359
whereby following the example from the manual regarding non-volatile images
would no longer work.
* gnu/services/virtualization.scm (hurd-vm-shepherd-service): Pass ‘image’ to
‘system-image’ only if it’s an image.
* doc/guix.texi (Virtualization Services): Explicitly say that the ‘image’
field can contain a file name. Remove use of ‘const’ for the ‘image’ field in
persistent image example and adjust text.
Fixes: guix/guix#4130
Reported-by: Maxim Cournoyer <maxim@guixotic.coop>
Change-Id: I1a81ce27fb45978a681310b8a8788ab671b3edf8
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/guix.texi | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/doc/guix.texi b/doc/guix.texi index df75ebd593f..89fa609124d 100644 --- a/doc/guix.texi +++ b/doc/guix.texi | |||
| @@ -40911,6 +40911,10 @@ The image type name. Use @code{'hurd-qcow2} for a 32-bit image or | |||
| 40911 | The image object representing the disk image of this virtual machine | 40911 | The image object representing the disk image of this virtual machine |
| 40912 | (@pxref{System Images}). | 40912 | (@pxref{System Images}). |
| 40913 | 40913 | ||
| 40914 | Alternatively, this can be the file name (a string) of an image, which | ||
| 40915 | is useful if you want the image to persist across service restarts---see | ||
| 40916 | example below. | ||
| 40917 | |||
| 40914 | @item @code{disk-size} (default: @code{'guess}) | 40918 | @item @code{disk-size} (default: @code{'guess}) |
| 40915 | The size of the disk image. | 40919 | The size of the disk image. |
| 40916 | 40920 | ||
| @@ -41009,15 +41013,16 @@ with the following non-volatile secrets, unless they already exist: | |||
| 41009 | @end table | 41013 | @end table |
| 41010 | @end deftp | 41014 | @end deftp |
| 41011 | 41015 | ||
| 41012 | Note that by default the VM image is volatile, i.e., once stopped the | 41016 | Note that by default the VM image is volatile---i.e., once the service |
| 41013 | contents are lost. If you want a stateful image instead, override the | 41017 | is stopped, the contents are lost. If you want a persistent image |
| 41014 | configuration's @code{image} and @code{options} without | 41018 | instead, override the configuration's @code{image} and @code{options} |
| 41015 | the @code{--snapshot} flag using something along these lines: | 41019 | without the @option{--snapshot} flag using something along these lines: |
| 41016 | 41020 | ||
| 41017 | @lisp | 41021 | @lisp |
| 41018 | (service hurd-vm-service-type | 41022 | (service hurd-vm-service-type |
| 41019 | (hurd-vm-configuration | 41023 | (hurd-vm-configuration |
| 41020 | (image (const "/out/of/store/writable/hurd.img")) | 41024 | ;; Specify an out-of-store, persistent image. |
| 41025 | (image "/out/of/store/writable/hurd.img") | ||
| 41021 | (options '()))) | 41026 | (options '()))) |
| 41022 | @end lisp | 41027 | @end lisp |
| 41023 | 41028 | ||
