aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2014-04-10 21:31:08 +0200
committerLudovic Courtès <ludo@gnu.org>2014-04-10 21:41:58 +0200
commit1f3838ac5d1f74ca9f5fa49010eeffdd9788fd6a (patch)
tree92c81b158e14fcb21fa0ec1762d82a2268b54dda /gnu
parent47d347b725aa5bb64468b99da1fc3a644cf1e1c2 (diff)
downloadpatches-1f3838ac5d1f74ca9f5fa49010eeffdd9788fd6a.tar
patches-1f3838ac5d1f74ca9f5fa49010eeffdd9788fd6a.tar.gz
vm: Use QEMU's para-virtualized file system support for all VMs.
* gnu/system/vm.scm (system-qemu-image/shared-store-script): Change #:qemu to default to QEMU. Change INITRD to use a 9p mount for the store. Change command-line to use -virtfs.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/system/vm.scm10
1 files changed, 4 insertions, 6 deletions
diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm
index f98a8a70e3..a7d81feb4a 100644
--- a/gnu/system/vm.scm
+++ b/gnu/system/vm.scm
@@ -508,13 +508,11 @@ with the host."
(define* (system-qemu-image/shared-store-script
os
#:key
- (qemu (package (inherit qemu)
- ;; FIXME/TODO: Use 9p instead of this hack.
- (source (package-source qemu/smb-shares))))
+ (qemu qemu)
(graphic? #t))
"Return a derivation that builds a script to run a virtual machine image of
OS that shares its store with the host."
- (let* ((initrd (qemu-initrd #:mounts `((cifs "/store" ,(%store-prefix)))
+ (let* ((initrd (qemu-initrd #:mounts `((9p "store" ,(%store-prefix)))
#:volatile-root? #t))
(os (operating-system (inherit os) (initrd initrd))))
(define builder
@@ -531,9 +529,9 @@ OS that shares its store with the host."
(lambda (port)
(display
(string-append "#!" ,bash "
-# TODO: -virtfs local,path=XXX,security_model=none,mount_tag=store
exec " ,qemu " -enable-kvm -no-reboot -net nic,model=virtio \
- -net user,smb=$PWD \
+ -virtfs local,path=" ,(%store-prefix) ",security_model=none,mount_tag=store \
+ -net user \
-kernel " ,kernel " -initrd "
,(string-append (derivation->output-path initrd) "/initrd") " \
-append \"" ,(if graphic? "" "console=ttyS0 ")