From: Richard W.M. Jones Date: Fri, 12 Feb 2021 12:40:51 +0000 (+0000) Subject: Slides 2000. X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=c9c9b9e238abe7ac9ab46645366a8e4564b87f4a;p=libguestfs-talks.git Slides 2000. --- diff --git a/2021-pipelines/2000-trivial-boot.html b/2021-pipelines/2000-trivial-boot.html new file mode 100644 index 0000000..acb6032 --- /dev/null +++ b/2021-pipelines/2000-trivial-boot.html @@ -0,0 +1,17 @@ + + + + +

Trivially booting from a local file

+ +
+┌───────────────┐
+│ fedora-33.img │───────▶ qemu
+└───────────────┘
+
+ +

+ +
+qemu -drive file=fedora-33.img ...
+
diff --git a/2021-pipelines/2100-trivial-boot.term b/2021-pipelines/2100-trivial-boot.term new file mode 100755 index 0000000..5a99fff --- /dev/null +++ b/2021-pipelines/2100-trivial-boot.term @@ -0,0 +1,11 @@ +#!/bin/bash - + +source functions + +# Title. +export title="qemu boot" + +# History. +remember 'qemu-system-x86_64 -machine accel=kvm:tcg -cpu host -m 2048 -display none -drive file=fedora-33.img,format=raw,if=virtio -serial stdio' + +terminal diff --git a/2021-pipelines/2200-boot-over-ssh.html b/2021-pipelines/2200-boot-over-ssh.html new file mode 100644 index 0000000..f0f7844 --- /dev/null +++ b/2021-pipelines/2200-boot-over-ssh.html @@ -0,0 +1,18 @@ + + + + +

Booting over SSH

+ +
+┌───────────────┐  ssh
+│ fedora-33.img │───────▶ qemu
+└───────────────┘
+ remote server
+
+ +

+ +
+qemu -drive file=ssh://remote/path/to/fedora-33.img ...
+
diff --git a/2021-pipelines/2300-boot-over-ssh.term b/2021-pipelines/2300-boot-over-ssh.term new file mode 100755 index 0000000..4e75cf7 --- /dev/null +++ b/2021-pipelines/2300-boot-over-ssh.term @@ -0,0 +1,11 @@ +#!/bin/bash - + +source functions + +# Title. +export title="qemu boot over SSH" + +# History. +remember 'qemu-system-x86_64 -machine accel=kvm:tcg -cpu host -m 2048 -display none -drive file=ssh://kool/mnt/scratch/pipes/fedora-33.img,format=raw,if=virtio,snapshot=on -serial stdio' + +terminal diff --git a/2021-pipelines/2400-boot-snapshot.html b/2021-pipelines/2400-boot-snapshot.html new file mode 100644 index 0000000..e56cffa --- /dev/null +++ b/2021-pipelines/2400-boot-snapshot.html @@ -0,0 +1,20 @@ + + + + +

Booting over SSH with a snapshot

+ +
+┌───────────────┐  ssh   ┌───────────────┐
+│ fedora-33.img │───────▶│ qcow2 file    │───────▶ qemu
+└───────────────┘        └───────────────┘
+ remote server                    local machine
+
+ +

+ +
+qemu-img create -f qcow2 \
+         -b ssh://remote/path/to/fedora-33.img snapshot.qcow2
+qemu -drive file=snapshot.qcow2 ...
+
diff --git a/2021-pipelines/2500-boot-snapshot.term b/2021-pipelines/2500-boot-snapshot.term new file mode 100755 index 0000000..8eed9c3 --- /dev/null +++ b/2021-pipelines/2500-boot-snapshot.term @@ -0,0 +1,12 @@ +#!/bin/bash - + +source functions + +# Title. +export title="qemu boot over SSH with snapshot" + +# History. +remember 'qemu-img create -f qcow2 -F raw -b ssh://kool/mnt/scratch/pipes/fedora-33.img snapshot.qcow2' +remember 'qemu-system-x86_64 -machine accel=kvm:tcg -cpu host -m 2048 -display none -drive file=snapshot.qcow2,format=qcow2,if=virtio -serial stdio' + +terminal diff --git a/2021-pipelines/2600-copying.html b/2021-pipelines/2600-copying.html new file mode 100644 index 0000000..2809ce1 --- /dev/null +++ b/2021-pipelines/2600-copying.html @@ -0,0 +1,20 @@ + + + + +

Making a full local copy

+ +
+┌───────────────┐ssh ┌────────────┐                           ┌───────────┐
+│ fedora-33.img │───▶│ qcow2 file │───▶ qemu-img convert ────▶│ local.img │
+└───────────────┘    └────────────┘                           └───────────┘
+ remote server                           local machine
+
+ +

+ +
+qemu-img create -f qcow2 \
+         -b ssh://remote/path/to/fedora-33.img snapshot.qcow2
+qemu-img convert snapshot.qcow2 local.img -p
+
diff --git a/2021-pipelines/2700-copying.term b/2021-pipelines/2700-copying.term new file mode 100755 index 0000000..2584a2b --- /dev/null +++ b/2021-pipelines/2700-copying.term @@ -0,0 +1,12 @@ +#!/bin/bash - + +source functions + +# Title. +export title="Copying" + +# History. +remember 'qemu-img create -f qcow2 -F raw -b ssh://kool/mnt/scratch/pipes/fedora-33.img snapshot.qcow2' +remember 'qemu-img convert -f qcow2 snapshot.qcow2 -O raw local.img -p' + +terminal diff --git a/2021-pipelines/run b/2021-pipelines/run index 4fadab1..b86d6b3 100755 --- a/2021-pipelines/run +++ b/2021-pipelines/run @@ -16,10 +16,19 @@ unset ftp_proxy talkdir=$PWD ./restore # Check environment. -#(nothing) +if [ ! -d /mnt/scratch/pipes ]; then + echo "Error: no remote server." + exit 1 +fi +if [ ! -f /mnt/scratch/pipes/fedora-33.img ]; then + echo "Error: no remote file." + exit 1 +fi # Precreate any files necessary. -#(nothing) +if [ ! -f fedora-33.img ]; then + virt-builder fedora-33 +fi # Run techtalk. #techtalk-pse "$@"