diff options
author | Alyssa Ross <hi@alyssa.is> | 2022-10-09 11:40:31 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2022-11-13 23:58:25 +0000 |
commit | 4ad855540f183d4ce39e57f3e1b6f6bc006cae95 (patch) | |
tree | f51f213451fe6b6410f97a1e72f6b8cba0210502 /vm/app/catgirl/Makefile | |
parent | 435a82a9d09e6aaca27402a45756de1abd37437f (diff) | |
download | spectrum-4ad855540f183d4ce39e57f3e1b6f6bc006cae95.tar spectrum-4ad855540f183d4ce39e57f3e1b6f6bc006cae95.tar.gz spectrum-4ad855540f183d4ce39e57f3e1b6f6bc006cae95.tar.bz2 spectrum-4ad855540f183d4ce39e57f3e1b6f6bc006cae95.tar.lz spectrum-4ad855540f183d4ce39e57f3e1b6f6bc006cae95.tar.xz spectrum-4ad855540f183d4ce39e57f3e1b6f6bc006cae95.tar.zst spectrum-4ad855540f183d4ce39e57f3e1b6f6bc006cae95.zip |
host/start-vm: support multiple block devices
This is the first step to being able to do things like having a static base image for an application VM, and another image containing the application to run. When we actually use multiple images we'll need to change how we boot so we know the kernel is booting from the right image — probably by PARTUUID or PARTLABEL — because we can't guarantee how the kernel orders disks inside the VM. Signed-off-by: Alyssa Ross <hi@alyssa.is> Message-Id: <20221009114036.463071-2-hi@alyssa.is>
Diffstat (limited to 'vm/app/catgirl/Makefile')
-rw-r--r-- | vm/app/catgirl/Makefile | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/vm/app/catgirl/Makefile b/vm/app/catgirl/Makefile index a32826b..9016745 100644 --- a/vm/app/catgirl/Makefile +++ b/vm/app/catgirl/Makefile @@ -12,7 +12,7 @@ VMM = qemu HOST_FILES = host/data/appvm-catgirl/providers/net/netvm HOST_BUILD_FILES = \ - build/host/data/appvm-catgirl/rootfs.ext4 \ + build/host/data/appvm-catgirl/blk/root.img \ build/host/data/appvm-catgirl/vmlinux # We produce a directory, but that doesn't play nice with Make, @@ -35,7 +35,7 @@ build/host/data/appvm-catgirl/vmlinux: $(VMLINUX) # tar2ext4 will leave half a filesystem behind if it's interrupted # half way through. -build/host/data/appvm-catgirl/rootfs.ext4: build/rootfs.tar +build/host/data/appvm-catgirl/blk/root.img: build/rootfs.tar mkdir -p $$(dirname $@) tar2ext4 -i build/rootfs.tar -o $@.tmp mv $@.tmp $@ @@ -92,9 +92,9 @@ build/etc/s6-rc: $(VM_S6_RC_FILES) s6-rc-compile $@ $$dir; \ exit=$$?; rm -r $$dir; exit $$exit -run-qemu: build/host/data/appvm-catgirl/rootfs.ext4 +run-qemu: build/host/data/appvm-catgirl/blk/root.img $(QEMU_KVM) -m 128 -cpu host -machine q35,kernel=$(KERNEL) -vga none \ - -drive file=build/host/data/appvm-catgirl/rootfs.ext4,if=virtio,format=raw,readonly=on \ + -drive file=build/host/data/appvm-catgirl/blk/root.img,if=virtio,format=raw,readonly=on \ -append "console=ttyS0 root=/dev/vda" \ -netdev user,id=net0 \ -device virtio-net,netdev=net0,mac=0A:B3:EC:00:00:00 \ @@ -103,11 +103,11 @@ run-qemu: build/host/data/appvm-catgirl/rootfs.ext4 -device virtconsole,chardev=virtiocon0 .PHONY: run-qemu -run-cloud-hypervisor: build/host/data/appvm-catgirl/rootfs.ext4 +run-cloud-hypervisor: build/host/data/appvm-catgirl/blk/root.img $(CLOUD_HYPERVISOR) \ --api-socket path=vmm.sock \ --memory size=128M \ - --disk path=build/host/data/appvm-catgirl/rootfs.ext4,readonly=on \ + --disk path=build/host/data/appvm-catgirl/blk/root.img,readonly=on \ --net tap=tap0,mac=0A:B3:EC:00:00:00 \ --kernel $(KERNEL) \ --cmdline "console=ttyS0 root=/dev/vda" \ |