After so long I think I finally managed to install a Windows 10 KVM guest on Leap 42.3 using virt-manager (libvirt), and would like to share some steps in case it could serve as sort of a “guide” for anyone else that may want to try as well.
First, Windows guest seems to really work better with virtio drivers and SPICE installed, I’m starting to compare the later one well with VirtualBox’s guest additions in fact.
So one first needs to download Windows virtio drivers ISO from here.
SPICE is installed in the Windows guest and seemingly the most recommended way (the easy way) is using the spice-guest-tools installer from their website. However it turns that this installer ships the virtio drivers as well, and at the same time ISO has QXL drivers. So I was in doubt and I managed to contact at least once the maintainer of the virtio drivers ISO. Summarizing, he said SPICE guys rarely update the installer and ISO has more up to date versions. He also commented he would certainly like and has been looking for more fedoraproject-SPICE coordination, but…
So I guess there are 2 ways to go, which I’ll call the “easy” and “manual” ways. I myself choose manual one which consists in using all ISO’s drivers.
Unless willing to set up a server in the guest or some other more “advanced” stuff, when installing KVM server through Yast it’s better to reject the offer to install bridging device. The only network service able to use it would be Wicked anyway; Network Manager is not able to.
Once one has KVM server and stuff installed, package spice-gtk will be also needed, so one needs to verify if it’s installed, and install it if it’s not.
For guest network the most direct option is using a virtual network device, which according to libvirt documents it should be automatically created when installing libvirt stuff but for some unknown freaking reason this never happens on Leap. So one must manually create it:
open Virtual machine manager, Edit > Connection details > Virtual networks. Check suggested network segment is not the same as physical LAN’s, and just set physical network passthrough in NAT mode to any device.
This setting will allow host <-> guest(s) communication, guest -> physical LAN PCs communication, and internet access from guest. Also guest <-> guest communication in case there are more guests. However not physical LAN PCs -> guest communication by default due to firewall rules in the NAT. The bridging device case above mentioned would allow it by default though.
For guest’s desktop auto-resizing, open Virtual machine manager, Edit -> Preferences -> Console. Check “Resize guest with window” option (it’s not checked by default).
For USB redirection to guest (through SPICE) running this -as root- will also be necessary (taken from this thread):
chmod u+s /usr/bin/spice-client-glib-usb-acl-helper
Now to proceed creating virtual machine, either from Virtual machine manager or directly from Create virtual machine launcher (better to insert Windows DVD beforehand so it can autodetect OS).
In step 5 check “Customize settings before installation”. In network, device should be already autodetected if virtual device created above is running.
Proceed to configure virtual machine’s options.
In Memory set minimum (assigned) and a maximum values for RAM ballooning.
In IDE Disk 1 go to advanced options and select VirtIO as bus.
In NIC select virtio as device model.
For virtio drivers (and SPICE as well) one must add the ISO. This will add the ISO to virt-manager’s pool storage, changing its ownership and permissions, so better to choose a safe directory where to put ISO before.
Click Add hardware > Storage > select device type CDROM and bus type IDE; click Manage > Explore locally > search for ISO.
Virt-manager seems to ship SPICE ready since it comes with the needed settings for it by default. But verifying just in case:
Spice Display: type Spice server
Spice channel: device type spicevmc
QXL video: model QXL
Now proceed to start installation.
During Windows installation, in disk selection, there will be no disks detected, which is expected. This is the time to load all needed drivers from the already mounted Windows virtio drivers ISO. Just click “Load driver” by bottom left corner and browse ISO:
Hard disk: viostor\w10\amd64
Network: NetKVM\w10\amd64
If preferring the “manual” way rather than “easy” one, following ones are also needed, otherwise skip them:
RAM balloon: Balloon\w10\amd64
Serial (Spice): vioserial\w10\amd64
QXL (Spice): qxldod\w10\amd64
Now continue with Windows installation.
Once Windows guest has finished installing and logged in for first time, finish guest configuration from within it.
If preferring the “manual” way rather than “easy” one, following step is needed, otherwise skip it:
from Windows virtio drivers ISO, which should still be mounted inside guest, copy directory Balloon\w10\amd64 and paste it in Program files renaming it as C: \Program files\Balloon. Then install the service by running cmd as administrator, brose to C: \Program files\Balloon and run command “BLNSVR.exe -i”.
Now to download SPICE from its website mentioned near beginning of post, and install it in Windows guest.
Manual way (taken from SPICE documentation):
download Windows SPICE agent (the zip file). Uncompress folder somewhere, run cmd as administrator, browse to newly uncompressed folder and install with commands “vdservice install” and “net start vdservice”.
Easy way:
just download spice-guest-tools file and install it. Should also install the balloon service. Check in Windows services.
This is more of virt-manager stuff, but it can be useful to post it as quick reference.
For ejecting and changing CD/DVD from guest, in virt-viewer itself click “Details” icon, select desired CDROM device and click “Disconnect”.
This is enough for mounted ISOs, but for physical CD/DVDs in physical DVD drive one must unmount it from host as well before changing disks.
To mount new CD/DVD in guest follow similar process, just click “Connect”.