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
// Filename: HttpServer.cs | |
// Author: Benjamin N. Summerton <define-private-public> | |
// License: Unlicense (http://unlicense.org/) | |
using System; | |
using System.IO; | |
using System.Text; | |
using System.Net; | |
using System.Threading.Tasks; |
#include "pch.h" | |
#pragma comment(lib, "gdi32.lib") | |
enum ZBID | |
{ | |
ZBID_DEFAULT = 0, | |
ZBID_DESKTOP = 1, | |
ZBID_UIACCESS = 2, | |
ZBID_IMMERSIVE_IHM = 3, | |
ZBID_IMMERSIVE_NOTIFICATION = 4, |
#include <windows.h> | |
#include <initguid.h> | |
// {c8900b66-a973-584b-8cae-355b7f55341b} | |
DEFINE_GUID(CLSID_StartMenuCacheAndAppResolver, 0x660b90c8, 0x73a9, 0x4b58, 0x8c, 0xae, 0x35, 0x5b, 0x7f, 0x55, 0x34, 0x1b); | |
// {46a6eeff-908e-4dc6-92a6-64be9177b41c} | |
DEFINE_GUID(IID_IAppResolver_7, 0x46a6eeff, 0x908e, 0x4dc6, 0x92, 0xa6, 0x64, 0xbe, 0x91, 0x77, 0xb4, 0x1c); | |
// {de25675a-72de-44b4-9373-05170450c140} |
//------------------------------------------------------------------------------ | |
// pdbdump.c - dump symbols from .pdb and executable files (public domain). | |
// - to compile; cl.exe /Ox /Zi pdbdump.c | |
// - | |
// - Martin Ridgers, pdbdump 'at' fireproofgravy.co.uk | |
//------------------------------------------------------------------------------ | |
#include <stdio.h> | |
#include <Windows.h> | |
#include <DbgHelp.h> |
#include <Unknwn.h> | |
#include <Windows.h> | |
#include <ntstatus.h> | |
#include <winternl.h> | |
#include <wrl\implements.h> | |
#include <comutil.h> | |
#include <dcomp.h> | |
#include <dwmapi.h> | |
#include <dxgi1_3.h> | |
#include <d3d11_2.h> |
// CaptureStackBackTrace | |
// http://msdn.microsoft.com/en-us/library/windows/desktop/bb204633(v=vs.85).aspx | |
#define WIN32_LEAN_AND_MEAN | |
#include <windows.h> | |
#include <stdio.h> | |
////////////////////////////////////////////////////////////// | |
void capture() { | |
const ULONG framesToSkip = 0; | |
const ULONG framesToCapture = 64; |