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
| Portage 3.0.72 (python 3.13.15-final-0, default/linux/amd64/23.0/hardened/selinux/systemd, gcc-14, glibc-2.43-r4, 6.15.1-gentoo x86_64) | |
| ================================================================= | |
| System uname: Linux-6.15.1-gentoo-x86_64-AMD_Ryzen_Threadripper_1950X_16-Core_Processor-with-glibc2.43 | |
| KiB Mem: 65723828 total, 33239260 free | |
| KiB Swap: 1757180 total, 1757180 free | |
| Timestamp of repository gentoo: Fri, 02 Oct 2026 00:00:00 +0000 | |
| Head commit of repository gentoo: b936362b57c3ed666cb2dd9debbf9f6d9607df34 | |
| Head commit of repository alxu: e6625a3649b5751c517b9c2c5197dc9f919df1f0 | |
| Head commit of repository wayland-desktop: 2102eb44b4e9571112fc2edb642129abd075b840 |
| >>> Verifying ebuild manifests | |
| >>> Jobs: 0 of 1 complete, 1 running Load avg: 0.24, 0.14, 0.07 | |
| >>> Emerging (1 of 1) gui-libs/gtk-4.20.4::gentoo | |
| >>> Jobs: 0 of 1 complete, 1 running Load avg: 0.24, 0.14, 0.07 | |
| >>> Failed to emerge gui-libs/gtk-4.20.4, Log file: | |
| >>> Jobs: 0 of 1 complete, 1 running Load avg: 0.22, 0.14, 0.07 | |
| >>> '/var/tmp/portage/gui-libs/gtk-4.20.4/temp/build.log' | |
| >>> Jobs: 0 of 1 complete, 1 running Load avg: 0.22, 0.14, 0.07 | |
| >>> Jobs: 0 of 1 complete, 1 running, 1 failed Load avg: 0.22, 0.14, 0.07 | |
| >>> Jobs: 0 of 1 complete, 1 failed Load avg: 0.22, 0.14, 0.07 |
| >>> Verifying ebuild manifests | |
| >>> Jobs: 0 of 1 complete, 1 running Load avg: 0.24, 0.14, 0.07 | |
| >>> Emerging (1 of 1) gui-libs/gtk-4.20.4::gentoo | |
| >>> Jobs: 0 of 1 complete, 1 running Load avg: 0.24, 0.14, 0.07 | |
| >>> Failed to emerge gui-libs/gtk-4.20.4, Log file: | |
| >>> Jobs: 0 of 1 complete, 1 running Load avg: 0.22, 0.14, 0.07 | |
| >>> '/var/tmp/portage/gui-libs/gtk-4.20.4/temp/build.log' | |
| >>> Jobs: 0 of 1 complete, 1 running Load avg: 0.22, 0.14, 0.07 | |
| >>> Jobs: 0 of 1 complete, 1 running, 1 failed Load avg: 0.22, 0.14, 0.07 | |
| >>> Jobs: 0 of 1 complete, 1 failed Load avg: 0.22, 0.14, 0.07 |
| #!/usr/bin/env python | |
| """ | |
| Print (and write to JSON file) system information in a cross-platform manner. | |
| Output contains information about platform, BIOS, CPU, memory, disk, GPU, network, peripheral devices, installed | |
| packages, motherboard and users. | |
| This script heavily relies on psutil and some other bash/powershell commands. See requirements.txt for dependency list. |
| total 52K | |
| drwxr-xr-x. 2 root 4.0K Mar 1 2020 bin | |
| drwxr-xr-x. 2 root 19 Mar 1 2020 boot | |
| drwxr-xr-x. 3 root 4.0K Mar 1 2020 dev | |
| drwxr-xr-x. 31 root 4.0K Mar 1 2020 etc | |
| drwxr-xr-x. 2 root 19 Mar 1 2020 home | |
| drwxr-xr-x. 8 root 4.0K Mar 1 2020 lib | |
| drwxr-xr-x. 4 root 4.0K Mar 1 2020 lib64 | |
| drwxr-xr-x. 2 root 19 Mar 1 2020 media | |
| drwxr-xr-x. 2 root 19 Mar 1 2020 mnt |
| # emerge -p -uvDU @world | |
| These are the packages that would be merged, in order: | |
| Calculating dependencies .. . ... . . .. .......... done! | |
| [ebuild U ] sys-libs/ncurses-6.2_p20210619:0/6::gentoo [6.2-r1:0/6::gentoo] USE="cxx (split-usr) (tinfo) -ada -debug -doc -gpm -minimal -profile -static-libs -test -trace (-threads%*) (-unicode%*)" ABI_X86="(64) -32 (-x32)" 818 KiB | |
| [ebuild R ] media-sound/pulseaudio-15.0-r1::gentoo USE="X alsa alsa-plugin asyncns bluetooth daemon dbus doc equalizer gdbm glib ipv6 orc (selinux) ssl systemd udev webrtc-aec -elogind -gstreamer -gtk -jack -lirc -native-headset -ofono-headset (-oss) -sox (-system-wide) -tcpd* -test -zeroconf" ABI_X86="(64) -32 (-x32)" 0 KiB | |
| [ebuild R ] net-nds/openldap-2.4.58-r2::gentoo USE="berkdb crypt cxx ipv6 kerberos kinit perl sasl (selinux) ssl syslog -debug -experimental -gnutls -iodbc -minimal -odbc -overlays -pbkdf2 -samba -sha2 -smbkrb5passwd -static-libs -tcpd* -test" ABI_X86="(64) -32 (-x32)" 0 KiB | |
| [ebuild R ] net-nds/rpcbin |
| # emerge -p -uvDU @world | |
| These are the packages that would be merged, in order: | |
| Calculating dependencies ... .. ...... ... .............. done! | |
| [ebuild U ~] dev-cpp/tbb-2021.4.0:0/12-2-3::gentoo [2020.3:0/0::gentoo] USE="-test% (-debug%) (-examples%)" ABI_X86="(64) -32 (-x32)" 2,396 KiB | |
| [ebuild UD ] sys-devel/lld-12.0.1::gentoo [13.0.0::gentoo] USE="-test (-debug%)" 0 KiB | |
| [ebuild U ~] media-gfx/openvdb-9.0.0:0/9::gentoo [8.1.0:0/8::gentoo] USE="abi8-compat blosc zlib -abi6-compat -abi7-compat -doc -numpy -python -static-libs -test -utils" CPU_FLAGS_X86="avx sse4_2" PYTHON_SINGLE_TARGET="python3_9 -python3_8 -python3_10" 2,877 KiB | |
| [ebuild N ~] dev-haskell/fail-4.9.0.0:0/4.9.0.0::haskell USE="profile" 0 KiB | |
| [ebuild N ~] dev-haskell/transformers-compat-0.6.6:0/0.6.6::haskell USE="profile -doc -hoogle -hscolour" 41 KiB |
| # emerge -p -uvDU @world | |
| These are the packages that would be merged, in order: | |
| Calculating dependencies .. ........................ done! | |
| !!! Multiple package instances within a single package slot have been pulled | |
| !!! into the dependency graph, resulting in a slot conflict: | |
| dev-lang/ghc:0 |
Jul 22 19:45:38 riparch.atayjq.lan systemd[1816]: Starting Portal service (GTK+/GNOME implementation)...
Jul 22 19:45:38 riparch.atayjq.lan xdg-desktop-portal-gtk[44096]: Unable to init server: Could not connect: Connection refused
Jul 22 19:45:38 riparch.atayjq.lan xdg-desktop-por[44096]: cannot open display:
Jul 22 19:45:38 riparch.atayjq.lan systemd[1816]: xdg-desktop-portal-gtk.service: Main process exited, code=exited, status=1/FAILURE
Jul 22 19:45:38 riparch.atayjq.lan systemd[1816]: xdg-desktop-portal-gtk.service: Failed with result 'exit-code'.
Jul 22 19:45:38 riparch.atayjq.lan systemd[1816]: Failed to start Portal service (GTK+/GNOME implementation).