Fix Bazel on properly sandboxed execution
Test Plan: Tested by launching VM
X-Origin-Diff: phab/D199
GitOrigin-RevId: d27f09e62067082ca0d6f40510c851752094b481
diff --git a/BUILD b/BUILD
index 555b968..0057b1f 100644
--- a/BUILD
+++ b/BUILD
@@ -23,6 +23,7 @@
outs = [
"tpm/tpm2-00.permall",
],
+ tags = ["local"],
cmd = """
mkdir tpm
diff --git a/scripts/BUILD b/scripts/BUILD
index a071996..2761d41 100644
--- a/scripts/BUILD
+++ b/scripts/BUILD
@@ -1,6 +1,7 @@
sh_binary(
name = "launch",
srcs = ["launch.sh"],
+ tags = ["local"],
data = [
"@//:image",
"@//:swtpm_data",
diff --git a/scripts/launch.sh b/scripts/launch.sh
index 4704272..69cc5fe 100755
--- a/scripts/launch.sh
+++ b/scripts/launch.sh
@@ -6,7 +6,7 @@
-cpu host -smp sockets=1,cpus=1,cores=2,threads=2,maxcpus=4 -m 1024 -machine q35 -enable-kvm -nographic -nodefaults \
-drive if=pflash,format=raw,readonly,file=external/edk2/OVMF_CODE.fd \
-drive if=pflash,format=raw,snapshot=on,file=external/edk2/OVMF_VARS.fd \
- -drive if=virtio,format=raw,cache=unsafe,file=smalltown.img \
+ -drive if=virtio,format=raw,snapshot=on,cache=unsafe,file=smalltown.img \
-netdev user,id=net0,hostfwd=tcp::7833-:7833,hostfwd=tcp::7834-:7834 \
-device virtio-net-pci,netdev=net0 \
-chardev socket,id=chrtpm,path=tpm-socket \