Skip to content

Instantly share code, notes, and snippets.

@Kunsi
Kunsi / mount_qcow2.md
Created November 15, 2020 18:36 — forked from shamil/mount_qcow2.md
How to mount a qcow2 disk image

How to mount a qcow2 disk image

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
[ 0.000000] Linux version 4.14.167 (builder@buildhost) (gcc version 7.5.0 (OpenWrt GCC 7.5.0 r10911-c155900f66)) #0 SMP Wed Jan 29 16:05:35 2020
[ 0.000000] Skipping L2 locking due to reduced L2 cache size
[ 0.000000] CVMSEG size: 2 cache lines (256 bytes)
[ 0.000000] bootconsole [early0] enabled
[ 0.000000] CPU0 revision is: 000d9301 (Cavium Octeon II)
[ 0.000000] Checking for the multiply/shift bug... no.
[ 0.000000] Checking for the daddiu bug... no.
[ 0.000000] Determined physical RAM map:
[ 0.000000] memory: 000000000c800000 @ 0000000002900000 (usable)
[ 0.000000] memory: 0000000000c00000 @ 000000000f200000 (usable)
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC+ja1z5VRQzaKCCePsUM14qMr9QR94qlWc7Je5Poki9UmC1t/TyxRVzcCBL1ZdIfBGx6QKtfkEbvhgb3nxVt3PvXjoJrc6wwGLmNrVsU6B88y35g7nzupQiPKYJwkNzJ9j6Dmkgj1F5Q+aY2SitDaX6vqICLJ4Al/ZFw2IQxVJfC7JXRJ9jRMG5o9gWoE3gWDYEAmw+HU2mNzyeuaD12qJw9DHUimAlgkOWzll3gh9WclsYnnXGrCCn5fyHFUCJl+XXAIy519z7YTpKih02rsIOw5dnaGClBZD/YQu2ZKVFZiwIVH7aBiqHOmtgRyWTQgjbh/fMpIN0ar2f/iZsWYUjd6et48TOmXZYIPCQ5FivXNvxt9oo1XZfq76UHBwlmypLJIWROMbz375n2M6hr3hECuxuPjKEUXAv05KiC1aJ4xc6pFoVhqwAR99hvHw5U4o7/ko2NVjNpTu6Jr5DT5VaQLIdDDjC/93kUjMpdD/8P72bEn7454+WexU6OE6uvNiHj1fetrptr2UAuzVfnCoaV8pBqY7X95gk+lnSENdpr8ltJYMg8s0Z7Pzz0OxsZtzzDY5VmWfC9TCdJkN5lT8IbnaixsYlWdjQl1lMmZGElmelfU3K7YQLAbZiHmHKe4hTl9ZoCcWdTQ3d4y2t1DBos+N2HZNdtFCyOS8esDdMw== cardno:000609506971
I: [pulseaudio] client.c: Created 3 "Native client (UNIX socket client)"
D: [pulseaudio] protocol-dbus.c: Interface org.PulseAudio.Core1.Client added for object /org/pulseaudio/core1/client3
D: [pulseaudio] protocol-native.c: Protocol version: remote 32, local 32
I: [pulseaudio] protocol-native.c: Got credentials: uid=1000 gid=1000 success=1
D: [pulseaudio] protocol-native.c: SHM possible: yes
D: [pulseaudio] protocol-native.c: Negotiated SHM: yes
D: [pulseaudio] protocol-native.c: Memfd possible: yes
D: [pulseaudio] protocol-native.c: Negotiated SHM type: shared memfd
D: [pulseaudio] memblock.c: Using shared memfd memory pool with 1024 slots of size 64,0 KiB each, total size is 64,0 MiB, maximum usable slot size is 65472
D: [pulseaudio] srbchannel.c: SHM block is 65472 bytes, ringbuffer capacity is 2 * 32712 bytes
@Kunsi
Kunsi / after pavucontrol
Created August 31, 2019 09:33
pulseaudio problems
Sink #0
State: RUNNING
Name: alsa_output.usb-Focusrite_Scarlett_Solo_USB_Y77V1VK950F391-00.analog-stereo
Description: Scarlett Solo USB Analog Stereo
Driver: module-alsa-card.c
Sample Specification: s32le 2ch 48000Hz
Channel Map: front-left,front-right
Owner Module: 6
Mute: no
Volume: front-left: 65499 / 100% / -0,01 dB, front-right: 65499 / 100% / -0,01 dB
≻ openssl s_client -connect 172.19.138.70:443
CONNECTED(00000003)
write:errno=0
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 0 bytes and written 293 bytes
Verification: OK
time octoprint --help
Usage: octoprint [OPTIONS] COMMAND [ARGS]...
Options:
-b, --basedir PATH Specify the basedir to use for configs, uploads,
timelapses etc.
-c, --config PATH Specify the config file to use.
-v, --verbose Increase logging verbosity.
--safe Enable safe mode; disables all third party plugins.
--version Show the version and exit.
[epvpn_6428]
enabled=yes
protocol=sip
username=6428
description=EventPhoneVPN MIAU
interval=600
authname=6428
password=m00
domain=hg.eventphone.de
registrar=hg.eventphone.de:5060
certdir="$ACME_STATE_DIR/live/kaito.kunbox.net"
cat "$certdir/privkey" > /home/kunsi/.weechat/ssl/relay.pem
cat "$certdir/fullchain" >> /home/kunsi/.weechat/ssl/relay.pem
chown kunsi:kunsi /home/kunsi/.weechat/ssl/relay.pem
chmod 440 /home/kunsi/.weechat/ssl/relay.pem
echo 'core.weechat */relay sslcertkey' >> /home/kunsi/.weechat/weechat_fifo
Host ffka-next
HostName 10.214.0.1
Port 22
User root
IdentityFile ~/.ssh/id_freifunk
StrictHostKeyChecking no
UserKnownHostsFile /dev/null