1. Introduction

This guide describes how to set up a Windows guest in the acontis RTOSVisor. The Windows guest is running in a virtual machine, which is powered by QEMU/KVM. 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 Network Share

Here we will show how to upload the .iso via network share visible to the computer running the RTOSVisor. We assume the network share has a directory /hv containing the file windows.iso.

sudo mount -t cifs //NameOrIpAddressOfPcWithShare/NameOfShare /mnt -o user=NameOfUserWithAccessToShare

Copy the Windows ISO image to /hv/iso.

cp /mnt/hv/windows.iso /hv/iso/windows.iso

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

sudo umount /mnt

3. Guest Configuration

Hint

This guide focuses on the Windows example guest. Initially, the Hypervisor Host does not provide any example guest folders. To switch to the Windows guest example, you need to perform the suitable initialization.

3.1. Open Example Project in System Manager

3.1.1. Browser Start

The Firefox browser can be launched directly on the Hypervisor Host. Press the top left icon and select Web Browser.

_images/BrowserStart.png
Type in the localhost IP address 127.0.0.1 and connect to port 5000.
The following URL can be used: http://127.0.0.1:5000
_images/BrowserIpAddressLocal.png

3.1.2. Local Connection

To connect the browser with the Hypervisor backend, please select Local Connection and the respective hypervisor type (RTOSVisor).

_images/SysMgrRTOSVisorHost.jpg

After acknowledging Connect to local system, the Hypervisor Host connection dialog will be shown. You should provide an appropriate name for this Hypervisor Host and press the Select button.

_images/SysMgrRTOSVisorHostSelected.jpg

3.1.3. Initial Synchronization

When you have started the System Manager for the first time, you need to run an initial synchronization step.

Press the synchronization button.

_images/SysMgrSyncDirty.jpg

A confirmation popup will then appear, where you need to press the ‘Apply’ button.

3.2. Windows Guest Example

Open the Windows Example project, it includes a Windows guest and a RT-Linux guest.

_images/SysMgrOpenExampleWindows.png

Before installing the guest operating system, it’s necessary to set up the corresponding virtual machine, including configuring settings like the number of CPU cores and network options. In the Navigator, open Guests, then Windows Example. You will see this screen:

_images/SysMgrAdjustExampleWindows.png
  • For the example Windows Guest setup, the installation media should be located at /hv/iso/windows.iso. You have the option to rename your existing .iso file to match this location on the Hypervisor host, or you can modify the Installation Media file setting to point to your file.

  • By defining the Disk Image File, you can specify the location and name of the guest’s image files. This setting should include a path beginning with /hv/VMs and a filename ending with the .qcow2 extension, such as /hv/VMs/example_win/windows.qcow2. This makes it possible to copy image files and use them in various projects without having to reinstall the Windows operating system.

  • Ensure the number of CPU cores allocated does not exceed the number of physical cores available on the system that are not allocated 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.

  • Tailor the memory allocation to meet the requirements of the Windows guest, ensuring not to allocate more RAM than what is physically available on the Hypervisor Host.

  • Expand the disk size as needed (Windows 11 requires a minimum of 75GB).

After making changes to a project, it’s essential to perform the synchronization step again: in the Navigator select Hypervisor-HostPC, then press the Sync-button and click ‘Apply’ in the confirmation popup. This process commits the configurations to the Hypervisor Host.

_images/SysMgrSyncDirty.jpg

Once synchronization is successful, the Hypervisor Host has to be rebooted.

_images/SysMgrRebootAfterSync.png

After rebooting the system, repeat the steps from the beginning:

  • Start the browser

  • Connect to 127.0.0.1:5000

  • Select Local Connection

  • Select Connect to local system

  • Click the Sync button and Apply

3.3. Command Line operation

This chapter demonstrates how to use the example projects using the command line instead of the System Manager. Note that it will override the settings made by the System Manager.

For the Windows Guest example setup, the installation media should be located at /hv/iso/windows.iso. Use the mv command to rename your existing .iso file if required.

mv /hv/iso/windows10.iso /hv/iso/windows.iso
hv_open_example windows_rtlinux
hv_sync_example windows_rtlinux
cd /hv/guests/guestwindows

If you are prompted whether you want to overwrite an existing project, type y if you are sure that you don’t need the existing project anymore.

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.

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.

mousepad /hv/guests/guestwindows/usr_guest_config.sh (and/or guest_config.sh)
# Adapt following lines to your system and needs (e.g. uncomment the respective lines):
vmname=...
vmid=...
windows_guest=...
cdrom_iso=...
num_cpus=...
ramsize=...
hdsize=...
shutdown_timeout=...
perfmon=...

Caution

Windows 11 requires a larger hdd size therefore the hdsize entry must be adjusted to a larger value, e.g. 75G!

export hdsize=75G     # Hard disk size

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 following steps outline how to start the Windows guest installation in the System Manager.

Change to Run mode.

_images/SysMgrRun.png

Start the Virtual Machine Framework (VMF). Starting the VMF will load the configuration for all guests. Real-time guests can only be launched when the VMF is running.

_images/SysMgrStartVMF.png
Select the Windows Example guest in the Navigator on the left side.
Click the Start Guest Button.
_images/SysMgrStartWindowsExample.png
Select More.../Start Guest Viewer to open the guest viewer, where you can see the Windows guest’s output or desktop.
_images/SysMgrOpenGuestViewerWindowsExample.png

Optional: The Windows guest operating system can be launched using the command line interface, too.

cd /hv/guests/guestwindows
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 be 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. After that 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 enter the BIOS by entering exit. Once you 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

Caution

A Windows 11 installation requires some additional steps. Please check the next chapter!

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

Hint

If you are prompted for the installation type, select Custom

Where do you want to install Windows.

Fig. 5.1 Where do you want to install Windows.

Click on Load Driver and browse to the CD Drive with the virtio drivers. Select the appropriate driver in the respective folder (e.g. Windows 10: \viostor\w10\amd64 Windows 11: \viostor\w11\amd64).

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

    Windows Install driver selection for Windows 10.

    Fig. 5.2 Windows Install driver selection for Windows 10.

    • Windows 11:

    Windows Install driver selection for Windows 11.

    Fig. 5.3 Windows Install driver selection for Windows 11.

  • Select your drive (50GB or larger)

    Windows Install disk.

    Fig. 5.4 Windows Install disk.

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

6. Windows 11 Installation

Installing Windows 11 need some additional handling regarding prerequisites.

The Windows 11 installer checks for TPM and Secure Boot.

Disable TPM and Secure Boot checks in the installer:

  1. When the installer begins, press Shift + F10 and launch Regedit from the command prompt.

    Registry Editor.

    Fig. 6.1 Registry editor.

  2. Create a new key named LabConfig under HKLM\SYSTEM\Setup.

    New LabConfig registry key location.

    Fig. 6.2 New LabConfig registry key location.

  3. Add a new DWORD value to HKLM\SYSTEM\Setup\LabConfig named BypassTPMCheck and set it to 1.

  4. Add a new DWORD value to HKLM\SYSTEM\Setup\LabConfig named BypassSecureBootCheck and set it to 1.

    New registry key and values.

    Fig. 6.3 The figure shows the finally LabConfig registry key and BypassTPMCheck + BypassSecureBootCheck values.

  5. Exit Regedit.

  6. To disable the network check, enter OOBE\BYPASSNRO into the command prompt.

  7. Close the command prompt, and continue.

The other steps are the same as for Windows 10, but with drivers for Windows 11 where applicable.

7. 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.266: 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. 7.1 SPICE/virtio-win guest tools.

SPICE/virtio-win guest tools setup.

Fig. 7.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 is not possible inside the guest, please run hv_guest_stop in the guest folder (/hv/guests/guestwindows).
    If shutdown does not work, you need to close the setup windows before (e.g. using tab keys to select the finish button).
    You may power off the guest by running hv_guest_stop -kill in the guest folder (/hv/guests/guestwindows).

8. Final Windows startup

8.1. System Manager operation case

  • Clear the “Installation media file” entry field to remove the .iso file, preventing the system from booting from the installation media again. You need to switch into Config mode first, then select the Windows Example guest and finally clear this entry.

_images/SysMgrClearIsoExampleWindows.png
  • Then you need to synchronize the updated settings with the Hypervisor backend. Switch to the Hypervisor HostPC entry in the Navigator tab and press the Sync button again.

_images/SysMgrSyncDirty.jpg

A confirmation popup will then appear, where you need to press the ‘Apply’ button.

  • Change to Run mode.

_images/SysMgrRun.png
  • Select the Windows Example guest in the Navigator on the left side.

  • Click the Start Guest Button.

Hint

If the message Starting guest failed, because VMF restart is required appears, navigate to “Hypervisor-HostPC” in the Navigator, then click “Stop VMF” followed by clicking “Start VMF”.

8.2. Command Line operation case

If you had set up the example project via the command line, then you will have to manually adjust the configuration again. You need to remove installation media file setting in the configuration and reboot the Windows example guest using the command line instead of the System Manager.

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

    mousepad /hv/guests/guestwindows/usr_guest_config.sh
    
    comment "cdrom_iso" with #
    
  • Start the Windows guest

    hv_guest_start -view
    

8.3. Windows specific notes

Due to hardware changes, Windows may automatically reboot once. Mouse and desktop may still not work properly. In this case, please install 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 Adapter has an exclamation mark near its icon.

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

  • Let Windows search for hardware changes –> the drivers should be found and installed properly.

9. 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.

Caution

You may get an error (0x80004005) when accessing the share due to some restrictive Windows settings. In that case, try to allow insecure guest logins. Windows blocks guest logins to network devices using SMB2 by default.
Another security related issue is SMB signing, which is indicated by messages like You can’t access this shared folder because your computer is configured to require SMB signing.
Please check the Hypervisor Manual chapter KVM Guests for more information and how to solve these issues.

Open CMD prompt in Windows guest and enter the following:

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

Fig. 9.1 Setup command.

Install HV exe.

Fig. 9.2 Running setup.

Install HV exe successful.

Fig. 9.3 Installation successful.

Install HV exe final desktop.

Fig. 9.4 New desktop icons.

Caution

The installer will set-up the default values of Vnet IP address, Vnet MAC ID and attach ID! Therefore a 2nd (or more) Windows guest(s) will require manual adjustments to the aforementioned settings. Please adjust it accordingly!

10. 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. 10.1 Power and Sleep settings.

11. Windows and Real-time guest in parallel

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

  • Shutdown Windows, do NOT reboot!

  • Reboot the Hypervisor Host

  • Open the browser, connect with the Hypervisor backend click the Sync button and Apply again.

Change to Run mode.

_images/SysMgrRun.png

Start the Virtual Machine Framework (VMF).

_images/SysMgrStartVMF.png
  • Run the Real-Time Linux guest

    Hypervisor RT-Linux first.
  • Start the Windows guest

    Hypervisor Start Windows after RT-Linux.
  • After logging in into Windows, execute Hypervisor Attach (Desktop icon)

Hypervisor Attach.

Fig. 11.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. 11.2 Linux Shell.

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

    vmf64 login: root
    password:  root
    RealtimeDemo