|
8 | 8 |
|
9 | 9 | inherit (microvmConfig)
|
10 | 10 | hostName
|
11 |
| - vcpu mem balloonMem interfaces shares socket forwardPorts devices |
| 11 | + vcpu mem interfaces shares socket forwardPorts devices |
12 | 12 | kernel initrdPath
|
13 | 13 | storeOnDisk storeDisk;
|
14 | 14 |
|
|
72 | 72 | "${pkgs.stratovirt}/bin/stratovirt"
|
73 | 73 | "-name" hostName
|
74 | 74 | "-machine" machine
|
75 |
| - "-m" (toString (mem + balloonMem)) |
| 75 | + "-m" (toString mem) |
76 | 76 | "-smp" (toString vcpu)
|
77 | 77 |
|
78 | 78 | "-kernel" "${kernel}/bzImage"
|
|
88 | 88 | "-device" "virtio-blk-${devType 2},drive=store,id=blk_store"
|
89 | 89 | ] ++
|
90 | 90 | lib.optionals (socket != null) [ "-qmp" "unix:${socket},server,nowait" ] ++
|
91 |
| - # lib.optionals (balloonMem > 0) [ "-device" "virtio-balloon-${devType 3}" ] ++ |
92 | 91 | builtins.concatMap ({ image, letter, ... }: [
|
93 | 92 | "-drive" "id=vd${letter},format=raw,file=${image},aio=io_uring"
|
94 | 93 | "-device" "virtio-blk-${devType 4},drive=vd${letter},id=blk_vd${letter}"
|
95 | 94 | ]) volumes ++
|
96 | 95 | lib.optionals (shares != []) (
|
97 |
| - [ |
98 |
| - # "-object" "memory-backend-memfd,id=mem,size=${toString (mem + balloonMem)}M,share=on" |
99 |
| - # "-numa" "node,memdev=mem" |
100 |
| - ] ++ |
101 | 96 | builtins.concatMap ({ proto, index, socket, source, tag, ... }: {
|
102 | 97 | "virtiofs" = [
|
103 | 98 | "-chardev" "socket,id=fs${toString index},path=${socket}"
|
|
147 | 142 | }.${bus}) devices
|
148 | 143 | ++
|
149 | 144 | lib.optionals (lib.hasPrefix "q35" machine) [
|
150 |
| - # "-drive" "file=${pkgs.qboot}/bios.bin,if=pflash,unit=0,readonly=true" |
151 | 145 | "-drive" "file=${pkgs.OVMF.fd}/FV/OVMF_CODE.fd,if=pflash,unit=0,readonly=true"
|
152 | 146 | "-drive" "file=${pkgs.OVMF.fd}/FV/OVMF_VARS.fd,if=pflash,unit=1,readonly=true"
|
153 | 147 | ]
|
|
0 commit comments