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
#!/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).
$ emerge --info | |
Portage 3.0.20 (python 3.9.5-final-0, default/linux/amd64/17.1/selinux, gcc-9.3.0, glibc-2.33, 5.12.12-gentoo x86_64) | |
================================================================= | |
System uname: Linux-5.12.12-gentoo-x86_64-AMD_Ryzen_Threadripper_1950X_16-Core_Processor-with-glibc2.33 | |
KiB Mem: 65734116 total, 50475208 free | |
KiB Swap: 8388604 total, 8388604 free | |
Head commit of repository gentoo: 23eb01987ea2ac2c32d3d3c037714e0d35655320 | |
Timestamp of repository ace: Fri, 18 Jun 2021 23:20:35 +0000 | |
Head commit of repository ace: f4ea0e6c7e282c1a8310bba62ec571b50fcdb011 |
# emerge -v blender | |
These are the packages that would be merged, in order: | |
Calculating dependencies .. | |
!!! Problem resolving dependencies for media-gfx/blender | |
... done! | |
!!! The ebuild selected to satisfy "blender" has unmet requirements. |