From 241f2c89769a72a0e04540a0310af2817b60ae24 Mon Sep 17 00:00:00 2001 From: johannst Date: Wed, 24 Nov 2021 23:50:09 +0000 Subject: deploy: 4b2d24e60b147e5a7552e01ba800573164b2c441 --- print.html | 50 +++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 43 insertions(+), 7 deletions(-) (limited to 'print.html') diff --git a/print.html b/print.html index 249a998..68a641d 100644 --- a/print.html +++ b/print.html @@ -1395,9 +1395,10 @@ gpg -o <file> --decrypt <file>.gpg

Signing

Generate a signed file and write to <file>.gpg.

-
gpg --sign -u foor@bar.de <file>
+
# 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
@@ -1408,7 +1409,7 @@ gpg -o <file> --decrypt <file>.gpg
 
 

Files can also be signed and encrypted at once, gpg will first sign the file and then encrypt it.

-
gpg --sign --encrypt <file>
+
gpg --sign --encrypt -r <recipient> <file>
 

Signing (detached)

Generate a detached signature and write to <file>.asc. @@ -1821,12 +1822,12 @@ connection.

VM snapshots

VM snapshots require that there is at least on qcow2 disk attached to the VM -([VM Snapshots][qemu-doc-snapshot]).

-

Commands for qemu [Monitor][qemu-doc-monitor] or [QMP][qemu-doc-qmp]:

+(VM Snapshots).

+

Commands for qemu Monitor or QMP:

# 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>
@@ -1836,6 +1837,33 @@ delvm <tag>
     -loadvm <tag>  \
     ...
 
+

VM Migration

+

Online migration example:

+
# 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
+
+

Save to external file example:

+
```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"
+
+
+

The migration source machine and the migration target machine should be +launched with the same parameters.

+

Appendix: Direct Kernel boot

Example command line to directly boot a Kernel with an initrd ramdisk.

qemu-system-x86_64                                                     \
@@ -2004,6 +2032,10 @@ major_pagefault: Happens when the page needed is NOT in memory, the kernel
   -o <file> ... log output into <file>
   -c .......... dump syscall statitics at the end
   -k .......... dump stack trace for each syscall
+  -P <path> ... only trace syscall accesing path
+  -y .......... print paths for FDs
+  -tt ......... print absolute timestamp (with us precision)
+  -r .......... print relative timestamp
 
<expr>:
   trace=syscall[,syscall] .... trace only syscall listed
@@ -2017,7 +2049,7 @@ major_pagefault: Happens when the page needed is NOT in memory, the kernel
 
strace -f -e trace=open,socket -p <pid>
 

Trace signals delivered to a running process:

-
strace -f -e signal -p <pid>
+
strace -e signal -e 'trace=!all' -p <pid>
 

ltrace(1)

ltrace [opts] [prg]
@@ -2371,6 +2403,10 @@ bbb:
 * = bla
 ----
 
+

Variables related to filesystem paths:

+
    +
  • $(CURDIR): Path of current working dir after using make -C path
  • +

Useful functions

Substitution references

Substitute strings matching pattern in a list.

-- cgit v1.2.3