vm: 'expression->derivation-in-linux-vm' uses QEMU virtfs/9p.
* gnu/system/vm.scm (expression->derivation-in-linux-vm): Change #:qemu to default to QEMU-HEADLESS. Use "-net nic,model=virtio". Remove "-net user,smb=..." and add "-virtfs" options. Change default initrd to include two 9p mounts.
This commit is contained in:
parent
e1f88ff0ab
commit
f200b03e06
|
@ -70,7 +70,7 @@
|
||||||
(inputs '())
|
(inputs '())
|
||||||
(linux linux-libre)
|
(linux linux-libre)
|
||||||
initrd
|
initrd
|
||||||
(qemu qemu/smb-shares)
|
(qemu qemu-headless)
|
||||||
(env-vars '())
|
(env-vars '())
|
||||||
(modules '())
|
(modules '())
|
||||||
(guile-for-build
|
(guile-for-build
|
||||||
|
@ -157,8 +157,13 @@ made available under the /xchg CIFS share."
|
||||||
|
|
||||||
(and (zero?
|
(and (zero?
|
||||||
(system* qemu "-enable-kvm" "-nographic" "-no-reboot"
|
(system* qemu "-enable-kvm" "-nographic" "-no-reboot"
|
||||||
"-net" "nic,model=e1000"
|
"-net" "nic,model=virtio"
|
||||||
"-net" (string-append "user,smb=" (getcwd))
|
"-virtfs"
|
||||||
|
,(string-append "local,id=store_dev,path=" (%store-prefix)
|
||||||
|
",security_model=none,mount_tag=store")
|
||||||
|
"-virtfs"
|
||||||
|
,(string-append "local,id=xchg_dev,path=xchg"
|
||||||
|
",security_model=none,mount_tag=xchg")
|
||||||
"-kernel" linux
|
"-kernel" linux
|
||||||
"-initrd" initrd
|
"-initrd" initrd
|
||||||
"-append" (string-append "console=ttyS0 --load="
|
"-append" (string-append "console=ttyS0 --load="
|
||||||
|
@ -182,7 +187,9 @@ made available under the /xchg CIFS share."
|
||||||
(coreutils -> (car (assoc-ref %final-inputs "coreutils")))
|
(coreutils -> (car (assoc-ref %final-inputs "coreutils")))
|
||||||
(initrd (if initrd ; use the default initrd?
|
(initrd (if initrd ; use the default initrd?
|
||||||
(return initrd)
|
(return initrd)
|
||||||
(qemu-initrd #:guile-modules-in-chroot? #t)))
|
(qemu-initrd #:guile-modules-in-chroot? #t
|
||||||
|
#:mounts `((9p "store" ,(%store-prefix))
|
||||||
|
(9p "xchg" "/xchg")))))
|
||||||
(inputs (lower-inputs `(("qemu" ,qemu)
|
(inputs (lower-inputs `(("qemu" ,qemu)
|
||||||
("linux" ,linux)
|
("linux" ,linux)
|
||||||
("initrd" ,initrd)
|
("initrd" ,initrd)
|
||||||
|
@ -304,7 +311,7 @@ such as /etc files."
|
||||||
(begin
|
(begin
|
||||||
(display "creating ext3 partition...\n")
|
(display "creating ext3 partition...\n")
|
||||||
(and (zero? (system* mkfs "-F" "/dev/sda1"))
|
(and (zero? (system* mkfs "-F" "/dev/sda1"))
|
||||||
(let ((store (string-append "/fs" ,%store-directory)))
|
(let ((store (string-append "/fs" ,(%store-prefix))))
|
||||||
(display "mounting partition...\n")
|
(display "mounting partition...\n")
|
||||||
(mkdir "/fs")
|
(mkdir "/fs")
|
||||||
(mount "/dev/sda1" "/fs" "ext3")
|
(mount "/dev/sda1" "/fs" "ext3")
|
||||||
|
|
Loading…
Reference in New Issue