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.
This commit is contained in:
parent
47d347b725
commit
1f3838ac5d
|
@ -508,13 +508,11 @@ with the host."
|
||||||
(define* (system-qemu-image/shared-store-script
|
(define* (system-qemu-image/shared-store-script
|
||||||
os
|
os
|
||||||
#:key
|
#:key
|
||||||
(qemu (package (inherit qemu)
|
(qemu qemu)
|
||||||
;; FIXME/TODO: Use 9p instead of this hack.
|
|
||||||
(source (package-source qemu/smb-shares))))
|
|
||||||
(graphic? #t))
|
(graphic? #t))
|
||||||
"Return a derivation that builds a script to run a virtual machine image of
|
"Return a derivation that builds a script to run a virtual machine image of
|
||||||
OS that shares its store with the host."
|
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))
|
#:volatile-root? #t))
|
||||||
(os (operating-system (inherit os) (initrd initrd))))
|
(os (operating-system (inherit os) (initrd initrd))))
|
||||||
(define builder
|
(define builder
|
||||||
|
@ -531,9 +529,9 @@ OS that shares its store with the host."
|
||||||
(lambda (port)
|
(lambda (port)
|
||||||
(display
|
(display
|
||||||
(string-append "#!" ,bash "
|
(string-append "#!" ,bash "
|
||||||
# TODO: -virtfs local,path=XXX,security_model=none,mount_tag=store
|
|
||||||
exec " ,qemu " -enable-kvm -no-reboot -net nic,model=virtio \
|
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 "
|
-kernel " ,kernel " -initrd "
|
||||||
,(string-append (derivation->output-path initrd) "/initrd") " \
|
,(string-append (derivation->output-path initrd) "/initrd") " \
|
||||||
-append \"" ,(if graphic? "" "console=ttyS0 ")
|
-append \"" ,(if graphic? "" "console=ttyS0 ")
|
||||||
|
|
Loading…
Reference in New Issue