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
| [Unit] | |
| Description=Recursive deduplication at %I | |
| Documentation=man:duperemove(8) | |
| Documentation=https://github.com/markfasheh/duperemove.git | |
| Conflicts=shutdown.target rescue.target rescue.service emergency.service | |
| After=local-fs.target | |
| Before=shutdown.target | |
| [Service] | |
| Type=simple |
| #!/bin/bash | |
| format="deb" | |
| platform="linux" | |
| while getopts ":f:p:h" opt; do | |
| case $opt in | |
| f) format="$OPTARG" ;; | |
| p) platform="$OPTARG" ;; | |
| h) |
| #!/bin/bash | |
| KEEP_DAYS=15 | |
| VG="vg" # LVM volume group we are snapshoting | |
| LV="data-volume-name" # Name of LVM-volume to take a snapshot of | |
| BACKUP_PREFIX="snap-${LV}-" # Prefix of snapshot volume name. | |
| SIZE=10%ORIGIN # Amount of disk space to allocate for the snapshot | |
| # Create new snapshot |
| Option Explicit | |
| ' 4 variables below require configuration. | |
| ' Once you get this working, refactor, etc. | |
| Sub CDO_Mail_Small_Text_2() | |
| Dim user As String | |
| Dim pass As String | |
| Dim port As Integer | |
| Dim receiverEmail As String | |
| Dim fromEmail As String | |