This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.
Step 1 - Enable NBD on the Host
modprobe nbd max_part=8
| # edit and save this file to /usr/lib/systemd/system/clash.service | |
| [Unit] | |
| Description=clash | |
| After=network.target | |
| [Service] | |
| WorkingDirectory="your home directory"/.config/clash | |
| ExecStart="your home directory"/.config/clash/start-clash.sh | |
| ExecStop="your home directory"/.config/clash/stop-clash.sh | |
| Environment="HOME=your home directory" |
| #!/usr/bin/env bash | |
| # --slave /usr/bin/$1 $1 /usr/bin/$1-\${version} \\ | |
| function register_clang_version { | |
| local version=$1 | |
| local priority=$2 | |
| update-alternatives \ | |
| --install /usr/bin/llvm-config llvm-config /usr/bin/llvm-config-${version} ${priority} \ |
| 1. general (rpm, speed, gear, time) | |
| 2. engine load (actual + target) | |
| 3. torque (actual + target) | |
| 4. accelerator pedal angle | |
| 5. throttle body angle | |
| 6. boost (actual + target) | |
| 7. wastegate duty cycle | |
| 8. fuel trims (short term) | |
| 9. fuel pressure (low + high) | |
| 10. ignition timing (all cylinders + average) |
This is basically a rehash of an original post on CNXSoft - all credit (particularly for the Virtio device arguments used below) belongs to the author of that piece.
Download the latest uefi1.img image. E.g. ubuntu-16.04-server-cloudimg-arm64-uefi1.img from https://cloud-images.ubuntu.com/releases/16.04/release/
Download the UEFI firmware image QEMU_EFI.fd from https://releases.linaro.org/components/kernel/uefi-linaro/latest/release/qemu64/
Determine your current username and get your current ssh public key:
| // LZ4 streaming API example 2 (ring buffer) | |
| #define _CRT_SECURE_NO_WARNINGS // for MSVC | |
| #include "lz4.h" | |
| #include <stdio.h> | |
| #include <stdint.h> | |
| #include <stdlib.h> | |
| #include <string.h> |
| apt install -y vim | |
| apt install -y wget | |
| apt install -y sqlite3 (used by a test, not needed for the build to complete) | |
| apt install -y curl | |
| apt install -y git | |
| apt install -y build-essential | |
| apt install -y pkg-config |
| #!/bin/sh | |
| RELAY="$1" | |
| PORT="$2" | |
| echo -n 'nat-hole-punch' | socat STDIN "UDP-SENDTO:$RELAY:$PORT,sourceport=$PORT" | |
| mosh-server new -p "$PORT" | sed -n 's/MOSH CONNECT [0-9]\+ \(.*\)$/\1/g p' |