cloud-rawhide: Add
authorMartin Pitt <martin@piware.de>
Wed, 4 May 2022 07:36:13 +0000 (09:36 +0200)
committerMartin Pitt <martin@piware.de>
Wed, 4 May 2022 07:36:13 +0000 (09:36 +0200)
Moved from notes

cloud-rawhide [new file with mode: 0755]

diff --git a/cloud-rawhide b/cloud-rawhide
new file mode 100755 (executable)
index 0000000..d10f3f4
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/sh
+set -eu
+
+if [ ! -e rawhide.qcow2 ]; then
+    IMG=$(curl -s -L https://download.fedoraproject.org/pub/fedora/linux/development/rawhide/Cloud/x86_64/images/ | grep -o 'Fedora-Cloud-Base-Rawhide[^"]*qcow2' | head -n1)
+    curl -L -o rawhide.qcow2 https://download.fedoraproject.org/pub/fedora/linux/development/rawhide/Cloud/x86_64/images/$IMG
+fi
+
+# nothing fancy, just admin:foobar and root:foobar users
+[ -e cloud-init.iso ] || curl -L -O https://github.com/cockpit-project/bots/raw/main/machine/cloud-init.iso
+
+qemu-system-x86_64 -cpu host -enable-kvm -nographic -m 2048 -drive file=rawhide.qcow2,if=virtio -snapshot -cdrom cloud-init.iso -net nic,model=virtio -net user,hostfwd=tcp::22001-:22