services: hurd-vm: ‘image’ field has to be an <image> record.
* gnu/services/virtualization.scm (<hurd-vm-configuration>)[image]: Document as being an <image> record. (hurd-vm-disk-image): Remove call to ‘system-image’. (hurd-vm-shepherd-service): Add call to ‘system-image’. * gnu/tests/virtualization.scm (hurd-vm-disk-image-raw): Remove call to ‘system-image’. * doc/guix.texi (Virtualization Services): Adjust accordingly.
This commit is contained in:
		
							parent
							
								
									416933cde5
								
							
						
					
					
						commit
						bab6434f58
					
				
					 3 changed files with 11 additions and 13 deletions
				
			
		| 
						 | 
					@ -35770,8 +35770,8 @@ permissive OpenSSH secure shell daemon listening on port 2222
 | 
				
			||||||
The QEMU package to use.
 | 
					The QEMU package to use.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@item @code{image} (default: @var{hurd-vm-disk-image})
 | 
					@item @code{image} (default: @var{hurd-vm-disk-image})
 | 
				
			||||||
The procedure used to build the disk-image built from this
 | 
					The image object representing the disk image of this virtual machine
 | 
				
			||||||
configuration.
 | 
					(@pxref{System Images}).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@item @code{disk-size} (default: @code{'guess})
 | 
					@item @code{disk-size} (default: @code{'guess})
 | 
				
			||||||
The size of the disk image.
 | 
					The size of the disk image.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1101,7 +1101,7 @@ that will be listening to receive secret keys on port 1004, TCP."
 | 
				
			||||||
               (default %hurd-vm-operating-system))
 | 
					               (default %hurd-vm-operating-system))
 | 
				
			||||||
  (qemu        hurd-vm-configuration-qemu               ;file-like
 | 
					  (qemu        hurd-vm-configuration-qemu               ;file-like
 | 
				
			||||||
               (default qemu-minimal))
 | 
					               (default qemu-minimal))
 | 
				
			||||||
  (image       hurd-vm-configuration-image              ;string
 | 
					  (image       hurd-vm-configuration-image              ;<image>
 | 
				
			||||||
               (thunked)
 | 
					               (thunked)
 | 
				
			||||||
               (default (hurd-vm-disk-image this-record)))
 | 
					               (default (hurd-vm-disk-image this-record)))
 | 
				
			||||||
  (disk-size   hurd-vm-configuration-disk-size          ;number or 'guess
 | 
					  (disk-size   hurd-vm-configuration-disk-size          ;number or 'guess
 | 
				
			||||||
| 
						 | 
					@ -1126,9 +1126,8 @@ is added to the OS specified in CONFIG."
 | 
				
			||||||
         (disk-size (hurd-vm-configuration-disk-size config))
 | 
					         (disk-size (hurd-vm-configuration-disk-size config))
 | 
				
			||||||
         (type      (lookup-image-type-by-name 'hurd-qcow2))
 | 
					         (type      (lookup-image-type-by-name 'hurd-qcow2))
 | 
				
			||||||
         (os->image (image-type-constructor type)))
 | 
					         (os->image (image-type-constructor type)))
 | 
				
			||||||
    (system-image
 | 
					 | 
				
			||||||
    (image (inherit (os->image os))
 | 
					    (image (inherit (os->image os))
 | 
				
			||||||
            (size disk-size)))))
 | 
					           (size disk-size))))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(define (hurd-vm-port config base)
 | 
					(define (hurd-vm-port config base)
 | 
				
			||||||
  "Return the forwarded vm port for this childhurd config."
 | 
					  "Return the forwarded vm port for this childhurd config."
 | 
				
			||||||
| 
						 | 
					@ -1170,7 +1169,7 @@ is added to the OS specified in CONFIG."
 | 
				
			||||||
                      "-m" (number->string #$memory-size)
 | 
					                      "-m" (number->string #$memory-size)
 | 
				
			||||||
                      #$@net-options
 | 
					                      #$@net-options
 | 
				
			||||||
                      #$@options
 | 
					                      #$@options
 | 
				
			||||||
                      "--hda" #+image
 | 
					                      "--hda" #+(system-image image)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                      ;; Cause the service to be respawned if the guest
 | 
					                      ;; Cause the service to be respawned if the guest
 | 
				
			||||||
                      ;; reboots (it can reboot for instance if it did not
 | 
					                      ;; reboots (it can reboot for instance if it did not
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -230,12 +230,11 @@
 | 
				
			||||||
  (let ((os ((@@ (gnu services virtualization) secret-service-operating-system)
 | 
					  (let ((os ((@@ (gnu services virtualization) secret-service-operating-system)
 | 
				
			||||||
             (hurd-vm-configuration-os config)))
 | 
					             (hurd-vm-configuration-os config)))
 | 
				
			||||||
        (disk-size (hurd-vm-configuration-disk-size config)))
 | 
					        (disk-size (hurd-vm-configuration-disk-size config)))
 | 
				
			||||||
    (system-image
 | 
					 | 
				
			||||||
    (image
 | 
					    (image
 | 
				
			||||||
     (inherit hurd-disk-image)
 | 
					     (inherit hurd-disk-image)
 | 
				
			||||||
     (format 'disk-image)
 | 
					     (format 'disk-image)
 | 
				
			||||||
     (size disk-size)
 | 
					     (size disk-size)
 | 
				
			||||||
      (operating-system os)))))
 | 
					     (operating-system os))))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(define %childhurd-os
 | 
					(define %childhurd-os
 | 
				
			||||||
  (simple-operating-system
 | 
					  (simple-operating-system
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Reference in a new issue