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
#ps1 | |
$index = (Invoke-WebRequest -Uri 'https://cdn.media.ccc.de/INDEX' -Verbose).Content -split "`n" | ForEach-Object {$_.Trim()} | Where-Object {-not [String]::IsNullOrEmpty($_)} | |
#$aria2cIndex = foreach($e in $index) { "https://cdn.media.ccc.de/$e"; " dir=./$(Split-Path -Parent $e)"; " out=$(Split-Path -Leaf $e)" } | |
$aria2cIndex = foreach($e in $index) { | |
"https://cdn.media.ccc.de/$e`thttps://berlin-ak.ftp.media.ccc.de/$e`thttps://mirror.selfnet.de/CCC/$e`thttps://ftp.fau.de/cdn.media.ccc.de/$e`thttps://mirror.eu.oneandone.net/projects/media.ccc.de/$e`thttps://mirrors.dotsrc.org/cdn.media.ccc.de/$e`thttps://koeln.ftp.media.ccc.de/$e`thttps://mirror.netcologne.de/CCC/$e" | |
" dir=./$(Split-Path -Parent $e)" | |
" out=$(Split-Path -Leaf $e)" | |
} | |
$aria2cIndex | Out-File -Encoding ascii -Path "./INDEX.aria2c.txt" |