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
| # DO NOT PUT THE WIFI DONGLE IN THE DEVICE BEFORE MENTIONED EXPLICITLY BELOW | |
| # Brief note, after this the UI will not show the usb dongle, | |
| # the wifi does work and I get an IP address, so all works, | |
| # but I don't go into detail of making it show on the Raspbian UI. | |
| # (for this purpose I don't care about the UI) | |
| # For the use of this I connected my device to an ethernet connection and through the Router could see the IP which I can SSH into. | |
| ## STEP 1: Prepare machine and install packages needed |
| # should works on any cloud-init enabled hypervisor (openstack.. ) | |
| # start from a normal ubuntu 20.04 install as minimal was not available for ARM64 | |
| # Since ARM64 machines has higher RAM, Shrinking is desired but not necessary. Instead we will increase tmpfs to 1700MB | |
| # Getting root (if sudo -i doesn't work then set a root password beforehand using 'sudo passwd root' | |
| sudo -i | |
| # make sure we are on the highest kernel, so we can delete all the others ... |
Home: TX9XD-98N7V-6WMQ6-BX7FG-H8Q99
Home N: 3KHY7-WNT83-DGQKR-F7HPR-844BM
Home Single Language: 7HNRX-D7KGG-3K4RQ-4WPJ4-YTDFH
Home Country Specific: PVMJN-6DFY6-9CCP6-7BKTT-D3WVR
Professional: W269N-WFGWX-YVC9B-4J6C9-T83GX
Professional N: MH37W-N47XK-V7XM9-C7227-GCQG9