From 215a6d1f215c1b2514e7e14ae69adde825f4e72d Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 25 Oct 2019 10:56:39 +0100 Subject: [PATCH] Misc updates to 2xxx slides. --- .../2500-nbdkit-linuxdisk-remote-boot.html | 3 +++ 2019-kvm-forum/2600-remote-boot-risc-v.html | 14 +++++++++++-- 2019-kvm-forum/2700-nbdkit-sh-for-testing.html | 23 ++++++++++++++++++---- 3 files changed, 34 insertions(+), 6 deletions(-) diff --git a/2019-kvm-forum/2500-nbdkit-linuxdisk-remote-boot.html b/2019-kvm-forum/2500-nbdkit-linuxdisk-remote-boot.html index 0c7acb0..0a618bd 100644 --- a/2019-kvm-forum/2500-nbdkit-linuxdisk-remote-boot.html +++ b/2019-kvm-forum/2500-nbdkit-linuxdisk-remote-boot.html @@ -12,4 +12,7 @@ kernel root=UUID=... rw rootfstype=ext4 rootdelay=5 rootwait ip=dhcp console=ttyS0 + +qemu-nbd -t -x / -f raw /dev/rhel/rhel1 +nbdkit linuxdisk ~/root diff --git a/2019-kvm-forum/2600-remote-boot-risc-v.html b/2019-kvm-forum/2600-remote-boot-risc-v.html index f6be8b7..ff13890 100644 --- a/2019-kvm-forum/2600-remote-boot-risc-v.html +++ b/2019-kvm-forum/2600-remote-boot-risc-v.html @@ -5,6 +5,16 @@

Run RISC-V VMs from remote compressed images

-nbdkit --filter=xz curl \
-    https://dl.fedoraproject.org/pub/alt/risc-v/disk-images/fedora/rawhide/20190703.n.0/Developer/Fedora-Developer-Rawhide-20190703.n.0-sda.raw.xz
+nbdkit --filter=cow --filter=xz curl \
+    https://dl.fedoraproject.org/pub/alt/risc-v/
+    disk-images/fedora/rawhide/20190703.n.0/
+    Developer/Fedora-Developer-Rawhide-20190703.n.0-sda.raw.xz
+
+qemu-system-riscv64 \
+    -nographic \
+    -machine virt \
+    -smp 8 \
+    -m 2G \
+    -drive file.driver=nbd,file.host=localhost,
+           file.port=10809
 
diff --git a/2019-kvm-forum/2700-nbdkit-sh-for-testing.html b/2019-kvm-forum/2700-nbdkit-sh-for-testing.html index 36e77dc..7b1826d 100644 --- a/2019-kvm-forum/2700-nbdkit-sh-for-testing.html +++ b/2019-kvm-forum/2700-nbdkit-sh-for-testing.html @@ -4,15 +4,16 @@

nbdkit sh plugin for testing

- - -
+
+
+
+
+
+
+
+
+
 #!/bin/bash
 
 case "$1" in
     get_size) echo 64M ;;
     pread)
-        if [ $4 -le 100000 ] && [ $(( $4+$3 )) -gt 100000 ]; then
+        if [ $4 -le 100000 ] &&
+           [ $(( $4+$3 )) -gt 100000 ]; then
             echo EIO Bad block >&2
             exit 1
         else
@@ -21,3 +22,17 @@
     *) exit 2 ;;
 esac
 
+
+ + +
+On Youtube: +Better loop mounts with NBD — +Take your loop mounts to the next level with nbdkit +
-- 1.8.3.1