summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2023-12-05 14:38:39 +0100
committerAlyssa Ross <hi@alyssa.is>2023-12-05 14:46:53 +0100
commit5e035b64188e8e319bf5509358c95443fbd979f7 (patch)
tree6250e9df5ea25fd5aac3a8583798e2264088fc1d
parent2757209a1994cbdde61c645fa1ef5592150f6d04 (diff)
downloadspectrum-5e035b64188e8e319bf5509358c95443fbd979f7.tar
spectrum-5e035b64188e8e319bf5509358c95443fbd979f7.tar.gz
spectrum-5e035b64188e8e319bf5509358c95443fbd979f7.tar.bz2
spectrum-5e035b64188e8e319bf5509358c95443fbd979f7.tar.lz
spectrum-5e035b64188e8e319bf5509358c95443fbd979f7.tar.xz
spectrum-5e035b64188e8e319bf5509358c95443fbd979f7.tar.zst
spectrum-5e035b64188e8e319bf5509358c95443fbd979f7.zip
img/app: add networking to all test VMs
This allows for some more testing of VMs that require networking.
There still won't be internet access, but having the device at least
be present allows for testing that the applications start up once
waiting for the network times out.

Signed-off-by: Alyssa Ross <hi@alyssa.is>
-rw-r--r--img/app/Makefile6
1 files changed, 4 insertions, 2 deletions
diff --git a/img/app/Makefile b/img/app/Makefile
index 8ac20c8..6d9211e 100644
--- a/img/app/Makefile
+++ b/img/app/Makefile
@@ -119,13 +119,14 @@ run-qemu: $(imgdir)/appvm/blk/root.img start-virtiofsd
 
 run-cloud-hypervisor: $(imgdir)/appvm/blk/root.img start-vhost-user-gpu start-virtiofsd
 	rm -f build/vmm.sock
-	@../../scripts/run-cloud-hypervisor.sh \
+	@../../scripts/with-taps.elb ../../scripts/run-cloud-hypervisor.sh \
 	    --api-socket path=build/vmm.sock \
 	    --memory size=128M,shared=on \
 	    --disk path=$(imgdir)/appvm/blk/root.img,readonly=on \
 	    --disk path=$(RUN_IMG),readonly=on \
 	    --fs tag=virtiofs0,socket=build/virtiofsd.sock \
 	    --gpu socket=build/vhost-user-gpu.sock \
+	    --net tap=tap0 \
 	    --kernel $(KERNEL) \
 	    --cmdline "root=PARTLABEL=root" \
 	    --console tty \
@@ -133,10 +134,11 @@ run-cloud-hypervisor: $(imgdir)/appvm/blk/root.img start-vhost-user-gpu start-vi
 .PHONY: run-cloud-hypervisor
 
 run-crosvm: $(imgdir)/appvm/blk/root.img start-vhost-user-gpu start-virtiofsd
-	$(CROSVM_RUN) \
+	../../scripts/with-taps.elb $(CROSVM_RUN) \
 	    --disk $(imgdir)/appvm/blk/root.img \
 	    --disk $(RUN_IMG) \
 	    -p "console=ttyS0 root=PARTLABEL=root" \
+	    --net tap-name=tap0 \
 	    --vhost-user-fs build/virtiofsd.sock:virtiofs0 \
 	    --vhost-user-gpu build/vhost-user-gpu.sock \
 	    --serial type=file,hardware=serial,path=build/crosvm.log \