1. first off the praise:
  2. now the critique:
    • it does not feel very user friendly X-D
    • why is thin provisioning not the disk-saving default option?
      • or at least should be possible for the user to select this option in virt-manager
    • do not drop windows 7 support just yet… many virtualization systems such as VirtualBox are actually intended to run “outdated” OS on newer hardware for the sake of getting programs to run, that are incompatible with recent OS.
    • please double check that virtio 64Bit drivers actually work under win 7 64bit (home, pro and ultimate)

hostnamectl; # host is
           Chassis: desktop
  Operating System: Debian GNU/Linux 10 (buster)
            Kernel: Linux 4.19.0-17-amd64
      Architecture: x86-64

# hardware used
cat /proc/cpuinfo |head
processor	: 0
vendor_id	: AuthenticAMD
cpu family	: 23
model		: 113
model name	: AMD Ryzen 5 3600 6-Core Processor
stepping	: 0
microcode	: 0x8701021
cpu MHz		: 1870.721
cache size	: 512 KB
physical id	: 0

dmidecode | less
Product Name: Pro WS 565-ACE
Version: Rev X.0x

# in combination with
smartctl -a /dev/nvme0
smartctl 6.6 2017-11-05 r4594 [x86_64-linux-4.19.0-17-amd64] (local build)
Copyright (C) 2002-17, Bruce Allen, Christian Franke, www.smartmontools.org

Model Number: SAMSUNG MZVL2512HCJQ-00B00

smartctl -a /dev/nvme1
smartctl 6.6 2017-11-05 r4594 [x86_64-linux-4.19.0-17-amd64] (local build)
Copyright (C) 2002-17, Bruce Allen, Christian Franke, www.smartmontools.org

Model Number: SAMSUNG MZVL2512HCJQ-00B00
# MZVL2512HCJQ OEM version of Samsung NVMe 980 Pro
qemu-system-x86_64 --version
QEMU emulator version 3.1.0 (Debian 1:3.1+dfsg-8+deb10u8)
Copyright (c) 2003-2018 Fabrice Bellard and the QEMU Project developers

# installed software
dpkg -l|grep virt
ii  gir1.2-libvirt-glib-1.0:amd64        1.0.0-1                                 amd64        GObject introspection files for the libvirt-glib library
ii  libgovirt-common                     0.3.4-3.1                               all          GObject-based library to access oVirt REST API (common files)
ii  libgovirt2:amd64                     0.3.4-3.1                               amd64        GObject-based library to access oVirt REST API
ii  libvirglrenderer0:amd64              0.7.0-2                                 amd64        virtual GPU for KVM virtualization
ii  libvirt-clients                      5.0.0-4+deb10u1                         amd64        Programs for the libvirt library
ii  libvirt-daemon                       5.0.0-4+deb10u1                         amd64        Virtualization daemon
ii  libvirt-daemon-system                5.0.0-4+deb10u1                         amd64        Libvirt daemon configuration files
ii  libvirt-glib-1.0-0:amd64             1.0.0-1                                 amd64        libvirt GLib and GObject mapping library
ii  libvirt0:amd64                       5.0.0-4+deb10u1                         amd64        library for interfacing with different virtualization systems
ii  ovmf                                 0~20181115.85588389-3+deb10u3           all          UEFI firmware for 64-bit x86 virtual machines
ii  python3-libvirt                      5.0.0-1                                 amd64        libvirt Python 3 bindings
ii  qemu-kvm                             1:3.1+dfsg-8+deb10u8                    amd64        QEMU Full virtualization on x86 hardware
ii  virt-manager                         1:2.0.0-3                               all          desktop application for managing virtual machines
ii  virt-viewer                          7.0-2                                   amd64        Displaying the graphical console of a virtual machine
ii  virtinst                             1:2.0.0-3                               all          Programs to create and clone virtual machines

something is pretty off here.

it all starts of with virt-manager (keep saying virsh-manager) not detect Windows 7 iso correctly, and having to chose it manually enabling the legacy checkbox.

the idea was to install:

actually managed to install it once… but when trying to install the updates, things became very very slow aka stuck.

next try… it won’t go over this screen: “windows files are being extracted 0%” just sits there doing nothing.

TURNS OUT: that is just what windows does X-D (let it sit overnight if the user must… it will finish evenutally)

for the screen to resize automatically: for GNU Linux the spice drivers are required, for Windows the virtio drivers (for some reason the latest version fails to install for Win 10 so get the bit older version)

GNU Linux guest vm integration: qemu-guest-agent

  • the Debian 11 installer automatically detects running inside a virtual machine and automatically installs the qemu-guest-agent
  • # otherwise install it manually
    apt search qemu|grep guest
    qemu-guest-agent/stable-security 1:5.2+dfsg-11+deb11u2 amd64
    # install it also the spice-vdagent
    su - root
    apt update; apt install qemu-guest-agent spice-vdagent;
    # then reboot

not done yet…

with some window managers, the resize needs to be triggered “manually”

GNU Linux guest vm auto resize screen

to get a more “virtualbox” like behaviour of the vm, this can be acchieved by a little scripting “hack”:

vim /scripts/kvm/guest_vm_auto_resize_screen.sh

# will auto resize the gnu linux guest vm screen every 2 sec
while true; do xrandr --output Virtual-1 --auto; sleep 2; clear; done

# mark it runnable
chmod +x /scripts/kvm/*.sh
  • reboot the VM
  • also make sure this is checked:

  • run the script for testing
  • clipboard pasting host-guest should already work
  • put this script into auto start

if it works, let’s automate: auto resize after startup

  1. re-activate rc.local
  2. at the very end add something like:
  3. reboot and it should change resolution, when window is resized
export DISPLAY=:0;su -c /scripts/kvm/guest_vm_auto_resize_screen.sh user &

Windows guest vm integration: what about clipboard host-guest?

yes, that can be done via https://www.spice-space.org/download/windows/spice-guest-tools/spice-guest-tools-latest.exe

  1. download it
  2. put it into an diskimage.iso file to be mounted via virt-manager
  3. install it within windows
  4. reboot vm
  5. host-to-guest clipboard should be working

cudos: https://dausruddin.com/how-to-enable-clipboard-and-folder-sharing-in-qemu-kvm-on-windows-guest/

what worked: virtio & 32Bit

the only success that can be reported is for 32Bit! (virtio-win-0.1.173.iso being the last version supporting Windows 7, the newer versions support win 8 and higher)

checkout this archive: https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/

now the performance is pretty decent X-D (of course this is all RAM cached stuff)

no chance to select any 64Bit drivers!? in any virtio iso!?

Debian 10 vm: failed to decrypt root after RAM reduction

this might be a bug or something else.

when creating a Debian 10 vm guest with 2048MB of RAM, then later reducing that to 1024MB of RAM, will result in a problem, that the user can not decrypt the lvm2 encrypted root harddisk anymore…

putting the RAM settings back to 2048MB fixes the problem.

very very strange X-D

(assigning more RAM probably not a problem, but reducing RAM assigned to vm might have such strange effects)


How to Enable clipboard and folder sharing in Qemu/KVM on Windows Guest


liked this article?

  • only together we can create a truly free world
  • plz support dwaves to keep it up & running!
  • (yes the info on the internet is (mostly) free but beer is still not free (still have to work on that))
  • really really hate advertisement
  • contribute: whenever a solution was found, blog about it for others to find!
  • talk about, recommend & link to this blog and articles
  • thanks to all who contribute!