services: hurd-vm: Add machine argument for qemu for 64 bit images.

Fixes issues when memory is >= 3584.

* gnu/services/virtualization.scm (hurd-vm-shepherd-service):
When type is 'hurd64-qcow2 add -M q35 to qemu arguments.

Change-Id: I58ea603faad545294aad52b71aac82c922fd9b96
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Yelninei 2025-11-25 11:48:38 +00:00 committed by Ludovic Courtès
parent c248c4442b
commit 8c1fa0ed12
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -1885,6 +1885,7 @@ is added to the OS specified in CONFIG."
(let ((image (hurd-vm-configuration-image config))
(qemu (hurd-vm-configuration-qemu config))
(memory-size (hurd-vm-configuration-memory-size config))
(type (hurd-vm-configuration-type config))
(options (hurd-vm-configuration-options config))
(id (hurd-vm-configuration-id config))
(net-options (hurd-vm-configuration-net-options config))
@ -1893,8 +1894,14 @@ is added to the OS specified in CONFIG."
(define vm-command
;; XXX: Use the x86_64 emulator instead of the i386 one to work around
;; "Bad ram pointer" issues: <https://issues.guix.gnu.org/66053>.
;; The default qemu machine has problems with high memory on x86_64-gnu
;; https://lists.gnu.org/archive/html/bug-hurd/2025-11/msg00025.html
#~(append (list #$(file-append qemu "/bin/qemu-system-x86_64")
"-m" (number->string #$memory-size)
#$@(if (eq? type 'hurd64-qcow2)
'("-M" "q35")
'())
#$@net-options
#$@options
"--hda" #+(system-image image)