diff options
author | johannst <johannst@users.noreply.github.com> | 2021-11-24 23:50:09 +0000 |
---|---|---|
committer | johannst <johannst@users.noreply.github.com> | 2021-11-24 23:50:09 +0000 |
commit | 241f2c89769a72a0e04540a0310af2817b60ae24 (patch) | |
tree | 60ff344755029bec7a35392c315b61fd4904396d /tools | |
parent | 32a4c0dddc20f75b484ffb4a85c5374215416829 (diff) | |
download | notes-241f2c89769a72a0e04540a0310af2817b60ae24.tar.gz notes-241f2c89769a72a0e04540a0310af2817b60ae24.zip |
deploy: 4b2d24e60b147e5a7552e01ba800573164b2c441
Diffstat (limited to 'tools')
-rw-r--r-- | tools/gpg.html | 7 | ||||
-rw-r--r-- | tools/qemu.html | 33 |
2 files changed, 34 insertions, 6 deletions
diff --git a/tools/gpg.html b/tools/gpg.html index 65bfaec..5085c8c 100644 --- a/tools/gpg.html +++ b/tools/gpg.html @@ -210,9 +210,10 @@ gpg -o <file> --decrypt <file>.gpg </code></pre> <h2><a class="header" href="#signing" id="signing">Signing</a></h2> <p>Generate a signed file and write to <code><file>.gpg</code>.</p> -<pre><code class="language-bash">gpg --sign -u foor@bar.de <file> +<pre><code class="language-bash"># Sign with private key of foo@bar.de +gpg --sign -u foor@bar.de <file> -# Verify +# Verify with public key of foo@bar.de gpg --verify <file> # Extract content from signed file @@ -223,7 +224,7 @@ gpg -o <file> --decrypt <file>.gpg </blockquote> <p>Files can also be <code>signed</code> and <code>encrypted</code> at once, gpg will first sign the file and then encrypt it.</p> -<pre><code class="language-bash">gpg --sign --encrypt <file> +<pre><code class="language-bash">gpg --sign --encrypt -r <recipient> <file> </code></pre> <h2><a class="header" href="#signing-detached" id="signing-detached">Signing (detached)</a></h2> <p>Generate a <code>detached</code> signature and write to <code><file>.asc</code>. diff --git a/tools/qemu.html b/tools/qemu.html index eb46b87..6a04769 100644 --- a/tools/qemu.html +++ b/tools/qemu.html @@ -298,12 +298,12 @@ connection.</p> </code></pre> <h2><a class="header" href="#vm-snapshots" id="vm-snapshots">VM snapshots</a></h2> <p>VM snapshots require that there is at least on <code>qcow2</code> disk attached to the VM -([VM Snapshots][qemu-doc-snapshot]).</p> -<p>Commands for qemu [Monitor][qemu-doc-monitor] or [QMP][qemu-doc-qmp]:</p> +(<a href="https://qemu-project.gitlab.io/qemu/system/images.html#vm-005fsnapshots">VM Snapshots</a>).</p> +<p>Commands for qemu <a href="https://qemu-project.gitlab.io/qemu/system/monitor.html">Monitor</a> or <a href="https://qemu-project.gitlab.io/qemu/interop/qemu-qmp-ref.html">QMP</a>:</p> <pre><code class="language-bash"># List available snapshots. info snapshots -# Create/Load/Delete snapshot with name <tag> +# Create/Load/Delete snapshot with name <tag>. savevm <tag> loadvm <tag> delvm <tag> @@ -313,6 +313,33 @@ delvm <tag> -loadvm <tag> \ ... </code></pre> +<h2><a class="header" href="#vm-migration" id="vm-migration">VM Migration</a></h2> +<p><code>Online</code> migration example:</p> +<pre><code class="language-bash"># Start machine 1 on host ABC. +qemu-system-x86_64 -monitor stdio -cdrom <iso> + +# Prepare machine 2 on host DEF as migration target. +# Listen for any connection on port 12345. +qemu-system-x86_64 -monitor stdio -incoming tcp:0.0.0.0:12345 + +# Start migration from the machine 1 monitor console. +(qemu) migrate tcp:DEF:12345 +</code></pre> +<p>Save to external file example:</p> +<pre><code class="language-bash">```bash +# Start machine 1. +qemu-system-x86_64 -monitor stdio -cdrom <iso> + +# Save VM state to file. +(qemu) migrate "exec:gzip -c > vm.gz" + +# Load VM from file. +qemu-system-x86_64 -monitor stdio -incoming "exec: gzip -d -c vm.gz" +</code></pre> +<blockquote> +<p>The migration source machine and the migration target machine should be +launched with the <strong>same</strong> parameters.</p> +</blockquote> <h2><a class="header" href="#appendix-direct-kernel-boot" id="appendix-direct-kernel-boot">Appendix: Direct <code>Kernel</code> boot</a></h2> <p>Example command line to directly boot a <code>Kernel</code> with an <code>initrd</code> ramdisk.</p> <pre><code class="language-bash">qemu-system-x86_64 \ |