summaryrefslogtreecommitdiff
path: root/gnu/system/vm.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/system/vm.scm')
-rw-r--r--gnu/system/vm.scm10
1 files changed, 7 insertions, 3 deletions
diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm
index e561285964..55cddb1a4b 100644
--- a/gnu/system/vm.scm
+++ b/gnu/system/vm.scm
@@ -187,8 +187,9 @@ made available under the /xchg CIFS share."
;; When USER-BUILDER succeeds, reboot (indicating a
;; success), otherwise die, which causes a kernel panic
;; ("Attempted to kill init!").
- #~(when (zero? (system* #$user-builder))
- (reboot))))
+ #~(if (zero? (system* #$user-builder))
+ (reboot)
+ (exit 1))))
(let ((initrd (or initrd
(base-initrd file-systems
@@ -525,7 +526,10 @@ should set REGISTER-CLOSURES? to #f."
#$os-drv
#:compressor '(#+(file-append gzip "/bin/gzip") "-9n")
#:creation-time (make-time time-utc 0 1)
- #:transformations `((,root-directory -> ""))))))))
+ #:transformations `((,root-directory -> "")))
+
+ ;; Make sure the tarball is fully written before rebooting.
+ (sync))))))
(expression->derivation-in-linux-vm
name build
#:make-disk-image? #f