- first off the praise:
- kvm-qemu is a high performance nicely scriptable virtualization system
- if it works, it can do pretty things 🙂
- especially like the x11 forwarded virt-manager gui over ssh (yes it is a bit slow… but simplicity at it’s best)
- ssh-logged in and when trying to start a x11 application, getting the error “Unable to init server: Could not connect: Connection refused”?
- try ssh-re-login with:
ssh -v -X email@example.com
- 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 Manufacturer: ASUSTeK COMPUTER INC. 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 === START OF INFORMATION SECTION === 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 === START OF INFORMATION SECTION === 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.
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;
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 #!/bin/bash # 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
run the script for testing
put this script into auto start
also make sure this is checked:
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
- download it
- put it into an diskimage.iso file to be mounted via virt-manager
- install it within windows
- reboot vm
- host-to-guest clipboard should be working
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)