Debian KVM Hypervisor SetupBy Dag, on December 30th, 2016
KVM(Kernel-based Virtual Machine) is a native GNU/Linux type 1 hypervisor. It requires VT(x)/AMD-V support.
Testing for virtualization support:
# egrep -c '(svm|vmx)' /proc/cpuinfo ^ 0 = no support.
Installing KVM on a fresh Debian 8 setup:
# apt-get update; apt-get upgrade # apt-get install task-lxde-desktop (if desktop wasn't chosen during initial OS install) # apt-get install qemu-kvm libvirt-bin bridge-utils virt-manager # usermod myuser -a -G kvm libvirt (if running things as a user and not root)
Enable autostart on host boot for a VM (can also be selected in GUI):
# virsh autostart vmName ^ add --disable at the end to turn autostart off again.
VirtIO Drivers for Windows Guests
Stable Drivers Download I used the ISO and just mounted it inside the Windows guest after installation. There were 2 devices immediately that I updated to Virtio automatically by using device manager - update drivers (point to mounted ISO). Then I had to choose Virtio in KVM properties for the VM dedicated NIC (macvtap passthrough, I had no VT-d support). Rebooted the guest, and then another device showed up in device manager that I could use Virtio with.
KVM should now be up and running.
Running X11 virt-manager from a remote Windows client
# nano /etc/libvirt/libvirtd.conf ^ auth_unix_ro = "none" auth_unix_rw = "none" auth_tcp = "sasl" # service libvirtd restart Download and install VcXsrv on the Windows client: https://sourceforge.net/projects/vcxsrv/ Start XLaunch and fire up xterm and start GUI apps from there. If sudo privileges is needed with anything, use with param -E.
A note about VirtIO
VirtIO drivers are paravirtualized drivers that acts as an abstraction layer over devices in KVM guests. Para-virtualization means the guest is partially aware of being a guest, and can send IO requests more efficiently to KVM as a hypervisor by working together with it. Fully virtualized VMs do not know they are being virtualized, causing more work for the hypervisor as it has to "trap" IO requests to hardware. A fully virtualized VM will have an emulation layer close to hardware level in its hypervisor, which is efficient, but highly complicated and less direct than a para-virtualized one.