feat(systemd-repart): build image
This commit is contained in:
parent
e7470498e5
commit
af78f1c930
5 changed files with 82 additions and 18 deletions
utils
|
@ -19,7 +19,7 @@ pkgs.writeShellApplication {
|
|||
state="/tmp/patos-qemu-$USER"
|
||||
rm -rf "$state"
|
||||
mkdir -m 700 "$state"
|
||||
truncate -s 1G "$state/disk.raw"
|
||||
qemu-img create -f qcow2 -F raw -b "$(readlink -e "$1")" "$state/disk.qcow2" 2G
|
||||
|
||||
swtpm socket -d --tpmstate dir="$state" \
|
||||
--ctrl type=unixio,path="$state/swtpm-sock" \
|
||||
|
@ -44,7 +44,6 @@ pkgs.writeShellApplication {
|
|||
-device tpm-tis,tpmdev=tpm0 \
|
||||
-netdev id=net00,type=user,hostfwd=tcp::2222-:22 \
|
||||
-device virtio-net-pci,netdev=net00 \
|
||||
-drive "file=fat:rw:patos/,format=raw" \
|
||||
-drive "format=raw,file=$state/disk.raw"
|
||||
-drive "format=qcow2,file=$state/disk.qcow2"
|
||||
'';
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue