Difference between revisions of "Windows 10 Virtualization with KVM"

From Funtoo
Jump to navigation Jump to search
 
(23 intermediate revisions by 6 users not shown)
Line 1: Line 1:
This page describes how to set up Funtoo Linux to run Windows 7 Professional 32-bit within a KVM virtual machine. KVM is suitable for running Windows 7 for general desktop application use. It does not provide 3D support, but offers a nice, high-performance virtualization solution for day-to-day productivity applications. It is also very easy to set up.
{{Article
|Author=Drobbins
}}
This page describes how to set up Funtoo Linux to run Windows 10 Home/Professional 64-bit within a KVM virtual machine. KVM is suitable for running Windows 10 for general desktop application use. It does not provide 3D support, but offers a nice, high-performance virtualization solution for day-to-day productivity applications. It is also very easy to set up.
 
{{Warning|While this page provides a good introduction to how to run Windows 10 with Linux KVM, some parts of these instructions are specific to [[Welcome|Funtoo Linux]]. They may need to be adapted somewhat for other Linux distributions. But we are happy to have this page be a good general resource for Windows 10 under KVM for all Linux distros. If you have adaptations to the docs for other Linux distributions, please feel free leaving the steps at [[Windows 10 Virtualization with KVM/Talk|the talk page]] and we'll consider adding them.}}


== Introduction ==
== Introduction ==
Line 7: Line 12:
[[File:Windows7virt.png|400px|Windows 7 Professional 32-bit running within qemu-kvm]]
[[File:Windows7virt.png|400px|Windows 7 Professional 32-bit running within qemu-kvm]]


== KVM Setup ==
=== KVM Setup ===
 
You will need KVM to be set up on the machine that will be running the virtual machine. This can be a local Linux system, or if you are using SPICE (see [[#SPICE (Accelerated Remote Connection)|SPICE]]), a local or remote system. See the SPICE section for tweaks that you will need to make to these instructions if you plan to run Windows 10 on a Funtoo Linux system that you will connect to remotely.
 
Follow these steps for the system that will be running the virtual machine.


If you are using an automatically-built kernel, it is likely that kernel support for KVM is already available.
If you are using an automatically-built kernel, it is likely that kernel support for KVM is already available.
Line 17: Line 26:
Prior to using KVM, modprobe the appropriate accelerated driver for Intel or AMD, as root:
Prior to using KVM, modprobe the appropriate accelerated driver for Intel or AMD, as root:


<console>
{{console|body=
# ##i##modprobe kvm_intel
# ##i##modprobe kvm_intel
</console>
}}
 
=== Windows 10 ISO Images ===


== Windows 7 ISO Images ==
In this tutorial, we are going to install Windows 10 Home, 64-bit Edition. Microsoft provides a free download of the ISO DVD image, but this does require a valid license key for installation. You can download the ISO at the following location:


In this tutorial, we are going to install Windows 7 Professional, 32-bit Edition. Microsoft provides a free download of the ISO DVD image, but this does require a valid license key for installation. You can download Windows 7 Professional, 32 bit at the following location:
https://www.microsoft.com/en-us/software-download/windows10ISO


http://msft-dnl.digitalrivercontent.net/msvista/pub/X15-65804/X15-65804.iso
{{fancynote|Windows 10 is a free download but requires a valid license key for installation.}}


{{fancynote|Windows 7 Professional, 32-bit Edition is a free download but requires a valid license key for installation.}}
In addition, it's highly recommended that you download "VirtIO" drivers produced by Red Hat. These drivers are installed under Windows and significantly improve Windows 10 network and disk performance. You want to download the ISO file (not the ZIP file) at the following location:


In addition, it's highly recommended that you download "VirtIO" drivers produced by Red Hat. These drivers are installed under Windows and significantly improve Windows 7 network and disk performance. You want to download the ISO file (not the ZIP file) at the following location:
https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/latest-virtio/


http://alt.fedoraproject.org/pub/alt/virtio-win/latest/images/
{{Note|At the time of this writing, the latest version of the virtio ISO is {{c|virtio-win-0.1.149.iso}}}}


== Create Raw Disk ==
=== Create Raw Disk ===


In this tutorial, we are going to create a 30GB raw disk image for Windows 7. Raw disk images offer better performance than the commonly-used QCOW2 format. Do this as a regular user:
In this tutorial, we are going to create a 30GB raw disk image for Windows 10. Raw disk images offer better performance than the commonly-used QCOW2 format. Do this as a regular user:


<console>
<console>
$ ##i##cd
$ ##i##cd
$ ##i##qemu-img create -f raw win7.img 30G
$ ##i##mkdir vm
$ ##i##cd vm
$ ##i##qemu-img create -f raw win10.img 30G
</console>
</console>


We now have an empty virtual disk image called <tt>win7.img</tt> in our home directory.
We now have an empty virtual disk image called {{c|win10.img}} in our home directory.


== QEMU script ==
=== QEMU script ===


Now, we'll create the following script to start our virtual machine and begin Windows 7 installation. Note that this script assumes that the two ISO files downloaded earlier were placed in the user's <tt>Downloads</tt> directory. Adjust paths as necessary if that is not the case. Also be sure to adjust the following parts of the script:
Now, we'll create the following script to start our virtual machine and begin Windows 10 installation. Note that this script assumes that the two ISO files downloaded earlier were placed in the {{c|vm}} directory we created. Adjust paths as necessary if that is not the case. Also be sure to adjust the following parts of the script:


* Adjust the name of <tt>VIRTIMG</tt> to match the exact name of the VirtIO ISO image you downloaded earlier
* Adjust the name of <tt>VIRTIMG</tt> to match the exact name of the VirtIO ISO image you downloaded earlier
* Adjust the <tt>smp</tt> option to use the number of CPU cores and threads (if your system has hyperthreading) of your Linux system's CPU.
* Adjust the <tt>smp</tt> option to use the number of CPU cores and threads (if your system has hyperthreading) of your Linux system's CPU.
* Adjust memory allocated to the VM to be a fraction of your system's RAM (currently 6GB via {{c|-m 6144}} setting)


Use your favorite text editor to create the following script. Name it something like <tt>vm.sh</tt>:
Use your favorite text editor to create the following script. Name it something like {{c|vm.sh}}:


<syntaxhighlight lang="bash">
{{file|lang=bash|body=
#!/bin/sh
#!/bin/sh
export QEMU_AUDIO_DRV=alsa
WINIMG=~/vm/Win10_1803_English_x64.iso
DISKIMG=~/win7.img
VIRTIMG=~/vm/virtio-win-0.1.149.iso
WIN7IMG=~/Downloads/X15-65804.iso
qemu-system-x86_64 --enable-kvm -drive driver=raw,file=~/vm/win10.img,if=virtio -m 6144 \
VIRTIMG=~/Downloads/virtio-win-0.1-74.iso
-net nic,model=virtio -net user -cdrom ${WINIMG} \
qemu-kvm --enable-kvm -drive file=${DISKIMG},if=virtio -m 2048 \
-net nic,model=virtio -net user -cdrom ${WIN7IMG} \
-drive file=${VIRTIMG},index=3,media=cdrom \
-drive file=${VIRTIMG},index=3,media=cdrom \
-rtc base=localtime,clock=host -smp cores=2,threads=4 \
-rtc base=localtime,clock=host -smp cores=4,threads=8 \
-usbdevice tablet -soundhw ac97 -cpu host -vga vmware
-usb -device usb-tablet \
</syntaxhighlight>
-net user,smb=$HOME
}}


Now, make the script executable:
Now, make the script executable:


<console>
{{console|body=
$ ##i##chmod +x vm.sh
$ ##i##chmod +x vm.sh
</console>
}}


Here is a brief summary of what the script does. It starts the <tt>qemu-kvm</tt> program and instructs it to use KVM to accelerate virtualization. The display will be shown locally, in a window.
Here is a brief summary of what the script does. It starts the <tt>qemu-kvm</tt> program and instructs it to use KVM to accelerate virtualization. The display will be shown locally, in a window. If you are using the SPICE method, described later in this document, no window will appear, and you will be able to connect remotely to your running virtual machine.


The system disk is the 30GB raw image you created, and we tell QEMU to use "virtio" mode for this disk, as well as "virtio" for network access. This will require that we install special drivers during installation to access the disk and enable networking, but will give us better performance.
The system disk is the 30GB raw image you created, and we tell QEMU to use "virtio" mode for this disk, as well as "virtio" for network access. This will require that we install special drivers during installation to access the disk and enable networking, but will give us better performance.


To assist us in installing the VirtIO drivers, we have configured the system with two DVD drives -- the first holds the Windows 7 installation media, and the second contains the VirtIO driver ISO that we will need to access during Windows 7 installation.
To assist us in installing the VirtIO drivers, we have configured the system with two DVD drives -- the first holds the Windows 10 installation media, and the second contains the VirtIO driver ISO that we will need to access during Windows 10 installation.
 
The {{c|-usb -device usb-tablet}} option will cause our mouse and keyboard interaction with our virtual environment to be intuitive and easy to use.
 


The <tt>-usbdevice tablet</tt> option will cause our mouse and keyboard interaction with our virtual environment to be intuitive and easy to use.
{{important|1=
For optimal performance, adjust the script so that the <tt>-smp</tt> option specifies the exact number of cores and threads on your system -- on non-HyperThreading systems (AMD and some Intel), simply remove the <tt>,threads=X</tt> option entirely and just specify cores. Also ensure that the <tt>-m</tt> option provides enough RAM for Windows 10, without eating up all your system's RAM. On a 4GB Linux system, use <tt>1536</tt>. For an 8GB system, <tt>2048</tt> is safe. 6144 is ideal if you have 16GB+ of Linux RAM.}}


{{fancyimportant|1=
=== Installation of Windows 10 ===
For optimal performance, adjust the script so that the <tt>-smp</tt> option specifies the exact number of cores and threads on your system -- on non-HyperThreading systems (AMD and some Intel), simply remove the <tt>,threads=X</tt> option entirely and just specify cores. Also ensure that the <tt>-m</tt> option provides enough RAM for Windows 7, without eating up all your system's RAM. On a 4GB Linux system, use <tt>1536</tt>. For an 8GB system, <tt>2048</tt> is safe.}}


== SPICE (Accelerated Remote Connection) ==
To begin installation, run the script:
SPICE is a new technology that has been incorporated into QEMU, which allows the virtual machine to run on one system, and allows you to use <code>spicec</code>, the SPICE client, to connect to your remote virtual machine. In real-world use, you can run a SPICE server (via QEMU) and client on the same machine if you like, or have them on the same local area network, or have server and client connect over an Internet connection. Here are some important facts about SPICE:
 
* SPICE provides accelerated, optimized video updates over the network, similar to VNC
{{console|body=
* QEMU can be configured to run a SPICE server, which you can connect to via <code>spicec</code>, the SPICE client. The SPICE client renders to a local window on your system.
$ ##i##./vm.sh
* SPICE allows easy copying and pasting across operating systems -- for example, you can copy something in GNOME, paste it into the <code>spicec</code> window and have it appear on your Windows 7 system.
}}
 
The Windows 10 ISO image will boot and installation will begin. Everything should proceed as expected for a Windows 10 installation until the point where you need to select a destination disk.
 
[[File:Win10 install no drives.png|800px|Win10 install no drives]]
 
Since we are using the virtio driver, we will need to manually load this driver so that the 30GB disk image is visible for installation. To do this, you will see an option to manually install a driver. Select this option, and navigate to the Red Hat virtio ISO (available under your Windows VM) and to the {{c|E:\viostor\w10\amd64}} directory.
 
[[File:Win10 install manually install driver.png|800px|Win10 install manually install driver]]
 
After selecting this directory, the Windows 10 installer will spend a minute or two configuring the driver, after which you should be able to see 30 GB of free storage available for Windows installation.
 
[[File:Windows-setup.png|800px|Windows 10 - Installing virtio storage driver]]
 
Proceed with the installation process as normal.
 
 
 
=== Installation of Network Drivers ===
 
Once Windows 10 installation has completed, you will notice that although Windows is installed, no network or sound is available. We will not cover enabling sound in this document, as sound support in qemu is choppy by default (whether using alsa or pulseaudio) and really deserves its own document for proper configuration since it's so tricky to get perfect. But networking is essential, and we will want to your VM on the network.
 
To do this, open Device Manager in Windows and select the network adapter, and right-click on it and choose {{c|Update Driver}}. Then navigate to the virtio CD, path {{c|E:\NetKVM\w10\amd64}} and install the driver. Your network will now be enabled.


=== SPICE Setup ===
=== Accessing Files on your Linux System ===
To set up SPICE, you need to perform the following steps:
# Emerge QEMU with the <code>spice</code> USE variable on the system that will be running the Windows 7 virtual machine.
# Emerge <code>spice</code> on the system that you will be using to connect to your remote Windows 7 virtual machine.
# Add the following lines to your <code>vm.sh</code> script as <code>qemu-kvm</code> options -- remove the existing <code>-vga vmware</code> option:
-vga qxl -device virtio-serial-pci -spice port=5900,password=mypass \
-device virtserialport,chardev=spicechannel0,name=com.redhat.spice.0 \
-chardev spicevmc,id=spicechannel0,name=vdagent


Now, run vm.sh on your remote server (your Windows 7 system will now boot) and then connect to it by running the following command on your local system:
Our {{c|vm.sh}} by default enables built-in Samba support to allow easy access to files in your home directory. To enable this capability, type {{c|\\10.0.2.4\qemu}} in the Windows 10 search bar, and hit Enter. Windows should prompt you to create a network drive to this path. Do so, mapping it to drive Z, and click OK. You should now be able to access your Linux home directory as drive Z.
<console>
# ##i##spicec -h remotehost -p 5900 -w mypass
</console>
The SPICE client window will appear locally and allow you to interact with your Windows 7 system.


== Starting Windows 7 Installation ==
In newer versions of windows, guest authentication fallback for file shares is blocked according to https://support.microsoft.com/en-us/help/4046019/guest-access-in-smb2-disabled-by-default-in-windows-10-and-windows-ser .


Now, it's time to start Windows 7 installation. Run <tt>vm.sh</tt> as follows:
From the support link, this can be bypassed by navigating to the following group policy setting and enabling it.


<console>
{{c|Computer Configuration\Administrative Templates\Network\Lanman Workstation
$ ##i##./vm.sh
</console>


Windows 7 installation will begin. During the installation process, you will need to enter a valid license key, and also load ''both'' VirtIO drivers from Red Hat when prompted (Browse to the second DVD, then win7 directory, then x86).
"Enable insecure guest logons"}}


After some time, Windows 7 installation will complete. You will be able to perform Windows Update, as by default, you will have network access if your host Linux system has network access.
== SPICE (Accelerated Remote Connection) ==
SPICE is a new technology that has been incorporated into QEMU, which allows the virtual machine to run on one system, and allows you to use <code>spicy</code>, the SPICE client, to connect to your remote virtual machine. In real-world use, you can run a SPICE server (via QEMU) and client on the same machine if you like, or have them on the same local area network, or have server and client connect over an Internet connection. Here are some important facts about SPICE:
* SPICE provides accelerated, optimized video updates over the network, similar to VNC
* QEMU can be configured to run a SPICE server, which you can connect to via <code>spicy</code>, the SPICE client. The SPICE client renders to a local window on your system.
* SPICE allows easy copying and pasting across operating systems -- for example, you can copy something in GNOME, paste it into the <code>spicy</code> window and have it appear on your Windows 10 system.


Enjoy your virtualized Windows 7 system!
=== SPICE Setup ===
To set up SPICE, you need to perform the following changes to the "standard" steps described in this document:
# Emerge QEMU with the <code>spice</code> USE variable on the system that will be running the Windows 10 virtual machine.
# Emerge <code>app-emulation/virt-viewer</code> on the system that you will be using to connect to your remote Windows 10 virtual machine.
# In the <code>vm.sh</code> script, remove the existing <code>-vga vmware</code> <code>qemu-kvm</code> option, and add these options: <code>-vga qxl -device virtio-serial-pci -spice port=5900,password=mypass -device virtserialport,chardev=spicechannel0,name=com.redhat.spice.0 -chardev spicevmc,id=spicechannel0,name=vdagent</code>
# Run <code>vm.sh</code> as described in the next section on your remote server (your Windows 10 system will now boot, but you can't see the virtual machine display) and then connect to it by running the following command on your local system:
{{console|body=
# ##i## spicy -h remotehost -p 5900 -w mypass
}}
The SPICE client window will appear locally and allow you to interact with your Windows 10 system.


[[Category:Tutorial]]
[[Category:Tutorial]]
Line 123: Line 161:
[[Category:KVM]]
[[Category:KVM]]
[[Category:Official Documentation]]
[[Category:Official Documentation]]
[[Category:Articles]]
{{ArticleFooter}}

Latest revision as of 10:05, December 21, 2021

   Support Funtoo!
Get an awesome Funtoo container and support Funtoo! See Funtoo Containers for more information.

This page describes how to set up Funtoo Linux to run Windows 10 Home/Professional 64-bit within a KVM virtual machine. KVM is suitable for running Windows 10 for general desktop application use. It does not provide 3D support, but offers a nice, high-performance virtualization solution for day-to-day productivity applications. It is also very easy to set up.

   Warning

While this page provides a good introduction to how to run Windows 10 with Linux KVM, some parts of these instructions are specific to Funtoo Linux. They may need to be adapted somewhat for other Linux distributions. But we are happy to have this page be a good general resource for Windows 10 under KVM for all Linux distros. If you have adaptations to the docs for other Linux distributions, please feel free leaving the steps at the talk page and we'll consider adding them.

Introduction

KVM is a hardware-accelerated full-machine hypervisor and virtualization solution included as part of kernel 2.6.20 and later. It allows you to create and start hardware-accelerated virtual machines under Linux using the QEMU tools.

Windows 7 Professional 32-bit running within qemu-kvm

KVM Setup

You will need KVM to be set up on the machine that will be running the virtual machine. This can be a local Linux system, or if you are using SPICE (see SPICE), a local or remote system. See the SPICE section for tweaks that you will need to make to these instructions if you plan to run Windows 10 on a Funtoo Linux system that you will connect to remotely.

Follow these steps for the system that will be running the virtual machine.

If you are using an automatically-built kernel, it is likely that kernel support for KVM is already available.

If you build your kernel from scratch, please see the KVM page for detailed instructions on how to enable KVM. These instructions also cover the process of emerging qemu, which is also necessary. Do this first, as described on the KVM page -- then come back here.

   Important

Before using KVM, be sure that your user account is in the kvm group so that qemu can access /dev/kvm. You will need to use a command such as vigr as root to do this, and then log out and log back in for this to take effect.

Prior to using KVM, modprobe the appropriate accelerated driver for Intel or AMD, as root:

root # modprobe kvm_intel

Windows 10 ISO Images

In this tutorial, we are going to install Windows 10 Home, 64-bit Edition. Microsoft provides a free download of the ISO DVD image, but this does require a valid license key for installation. You can download the ISO at the following location:

https://www.microsoft.com/en-us/software-download/windows10ISO

   Note

Windows 10 is a free download but requires a valid license key for installation.

In addition, it's highly recommended that you download "VirtIO" drivers produced by Red Hat. These drivers are installed under Windows and significantly improve Windows 10 network and disk performance. You want to download the ISO file (not the ZIP file) at the following location:

https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/latest-virtio/

   Note

At the time of this writing, the latest version of the virtio ISO is virtio-win-0.1.149.iso

Create Raw Disk

In this tutorial, we are going to create a 30GB raw disk image for Windows 10. Raw disk images offer better performance than the commonly-used QCOW2 format. Do this as a regular user:

user $ cd
user $ mkdir vm
user $ cd vm
user $ qemu-img create -f raw win10.img 30G

We now have an empty virtual disk image called win10.img in our home directory.

QEMU script

Now, we'll create the following script to start our virtual machine and begin Windows 10 installation. Note that this script assumes that the two ISO files downloaded earlier were placed in the vm directory we created. Adjust paths as necessary if that is not the case. Also be sure to adjust the following parts of the script:

  • Adjust the name of VIRTIMG to match the exact name of the VirtIO ISO image you downloaded earlier
  • Adjust the smp option to use the number of CPU cores and threads (if your system has hyperthreading) of your Linux system's CPU.
  • Adjust memory allocated to the VM to be a fraction of your system's RAM (currently 6GB via -m 6144 setting)

Use your favorite text editor to create the following script. Name it something like vm.sh:

    (bash source code)
#!/bin/sh
WINIMG=~/vm/Win10_1803_English_x64.iso
VIRTIMG=~/vm/virtio-win-0.1.149.iso
qemu-system-x86_64 --enable-kvm -drive driver=raw,file=~/vm/win10.img,if=virtio -m 6144 \
-net nic,model=virtio -net user -cdrom ${WINIMG} \
-drive file=${VIRTIMG},index=3,media=cdrom \
-rtc base=localtime,clock=host -smp cores=4,threads=8 \
-usb -device usb-tablet \
-net user,smb=$HOME

Now, make the script executable:

user $ chmod +x vm.sh

Here is a brief summary of what the script does. It starts the qemu-kvm program and instructs it to use KVM to accelerate virtualization. The display will be shown locally, in a window. If you are using the SPICE method, described later in this document, no window will appear, and you will be able to connect remotely to your running virtual machine.

The system disk is the 30GB raw image you created, and we tell QEMU to use "virtio" mode for this disk, as well as "virtio" for network access. This will require that we install special drivers during installation to access the disk and enable networking, but will give us better performance.

To assist us in installing the VirtIO drivers, we have configured the system with two DVD drives -- the first holds the Windows 10 installation media, and the second contains the VirtIO driver ISO that we will need to access during Windows 10 installation.

The -usb -device usb-tablet option will cause our mouse and keyboard interaction with our virtual environment to be intuitive and easy to use.


   Important

For optimal performance, adjust the script so that the -smp option specifies the exact number of cores and threads on your system -- on non-HyperThreading systems (AMD and some Intel), simply remove the ,threads=X option entirely and just specify cores. Also ensure that the -m option provides enough RAM for Windows 10, without eating up all your system's RAM. On a 4GB Linux system, use 1536. For an 8GB system, 2048 is safe. 6144 is ideal if you have 16GB+ of Linux RAM.

Installation of Windows 10

To begin installation, run the script:

user $ ./vm.sh

The Windows 10 ISO image will boot and installation will begin. Everything should proceed as expected for a Windows 10 installation until the point where you need to select a destination disk.

Win10 install no drives

Since we are using the virtio driver, we will need to manually load this driver so that the 30GB disk image is visible for installation. To do this, you will see an option to manually install a driver. Select this option, and navigate to the Red Hat virtio ISO (available under your Windows VM) and to the E:\viostor\w10\amd64 directory.

Win10 install manually install driver

After selecting this directory, the Windows 10 installer will spend a minute or two configuring the driver, after which you should be able to see 30 GB of free storage available for Windows installation.

Windows 10 - Installing virtio storage driver

Proceed with the installation process as normal.


Installation of Network Drivers

Once Windows 10 installation has completed, you will notice that although Windows is installed, no network or sound is available. We will not cover enabling sound in this document, as sound support in qemu is choppy by default (whether using alsa or pulseaudio) and really deserves its own document for proper configuration since it's so tricky to get perfect. But networking is essential, and we will want to your VM on the network.

To do this, open Device Manager in Windows and select the network adapter, and right-click on it and choose Update Driver. Then navigate to the virtio CD, path E:\NetKVM\w10\amd64 and install the driver. Your network will now be enabled.

Accessing Files on your Linux System

Our vm.sh by default enables built-in Samba support to allow easy access to files in your home directory. To enable this capability, type \\10.0.2.4\qemu in the Windows 10 search bar, and hit Enter. Windows should prompt you to create a network drive to this path. Do so, mapping it to drive Z, and click OK. You should now be able to access your Linux home directory as drive Z.

In newer versions of windows, guest authentication fallback for file shares is blocked according to https://support.microsoft.com/en-us/help/4046019/guest-access-in-smb2-disabled-by-default-in-windows-10-and-windows-ser .

From the support link, this can be bypassed by navigating to the following group policy setting and enabling it.

Computer Configuration\Administrative Templates\Network\Lanman Workstation

"Enable insecure guest logons"

SPICE (Accelerated Remote Connection)

SPICE is a new technology that has been incorporated into QEMU, which allows the virtual machine to run on one system, and allows you to use spicy, the SPICE client, to connect to your remote virtual machine. In real-world use, you can run a SPICE server (via QEMU) and client on the same machine if you like, or have them on the same local area network, or have server and client connect over an Internet connection. Here are some important facts about SPICE:

  • SPICE provides accelerated, optimized video updates over the network, similar to VNC
  • QEMU can be configured to run a SPICE server, which you can connect to via spicy, the SPICE client. The SPICE client renders to a local window on your system.
  • SPICE allows easy copying and pasting across operating systems -- for example, you can copy something in GNOME, paste it into the spicy window and have it appear on your Windows 10 system.

SPICE Setup

To set up SPICE, you need to perform the following changes to the "standard" steps described in this document:

  1. Emerge QEMU with the spice USE variable on the system that will be running the Windows 10 virtual machine.
  2. Emerge app-emulation/virt-viewer on the system that you will be using to connect to your remote Windows 10 virtual machine.
  3. In the vm.sh script, remove the existing -vga vmware qemu-kvm option, and add these options: -vga qxl -device virtio-serial-pci -spice port=5900,password=mypass -device virtserialport,chardev=spicechannel0,name=com.redhat.spice.0 -chardev spicevmc,id=spicechannel0,name=vdagent
  4. Run vm.sh as described in the next section on your remote server (your Windows 10 system will now boot, but you can't see the virtual machine display) and then connect to it by running the following command on your local system:
root #  spicy -h remotehost -p 5900 -w mypass

The SPICE client window will appear locally and allow you to interact with your Windows 10 system.


   Note

Browse all our available articles below. Use the search field to search for topics and keywords in real-time.

Article Subtitle
Article Subtitle
Awk by Example, Part 1 An intro to the great language with the strange name
Awk by Example, Part 2 Records, loops, and arrays
Awk by Example, Part 3 String functions and ... checkbooks?
Bash by Example, Part 1 Fundamental programming in the Bourne again shell (bash)
Bash by Example, Part 2 More bash programming fundamentals
Bash by Example, Part 3 Exploring the ebuild system
BTRFS Fun
Funtoo Filesystem Guide, Part 1 Journaling and ReiserFS
Funtoo Filesystem Guide, Part 2 Using ReiserFS and Linux
Funtoo Filesystem Guide, Part 3 Tmpfs and Bind Mounts
Funtoo Filesystem Guide, Part 4 Introducing Ext3
Funtoo Filesystem Guide, Part 5 Ext3 in Action
GUID Booting Guide
Learning Linux LVM, Part 1 Storage management magic with Logical Volume Management
Learning Linux LVM, Part 2 The cvs.gentoo.org upgrade
Libvirt
Linux Fundamentals, Part 1
Linux Fundamentals, Part 2
Linux Fundamentals, Part 3
Linux Fundamentals, Part 4
LVM Fun
Making the Distribution, Part 1
Making the Distribution, Part 2
Making the Distribution, Part 3
Maximum Swappage Getting the most out of swap
On screen annotation Write on top of apps on your screen
OpenSSH Key Management, Part 1 Understanding RSA/DSA Authentication
OpenSSH Key Management, Part 2 Introducing ssh-agent and keychain
OpenSSH Key Management, Part 3 Agent Forwarding
Partition Planning Tips Keeping things organized on disk
Partitioning in Action, Part 1 Moving /home
Partitioning in Action, Part 2 Consolidating data
POSIX Threads Explained, Part 1 A simple and nimble tool for memory sharing
POSIX Threads Explained, Part 2
POSIX Threads Explained, Part 3 Improve efficiency with condition variables
Sed by Example, Part 1
Sed by Example, Part 2
Sed by Example, Part 3
Successful booting with UUID Guide to use UUID for consistent booting.
The Gentoo.org Redesign, Part 1 A site reborn
The Gentoo.org Redesign, Part 2 The Documentation System
The Gentoo.org Redesign, Part 3 The New Main Pages
The Gentoo.org Redesign, Part 4 The Final Touch of XML
Traffic Control
Windows 10 Virtualization with KVM