From eec3cbeba67f40b16bf5289c7ebcb14b16ad72cc Mon Sep 17 00:00:00 2001 From: Simon Deziel Date: Sat, 13 Apr 2024 17:08:46 -0400 Subject: [PATCH] github: check that we can use nested virt inside GHA VMs Signed-off-by: Simon Deziel --- .github/workflows/tests.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 65f2624d4..b275fddae 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -154,6 +154,17 @@ jobs: sudo snap install lxd --channel 5.21/stable || sudo snap refresh lxd --channel 5.21/stable sudo lxd init --auto + # Test if we can nest a VM inside a VM on a GHA VM + sudo lxc launch ubuntu-minimal:22.04 v1 --vm -c limits.memory=2GiB + sleep 300 + sudo lxc exec v1 -- lxd init --auto + sudo lxc exec v1 -- lxc launch ubuntu-minimal-daily:22.04 n1 --vm -c limits.memory=512MiB + sleep 600 + sudo lxc exec v1 -- lxc list + sudo lxc exec v1 -- lxc exec n1 -- cloud-init status --long + + sudo lxc delete -f v1 + chmod +x ~ cd microcloud/test sudo --preserve-env=GITHUB_ACTIONS,TEST_STORAGE_SOURCE,DEBUG DEBUG=1 ./main.sh