UnRAID 6/VM Guest Support

From unRAID
Jump to: navigation, search

Types of Guests Supported

unRAID 6 currently supports the virtualization of nearly any 64-bit operating system. Not all OSes have been tested, but those that have are listed on this page.

Microsoft Windows

A few notes on virtualizing Windows on unRAID before you begin:

  • Before activating your Windows license, we highly encourage thorough testing of your VM first.
  • Changing the machine type between i440fx and Q35 under advanced mode will prompt Windows for reactivation of the license.
  • Windows 7 and earlier OS variants may not work with host-based graphics assignment correctly. Use Windows 8.1 or newer for the best experience.
  • If using OVMF, you must use Windows 8 or newer. UEFI is not directly supported by Windows 7 and therefore, OVMF will not work.

Windows is different from Linux-based guests as it requires the user to load the VirtIO drivers to be able to recognize the virtual devices provided by QEMU/KVM. The below list reflects the tested configurations with various OSes, QEMU machine types, BIOSes, and VirtIO driver versions.

NOTE: where multiple VirtIO drivers are specified, the OS was first installed with the lowest driver version, then updated in place with the later driver version(s) specified.

Desktops

Version Machine Type(s) BIOS VirtIO Drivers Status
Windows 7 i440fx, Q35 SeaBIOS 0.1.102, 0.1.109 Works
Windows 8.1 i440fx, Q35 SeaBIOS, OVMF 0.1.102, 0.1.109 Works
Windows 10 i440fx, Q35 SeaBIOS, OVMF 0.1.109 Works

Servers

Version Machine Type(s) BIOS VirtIO Drivers Status
Windows Server 2008 R2 i440fx, Q35 SeaBIOS 0.1.102, 0.1.109 Works
Windows Server 2012 R2 i440fx, Q35 SeaBIOS 0.1.102, 0.1.109 Works
Windows Server 2012 R2 i440fx OVMF 0.1.109 Works
Windows Server 2016 TP3 i440fx, Q35 SeaBIOS 0.1.109 Not Yet Tested
Windows Server 2016 TP3 i440fx OVMF 0.1.109 Not Yet Tested

Updating VirtIO Drivers

From time to time, the Fedora project will release new versions of the VirtIO drivers which may resolve bugs and improve performance. In some cases, driver updates may be required for upgrading your Windows OS from one version to another (e.g. Windows 7/8.1 to Windows 10). To update your drivers, perform the following steps:

1. Download the new drivers from the Fedora project website (you can view the changelog to determine if updates were made and what they contained).

2. Store the new drivers in your ISOs share on your unRAID server.

3. Edit your VM from the VMs tab, and under Advanced View, change the VirtIO Drivers ISO path to specify the new drivers you downloaded in the previous step.

4. Click Update to save the changes.

5. Start your VM.

6. Using Windows Device Manager, you will need to locate each of the four VirtIO devices (Ethernet, SCSI Controller, Balloon, and Serial).

7. Right-click on each device and select Update device drivers

8. Specify the root of the VirtIO drivers ISO (typically e:\ or d:\)

9. Let Windows automatically search for and find the new drivers.

Post-Install Tuning

After the installation of a Windows VM, there are several things you can do to optimize your VM's performance and flexibility. None of these are required, but should you run into performance issues with your Windows VMs, following these guides may improve things for you.

Disable Fast Startup

Fast Startup is a feature introduced with Windows 8 that can improve boot times on physical PCs. However, as a VM, this can cause problems when initializing hardware after shut down (this can especially be true if you are assigning physical devices to virtual machines). It is for these reasons we highly encourage users to set their power management settings to High performance mode.

1) Open up the Control Panel for Windows and in the top-right search box, type "power" to search for the power settings controls, then click on Change what the power buttons do:
Disable fast startup - step 1.png
2) Click the Change settings that are currently unavailable link near the top of the next window:

Disable fast startup - step 2.png

3) Uncheck Turn on fast startup from under the Shutdown settings section:

Disable fast startup - step 3.png

Disable Hiberfil.sys

Even with fast startup disabled, technically the system is still able to "hibernate" as a user-controllable function. Hibernation suspends the Windows OS to RAM so that on resume, the entire system state returns as it was. The trade-off, however, is that a hidden file called Hiberfil.sys will be created on the root of your C:\ drive that can take up a massive amount of space and generate lots of disk IO activity for a feature that most users will never leverage. By disabling hibernation as a feature entirely, you can reclaim many GB of space on your virtual disk and reduce overhead relating to disk IO inside the VM.

1) Open a Windows command prompt as an administrator and enter this command:  powercfg -h off
2) Reboot your VM and the hiberfil.sys file should no longer remain (this step may not be necessary for certain versions of Windows).

Disable Windows Indexing

The Windows indexing service (aka Windows Search) can cause unnecessary disk IO inside your VM. To improve overall VM performance, it is recommended to disable this service from running in Windows.

1) Open a Run window and type services.msc inside, then press Enter:
Disable windows indexing - step 1.png
2) Right-click the Windows Search service from the next window and then click Stop:
Disable windows indexing - step 2.png
3) Double-click the Windows Search item from the list and in the next window, change the Startup type to Disabled:
Disable windows indexing - step 3.png

Disable Automatic Disk Defragmenting

If Windows disk defragmenter is set to automatically run on a schedule, you should disable it. This is not necessary for VMs and can cause unnecessary wear and tear on your physical storage devices.

1) Use Windows Explorer to browse to where you can see the C:\ drive, then right-click on the device and select Properties:
Disable disk defrag - step 1.PNG
2) Click on the Tools tab at the top, then click Optimize:
Disable disk defrag - step 2.png
3) Click on the Change settings button:
Disable disk defrag - step 3.png
4) Uncheck Run on a schedule from the next window:
Disable disk defrag - step 4.png

Enable High Performance Power Mode

Because Windows is a virtual machine, there is little to no benefit in leveraging it's power management features. In fact, these features can make using VMs more difficult, as it requires another device to then access the webGui to resume a VM that was suspended due to a period of inactivity.

1) Open up the Control Panel for Windows and in the top-right search box, type "power" to search for the power settings controls, then select Choose a power plan:
High performance power mode - step 1.png
2) Select High performance from the options available under Preferred plans:
High performance power mode - step 2.png

Enable Remote Desktop Access

NOTE: YOUR USER ACCOUNT MUST HAVE A PASSWORD SET IN ORDER TO CONNECT TO YOUR VM USING RDP.

If you wish to interact with your VM from another device, you have two remote graphics protocols at your disposal with unRAID 6: VNC and RDP. RDP offers performance improvements over VNC, but requires you to enable it from within the VM before you can use it. It also requires you to have a valid RDP client installed on the device you wish to use to connect to your VM (officially supported clients from Microsoft work on Android, iOS, Mac OS X, and Windows). You will also need to be using Windows Professional edition (the Home edition does not include this feature). To enable RDP access to your VM, perform the following steps through VNC or locally using GPU pass through:

1) Open the System panel by right-clicking on the Windows start button in the lower-right corner of your desktop.
Enable rdp - step 1.png
2) Click on Remote settings
Enable rdp - step 2.png
3) Click on Allow remote connections to this computer and click OK.
Enable rdp - step 3.png
4) You can now connect using a Microsoft RDP client, but you will need to connect to the IP address of the virtual machine, not unRAID itself.

Enable MSI for Interrupts to Fix HDMI Audio Support

If you are assigning a graphics device to your Windows guest that uses an HDMI connection and you wish to push audio through that connection, you may need to perform a registry modification in Windows to ensure the audio driver remains working properly (this is most prevalent with NVIDIA devices). For a comprehensive explanation of MSI and VFIO interrupts, you can visit Alex Williamson's blog[1]. Here's the procedure for doing this:

  • Shut down your VM and make a copy of your virtual disk before proceeding (as a backup).
  • Start your VM with the GPU device assigned.
  • Access your server using SSH or telnet.
  • For the device you wish to assign, locate it's PCI address identifier (this can be found when selecting the device from within the VM creation tool)
  • From the command line, type the following: lspci -v -s 1:00.0 (replace 1:00.0 with your GPU device)
  • Look for a line that looks like this: Capabilities: [68] MSI: Enable+ Count=1/1 Maskable- 64bit+

If the Enable setting is set to +, that means your device claims it is MSI capable and it is enabled by the guest VM that is using it. If you cannot find a line that mentions MSI as a capability, it means your device does not support this. If the Enable setting is set to -, this means your device claims it is MSI capable, but that the guest VM is NOT using it. The procedure for enabling MSI support from Windows is documented here: http://forums.guru3d.com/showthread.php?t=378044

Upgrading a VM to Windows 10

If you have a Windows 7 or 8.1 virtual machine and wish to upgrade to Windows 10, there are some special considerations. This guide will assist you in making the upgrade process as painless as possible.

Do NOT Use the Upgrade Assistant

Dont use windows upgrade assistant.png
Microsoft's website suggests that if you want to upgrade to Windows 10, to use the upgrade assistant in the bottom right corner to perform your upgrade. This is known to be buggy and potentially cause issues (even on traditional Windows PCs). The preferred mechanism to upgrade is to download the Windows 10 ISO directly and attach it to your virtual machine, then use that to perform the upgrade itself.

Upgrade VirtIO Drivers to 0.1.109 or later

If you used the 0.1.102 drivers for your Windows 7 or 8.1 VM, you will want to upgrade these drivers to 0.1.109 or later before performing the upgrade. The process to update the drivers is located here:

Obtaining the Installation Media

The process for obtaining Windows 10 installation media for the purpose of an upgrade is the same as it is for performing a new installation. Visit this page to download the installation media. If given an option, make sure you select ISO. Once the download is finished, make sure you copy the ISO to the ISOs share on your server.

Performing the Upgrade

With your VM powered off, edit the VM and perform the following steps:

1. Reduce the number of CPUs assigned to only 1.

Only 1 cpu core assigned.png

2. Change the OS Install ISO field to point to the Windows 10 installation media you downloaded earlier.

Change install iso.png

3. Click Update.

4. Start your VM.

5. Browse to the installation media using File Explorer and launch the setup wizard.

6. Follow the on-screen prompts to complete the upgrade process.

7. Once completed, you can shutdown and edit the VM, increasing the number of CPUs assigned as desired.

OpenELEC

As of unRAID 6.1, OpenELEC has been made available as a pre-configured VM template. This enables users to quickly add the robust media player application, Kodi, to their unRAID systems, and use a physical graphics card to output to the display closest to their system.

Prerequisites

To make use of this VM template, your system must adhere to the following requirements:

  • Your CPU/Motherboard must have support for HVM and IOMMU support
  • A discrete (PCIe) graphics adapter (NVIDIA/AMD) is required (no on-board graphics supported)
    • Most GPUs work fine, but some may require additional tweaks to work properly
  • At least 512MB free in RAM to assign to the VM
  • At least 300MB of free disk space in a user share
  • A connection to the Internet is required to download the virtual disk image template
  • Virtual machines must be enabled (under Settings -> VM Manager)
  • A place to store the virtual disk image and application data must be available (e.g. a vdisks and appdata share).

Downloading the VM

  • Navigate to the VMs tab
  • Click Add VM
  • Select OpenELEC from the Template drop down
  • Click inside the Download Folder field to select a place to store the virtual disk image
    • Your shares can be found under /mnt/user/ (e.g. /mnt/user/domains or /mnt/user/vdisks)
  • Click Download to download the VM image template; progress will be displayed automatically.

Configuring the VM

When the download completes, the form under Template Settings will change, allowing you to configure your VM.

  • In the Add VM section at the top, make sure to give your VM a Name
  • Click inside the Config Folder field to provide a path to store your Kodi media library data
    • Your shares can be found under /mnt/user/ (e.g. /mnt/user/appdata/OpenELEC)
  • Select how many CPUs you want assigned (minimum 1)
  • Select a Graphics Card to use for video output
  • Select a Sound Card for audio output
  • Select any USB Devices you wish to use with the VM (such as a keyboard, mouse, or infrared receiver)
  • Click Create to start your VM

Updating the VM

As new versions of unRAID OS are made available, new versions of the VM template may also be made available. To obtain a new version:

  • From the VMs tab, click the icon of the VM you wish to upgrade and select Edit
  • From the Edit VM page, click the Version drop-down and select the new version you wish to download
  • Click the Download button and the new image version will download automatically
  • When the download is complete, click Update at the bottom
  • Start your VM from the VMs tab

Using Kodi

For new users of the ultimate customizable media player application, you may want to review the Kodi wiki, and specifically see these guides:

Questions? Need help or support?

Additional support can be requested for this VM template within the OpenELEC VM Template Support thread in the VM Templates message board.