Skip to main content

Running Windows 10 on Ubuntu with support for 2D accelerated video, disk, network and touch support

How to run windows with acceleration support on Ubuntu 17.04


This works on 17.04, 16.10, 16,04.

This setup will accelerate the virtual VM for disk, network, video, random device and memory, it also adds support for touch screen for windows 10 running inside Ubuntu.

Download the iso for windows 10 from Microsoft web site, install the image using regular gnome-boxes interface.

Goto to https://www.spice-space.org/download.html and download the Spice Windows guest tools, to allow copy paste and resize when running under boxes, and install it.

I also installed the guest-agent available inside the virtio-win-XXX.iso cd image under the guest agent folder.

Then download the virtio-win-XXX.iso from here, pick the latest version.
https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio

Goto the device manager browser on windows 10 and click on all devices with problems, and point these to the where the cdrom is and select update.

Do the same for the display driver, the network driver and the disk driver.

This should pick the RedHat drivers, you need to trust Redhat since the drivers are not signed with Microsoft keys.

Windows should be running fine now, the instructions below will allow to run the VM even faster, but if you want you can stop here.




After all driver are installed you can change these settings with a permanent way using

sudo apt-get install virt-manager gnome-boxes

Use virt-manager to change the configs for the vms created by gnome-boxes and set all the virtio devices you can (disk and network are a must for speed).
After these changes gnome-boxes will pick the same settings. Don't forget to create a qemu/kvm user session connection to be able to see the gnome-boxes vms in virtual machine manager, in case they are missing.

Some device like the virtio-keyboard virtio-mouse and virtio-tablet are still missing from virtual machine manager interface, so the default ps2 mouse and keyboard are used in this example, and the tablet usb device is used for the mouse to lose focus when it touches the border of the window, but also allowing the windows 10 to be used on a touch screen laptop inside Ubuntu.

Also for all virtio disks setup set cache to none and mode to native, that should make the VMs more reliable and faster if you are using and SSD disk, you can check the picture for the settings.

There is some overlap between the agent and the drivers from the iso file, but it will work fine in the end.

Using the Virtual Machine Manager change the following:
- removed IDE drives.
- added a SATA disk.
- changed the network interface to use virtio.
- changed the sound controller to ich9.
- added a USB mouse and USB keyboard without removing the PS2 mouse and keyboard.
- Installed Spice Windows guest tools.
- Installed Virtio-win-XXX driver for all devices that where marked as red on windows device manager.
- add a small VirtIO disk 2Gb just to force windows to load drivers.
- at this point, install all updates and make not red devices are showing under windows device manager.

After shutting down:

- for all virtio disks setup the cache to "none" and the mode to "native".
- shutdown the vm, then I switched the SATA drive with a VitrIO disk pointing to the same file, remove the SATA drive and fixed the Boot options to use this new drive and windows loaded the new drive just fine.

After all these changes the windows 10 vm works much faster and is integrated with copy paste support. You can also share folders from gnome file manager, using Local Network Share and browse windows shared folders by using gnome file manager "other locations" followed by "windows network".

Advanced

Editing the xml config file with virsh

<input type='tablet' bus='virtio'/>
<input type='mouse' bus='virtio'/>

Replacing the usb tablet and mouse with a virtio tablet, possibly eliminating the need to have a usb host adapter in your virtual machine as often the usb tablet is the only usb device.

At the moment the firmware (edk2/slof) lacks support for virtio keyboards, so switching from usb to virtio looses the ability to do any keyboard input before the linux kernel driver loads, i.e. you can’t operate the grub boot menu. I hope this changes in the future.

If you have to stick to the usb keyboard or usb tablet due to missing guest drivers for virtio input I strongly suggest to use xhci as usb host adapter. Under the USB controller in "Virtual Machine Manager" change it to USB3, windows 10 supports USB 3, you might need to remove some usb devices from your VM.

Opengl version 2 support


There is some work going on to support opengl in Linux and windows guests but this work is not yet support in Ubuntu 16.04, see references below.

The qemu command line will look something like this to enable the opengl on guest systems.

qemu-system-x86_64 ... -display sdl,gl=on -device virtio-vga -vga virtio

To my very naive knowledge qemu on Ubuntu needs to be compiled with gtk3 or sdl2 and this is not the case. Ubuntu qemu binaries do not support gtk3 or sdl2, only sdl1.
Everything else seems to be OK, mesa, kernel and qemu all are the versions that should support opengl initial versions, it should be possible to run a linux guest OS with opengl.

<controller type='usb' model='nec-xhci'/>
<input type='tablet' bus='usb'/>


References


https://wiki.archlinux.org/index.php/QEMU
https://virgil3d.github.io/
http://www.spice-space.org/download.html
https://www.kraxel.org/blog/
https://www.kraxel.org/slides/qemu-gfx.pdf




Post a Comment

Popular posts from this blog

Ubuntu GNOME 16.04 running on Yoga Pro 2 with HiDPI and touch screen support

Ubuntu GNOME 16.04 running on Yoga Pro 2 with HiDPI and touch screen support






See my previous post on how to install Ubuntu on Yoga Pro 2 for Ubuntu GNOME 15.10.

I think Ubuntu GNOME is the best flavor of Ubuntu if you are running in HiDPI mode 3200x1200. All screen captured images are at HiDPI resolution.

Ubuntu 16.04 is not released yet, the screen shoots are from a daily build, 16.04 it is scheduled to be released in Q2 2016.
Touch support Ubuntu gnome support for touch screen is pretty good on the desktop shell.
Chrome browser supports touch screen very well and much better than Firefox without any plug-ins.
The windows key on the screen panel works as the windows key on the keyboard.
Screen rotation is supported on the new gnome and disables the keyboard when the yoga is used as a tablet, but sometimes screen does not rotate, I'm still trying to figure out what is wrong.
Yoga Keys boot key
F12 - Boot menu to select booting from usb drive
F2 - Bios Menu

Power down the co…

How to install Cura 2.X on Ubuntu 17.04

How to install Cura 2.X on Ubuntu

Cura is not available on ubuntu Repositories on version 17.10.

The resolution: To fix this issue you will need to install a PPA repository.

How to get this archive working properly is found here https://launchpad.net/~thopiekar/+archive/ubuntu/cura

rm -f ~/.config/cura/*
rm -f ~/.local/cura/*
sudo add-apt-repository ppa:thopiekar/cura
sudo apt-get update
sudo apt install cura cura-plugins-all cura-extra-plugins-all


Ubuntu GNOME 15.10 running on Yoga Pro 2 with HiDPI support

Ubuntu GNOME 15.10 running on Yoga Pro 2 with HiDPI and touch screen support






See my previous post on how to install Ubuntu on Yoga Pro 2 for Ubuntu GNOME 15.04.

I think Ubuntu GNOME is the best flavor of Ubuntu if you are running HiDPI mode 3200x1200. All screen captured images are at HiDPI resolution.

Touch support Ubuntu gnome 2.16 support for touch screen is pretty good on the desktop shell.
Chrome browser version 48 and up support touch screen better than Firefox without any plugins.
The windows key on the screen panel works as the windows key on the keyboard.
Screen rotation does not work on 15.10 by default, but if you install gnome 2.18 on ubuntu 15.10 you can use screen rotation since is now supported by default.
Yoga Keys boot key
F12 - Boot menu to select booting from usb drive
F2 - Bios Menu

Power down the computer. Push the “novo” button ounce or press F2 while booting, to force the computer to enter into BIOS menus. Disable “Security Boot” and disable “Lenovo F…