unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* Building Qemu VM
@ 2024-12-09  0:29 Timothy Washington
  2024-12-09  8:51 ` Jeremy Korwin-Zmijowski
  2024-12-09  9:27 ` Andreas Enge
  0 siblings, 2 replies; 6+ messages in thread
From: Timothy Washington @ 2024-12-09  0:29 UTC (permalink / raw)
  To: help-guix

I've got an existing `system.scm` which defines `physical-operating-system`
as a guix `operating-system`.

I've created a simplified `vm-image` in its own file `vm.scm`.

(use-modules (gnu)
             (gnu system)
             (gnu system image)
             (gnu system vm)
             (guix gexp))

(load "system.scm")

(define vm-image
  (image
   (operating-system physical-operating-system)
   (format qcow2-image-type)
   (size (* 10 (expt 2 30)))))
vm-image


A. However this configuration is giving me this error, even though i.
qcow2-image-type
<https://guix.gnu.org/manual/en/html_node/image_002dtype-Reference.html#index-qcow2_002dimage_002dtype>
clearly exists. And I ii. I made sure to `guix pull` to the latest version.

$ guix system image -t qcow2 vm.scm
guix system: error: #<<image-type> name: qcow2 constructor: #<procedure
7feb505b76e0 at gnu/system/image.scm:249:16 (t-14c4023038d444da-1784)>>:
invalid 'format' value


B. Removing `(format qcow2-image-type)` gives me this error. So guix wants
the `(format)` field initializer.

$ guix system image -t qcow2 vm.scm
/home/twashing/dotfiles/vm.scm:10:2: error: (image (operating-system
physical-operating-system) (size (* 10 (expt 2 30)))): missing field
initializers (format)


C. And quoting the symbol with `(format 'qcow2-image-type)` doesn't solve
the problem either.

$ guix system image -t qcow2 vm.scm
/home/twashing/dotfiles/vm.scm:12:11: error: qcow2-image-type: invalid
'format' value


D. After combing through the documentation
<https://guix.gnu.org/manual/en/html_node/Invoking-guix-system.html#index-image_002c-creating-disk-images>,
I also tried building an image against my base `system.scm`.

(operating-system
 ...
 (bootloader
    (bootloader-configuration
     (bootloader grub-efi-bootloader)
     (targets (list "/boot/efi"))
     (keyboard-layout keyboard-layout)))
 ...)

But that also fails with this configuration.

$ guix system image --image-type=qcow2 system.scm
guix system: error: EFI bootloader required with GPT partitioning


What am I missing here?

Tim

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-12-11 12:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-09  0:29 Building Qemu VM Timothy Washington
2024-12-09  8:51 ` Jeremy Korwin-Zmijowski
2024-12-11  4:52   ` Timothy Washington
2024-12-09  9:27 ` Andreas Enge
2024-12-11  4:50   ` Timothy Washington
2024-12-11 12:42     ` Andreas Enge

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).