Slides 2000.
authorRichard W.M. Jones <rjones@redhat.com>
Fri, 12 Feb 2021 12:40:51 +0000 (12:40 +0000)
committerRichard W.M. Jones <rjones@redhat.com>
Fri, 12 Feb 2021 12:53:44 +0000 (12:53 +0000)
2021-pipelines/2000-trivial-boot.html [new file with mode: 0644]
2021-pipelines/2100-trivial-boot.term [new file with mode: 0755]
2021-pipelines/2200-boot-over-ssh.html [new file with mode: 0644]
2021-pipelines/2300-boot-over-ssh.term [new file with mode: 0755]
2021-pipelines/2400-boot-snapshot.html [new file with mode: 0644]
2021-pipelines/2500-boot-snapshot.term [new file with mode: 0755]
2021-pipelines/2600-copying.html [new file with mode: 0644]
2021-pipelines/2700-copying.term [new file with mode: 0755]
2021-pipelines/run

diff --git a/2021-pipelines/2000-trivial-boot.html b/2021-pipelines/2000-trivial-boot.html
new file mode 100644 (file)
index 0000000..acb6032
--- /dev/null
@@ -0,0 +1,17 @@
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+<link rel="stylesheet" href="style.css" type="text/css"/>
+<script src="code.js" type="text/javascript"></script>
+
+<h1>Trivially booting from a local file</h1>
+
+<pre>
+┌───────────────┐
+│ fedora-33.img │───────▶ qemu
+└───────────────┘
+</pre>
+
+<br/><br/>
+
+<pre>
+qemu -drive file=<b>fedora-33.img</b> ...
+</pre>
diff --git a/2021-pipelines/2100-trivial-boot.term b/2021-pipelines/2100-trivial-boot.term
new file mode 100755 (executable)
index 0000000..5a99fff
--- /dev/null
@@ -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 (file)
index 0000000..f0f7844
--- /dev/null
@@ -0,0 +1,18 @@
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+<link rel="stylesheet" href="style.css" type="text/css"/>
+<script src="code.js" type="text/javascript"></script>
+
+<h1>Booting over SSH</h1>
+
+<pre>
+┌───────────────┐  ssh
+│ fedora-33.img │───────▶ qemu
+└───────────────┘
+ remote server
+</pre>
+
+<br/><br/>
+
+<pre>
+qemu -drive file=<b>ssh://remote/path/to/fedora-33.img</b> ...
+</pre>
diff --git a/2021-pipelines/2300-boot-over-ssh.term b/2021-pipelines/2300-boot-over-ssh.term
new file mode 100755 (executable)
index 0000000..4e75cf7
--- /dev/null
@@ -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 (file)
index 0000000..e56cffa
--- /dev/null
@@ -0,0 +1,20 @@
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+<link rel="stylesheet" href="style.css" type="text/css"/>
+<script src="code.js" type="text/javascript"></script>
+
+<h1>Booting over SSH with a snapshot</h1>
+
+<pre>
+┌───────────────┐  ssh   ┌───────────────┐
+│ fedora-33.img │───────▶│ qcow2 file    │───────▶ qemu
+└───────────────┘        └───────────────┘
+ remote server                    local machine
+</pre>
+
+<br/><br/>
+
+<pre>
+qemu-img create -f qcow2 \
+         -b <b>ssh://remote/path/to/fedora-33.img</b> snapshot.qcow2
+qemu -drive file=<b>snapshot.qcow2</b> ...
+</pre>
diff --git a/2021-pipelines/2500-boot-snapshot.term b/2021-pipelines/2500-boot-snapshot.term
new file mode 100755 (executable)
index 0000000..8eed9c3
--- /dev/null
@@ -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 (file)
index 0000000..2809ce1
--- /dev/null
@@ -0,0 +1,20 @@
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+<link rel="stylesheet" href="style.css" type="text/css"/>
+<script src="code.js" type="text/javascript"></script>
+
+<h1>Making a full local copy</h1>
+
+<pre>
+┌───────────────┐ssh ┌────────────┐                           ┌───────────┐
+│ fedora-33.img │───▶│ qcow2 file │───▶ qemu-img convert ────▶│ local.img │
+└───────────────┘    └────────────┘                           └───────────┘
+ remote server                           local machine
+</pre>
+
+<br/><br/>
+
+<pre>
+qemu-img create -f qcow2 \
+         -b <b>ssh://remote/path/to/fedora-33.img</b> snapshot.qcow2
+qemu-img convert snapshot.qcow2 local.img -p
+</pre>
diff --git a/2021-pipelines/2700-copying.term b/2021-pipelines/2700-copying.term
new file mode 100755 (executable)
index 0000000..2584a2b
--- /dev/null
@@ -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
index 4fadab1..b86d6b3 100755 (executable)
@@ -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 "$@"