1. Introduction

This guide describes how to set up a Windows guest in the acontis Hypervisor. It is assumed that the steps listed in the Hypervisor Quick Start guide have been successfully executed.

2. Copy a Windows ISO installation media to the Hypervisor Host

In a first step, we need to copy the Windows installation media (ISO file) into the Hypervisor filesystem.

2.2. Using a Windows Share

Here we will show how this can be accomplished using a network share (//NameOrIpAddressOfPcWithShare/NameOfShare) in the Windows system. We assume the network share has a directory /hv containing the file Windows.iso. We need to install the network client software (cifs) in the hypervisor and then mount the Windows network share.

sudo apt-get install cifs-utils
sudo mount -t cifs //NameOrIpAddressOfPcWithShare/NameOfShare /mnt -o user=NameOfUserWithAccessToShare

Copy the Windows 10 ISO image to /hv/guests/files.

cp /mnt/hv/Windows10.iso /hv/guests/files/Windows10.iso

The mount point /mnt isn´t needed anymore and thus will be unmounted.

sudo umount /mnt

3. Guest Configuration

Prior to installing the guest, we need to configure the respective virtual machine (e.g. number of CPU cores, network settings etc.). The configuration files guest_config.sh and usr_guest_config.sh are located in the guest folder. The meaning of each configuration setting is explained in detail in those files. You need to edit these files and adjust them according to your needs and environment.

Caution

If the guest is controlled by the System Manager tool, you must not change the guest_config.sh file (the content may be overwritten by the System Manager), instead uncomment the respective settings in usr_guest_config.sh.

Example guests located in /hv/guests/examples are not controlled by the System Manager.

The number of CPU cores must not exceed the number of physical cores available in the system and not assigned to Real-time guests. For example, if on a quad core CPU, you need 2 cores for Real-time guests, the number of cores for the Windows guest must not exceed 2. The default parameters should fit for most cases.

gedit /hv/guests/examples/windows/guest_config.sh (and/or usr_guest_config.sh)
# Adapt following lines to your system and needs:
vmname=...
vmid=...
windows_guest=...
cdrom_iso=...
num_cpus=...
ramsize=...

You have to set the cdrom_iso parameter to the appropriate folder where the installation media ISO file had been copied before.

By default, the network connection is set up automatically (using DHCP). Please check the Hypervisor Manual for other settings.

Caution

Automatic network setting will only work, if the Ethernet cable is connected!

Caution

Please do not configure more CPUs than physically available (CPUs used for the Real-time OS are not available for the Windows guest). Example: The maximum number of of CPUs on a quad-core CPU where 1 CPU is used for the Real-time OS is 3.

Caution

Please do not configure more RAM than available. The VM may unexpectedly crash if too much RAM is configured. You can determine the available RAM as follows:

cat /proc/meminfo | grep MemAvailable

4. Guest Installation

After VM configuration you need to start the guest for the first time. The guest console will be shown then (the guest output or desktop).

cd /hv/guests/examples/windows
hv_guest_start -view

Caution

if you see an error like (remote-viewer:5083): Gtk-WARNING : 11:15:50.298: cannot open display: :10.0, you may using a RDP connection when installing the guest. In this case the GUI Window (remote-viewer) will not be shown. To fix this execute the commands

sudo -u username xhost +SI:localuser:root

where the username is the username you are logged in with. Then execute hv_guest_console to start the viewer.

The installation media iso file will be detected by the virtual bios, you need to press a key to boot from it:

UEFI Boot.

Fig. 4.1 Boot from ISO file.

Hint

In case no key was pressed in time or the installation media was not found, the EFI shell will be started.

  • Option a) You can leave into BIOS by entering exit. If you also leave BIOS the boot begins again and you can press a key to boot from CD.

  • Option b) You can manually start the CD’s bootloader by entering
    • $ FS0:

    • $ \EFI\BOOT\BOOTX64.EFI

Hint

If the start EFI file is not set in the BIOS (BOOTX64.EFI does not exist), you need to type exit to leave the shell and switch into the BIOS. There you need to select the CDROM in the boot menu.

5. Windows Installation

  • Follow the steps as usual until the Where do you want to install Windows dialog shows up

    Where do you want to install Windows.

    Fig. 5.1 Where do you want to install Windows.

You need to browse to the CD Drive with the virtio drivers. Select the appropriate driver in the respective folder (e.g. \viostor\w10\amd64).

  • Then select Load driver –> OK –> Red Hat VirtIO SCSI controller” (W10) –> Next

    Windows Install driver select.

    Fig. 5.2 Windows Install driver select.

  • Select your drive (50GB)

    Windows Install disk.

    Fig. 5.3 Windows Install disk.

  • Finish Installation (please note, there is no network/internet available in this setup)

6. Hypervisor Guest Tools

After successfully installing Windows you need to install the SPICE Windows guest tools.

  • Open the Windows Explorer and install the spice guest tools.

The installation file is located in CD Drive (E:) virtio-win-0.1.215: virtio-win-guest-tools. Select and start to install these tools. In case a message box appears to confirm driver installation, please confirm install the driver(s).

SPICE/virtio-win guest tools.

Fig. 6.1 SPICE/virtio-win guest tools.

SPICE/virtio-win guest tools setup.

Fig. 6.2 SPICE/virtio-win guest tools setup screen.

After the setup finished, you may not be able to use the mouse anymore. This is related to a new driver installed which is not supported by the viewer application. In any case, close the setup message box (type enter, while the focus is on the finish box).

  • Shutdown Windows

You need to shut down the guest (do NOT reboot Windows!). If this not possible inside the guest, please run hv_guest_stop in the guest folder (/hv/guests/examples/windows). If shutdown does not work, you need to close the setup windows before (e.g. using tab keys to select the finish button).

  • Adjust the file usr_guest_config.sh (to avoid booting the installation media again)

    gedit /hv/guests/examples/windows/usr_guest_config.sh
    
    comment "cdrom_iso" with #
    
  • Start the Windows guest

    hv_guest_start -view
    

Due to hardware changes, Windows may automatically reboot once. Mouse and desktop may still not work properly. In this case, please install all the latest Windows updates.

Caution

In some cases the guest network does not work after guest tools installation. In case a guest reboot does not help you may try to execute the following steps:
  • Open the Windows Device Manager

  • Open “Network Adapters” and check if “Red Hat VirtIO Ethernet Adaper” has an exclamation mark near its icon.

  • Delete all adapters with the exclamation mark (drivers deletion checkbox should not be checked out!).

  • Then let Windows look for hardware changes, the drivers should be found and installed properly.

7. RTOS Communication Support

To communicate with an RTOS via the Hypervisor we need to install RTOSVisor.exe containing the required drivers and packages.

Hint

If you encounter a message like Applying execute package: RteRuntime_x64. Error 0x80070643: Failed to install MSI package when running this command, you may have got a test version of the RTOSVisor. In test versions unsigned drivers are included. You need to enable testsigning before installing the guest support.

  • Step 1: Run Command Prompt as administrator.

  • Step 2: Input the command in the window: bcdedit /set testsigning on and press Enter. Reboot the guest.

Open CMD prompt in Windows guest and enter the following:

Call \\10.0.2.4\qemu\files\RTOSVisor.exe
Install HV exe command.

Fig. 7.1 Setup command.

Install HV exe.

Fig. 7.2 Running setup.

Install HV exe successful.

Fig. 7.3 Installation successful.

Install HV exe final desktop.

Fig. 7.4 New desktop icons.

8. Power & sleep

Sleep and Hibernate are currently not supported (S3 or S4 mode). Disable Sleep (Windows Settings – System – Power and sleep):

Power and Sleep settings.

Fig. 8.1 Power and Sleep settings.

9. Windows and Real-time guest in parallel

In this step, we will run Windows and Real-Time Linux in parallel.

Caution

The hv.config configuration file is a link to the RT-Linux example guest configuration file. See also chapter Example guest folders in the Hypervisor Manual for more information.

  • Shutdown Windows, do NOT reboot!

  • Reboot the Hypervisor Host

    sudo reboot
    
  • After system reboot, open a shell terminal again (right click on desktop and select ‘Open Terminal here’ or press CRTL + ALT + T). Then, run the Real-time Linux guest

    cd /hv/guests/examples/rt-linux
    hv_guest_start -view
    
  • Open a second shell terminal

  • Start the Windows guest

    cd /hv/guests/examples/windows
    hv_guest_start -view
    
  • After logging in into Windows, execute “Hypervisor Attach” (Desktop icon)

Hypervisor Attach.

Fig. 9.1 Hypervisor Attach.

  • Download and install the appropriate putty package from https://www.putty.org/

  • Open the RT-Linux shell: execute “Hypervisor Putty” (Desktop icon)

Linux Shell.

Fig. 9.2 Linux Shell.

  • Log in into Real-Time Linux and run the Real-time demo:

    vmf64 login: root
    password:  root
    RealtimeDemo