As no OS is installed yet, the guest will boot into the EFI shell.Guest installation———— Introduction ————

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

The last chapter describes how to set up an additional Ubuntu guest, if 2 (or more) Ubuntu guests are desired.

Hint

This guide uses ubuntu-22.04-desktop-amd64.iso as Ubuntu guest. The same should be achieved with a newer or older version of Ubuntu.

1. Create folder for running the VM

In the first step, you have to create a folder where the VM shall be stored. The template folder has to be copied into a new VM specific folder, we will use the folder name vm1 in this example.

cd /hv/VMs
cp -R vm_template vm1

2. Copy Ubuntu ISO installation media to Linux

In a first step, we need to copy the Ubuntu installation media (ISO file) from a Windows (or Linux) host system 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 host system. We assume the network share has a directory /hv containing the file ubuntu-22.04-desktop-amd64.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 Ubuntu ISO image to /hv/VMs/vm1.

cp /mnt/hv/ubuntu-22.04-desktop-amd64.iso /hv/VMs/vm1/ubuntu-22.04-desktop-amd64.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 file vmconfig.sh is located in the VM directory. The meaning of each configuration setting is explained in detail in this file. You need to edit this file and adjust according to your needs and environment.

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 Ubuntu guest must not exceed 2.

gedit /hv/VMs/vm1/vmconfig.sh
  • Change windows_guest=

    # unique identifier settings for this VM
    export windows_guest=1  # set to 1 if the VM is a Windows guest
    

    to

    # unique identifier settings for this VM
    export windows_guest=0  # set to 1 if the VM is a Windows guest
    
  • Change cdrom_iso=

    # If an ISO file shall be used instead of a physical CDROM, uncomment below
    # command and replace the ISO name with the appropriate file name.
    export cdrom_iso=/hv/VMs/vm1/Windows10.iso
    

    to

    # If an ISO file shall be used instead of a physical CDROM, uncomment below
    # command and replace the ISO name with the appropriate file name.
    export cdrom_iso=/hv/VMs/vm1/ubuntu-22.04-desktop-amd64.iso
    
  • Change ramsize= and hdsize=

    # Major VM settings
    export ramsize=4096     # RAM size of the physical machine.
    export hdsize=50G       # Hard disk size.
                            # This value is only when creating a new hard disk image.
                            # After creating the disk image, this value is ignored.
    

    to

    # Major VM settings
    export ramsize=2048     # RAM size of the physical machine.
    export hdsize=25G       # Hard disk size.
                            # This value is only when creating a new hard disk image.
                            # After creating the disk image, this value is ignored.
    
  • Adapt following line to your system and needs:

num_cpus=...
  • 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!

4. Guest installation

After VM configuration you need to start the script vmrun.sh for the first time. The remote viewer will start and boot the guest.

cd /hv/VMs/vm1
sudo ./vmrun.sh

5. Ubuntu Installation

Follow the steps as usual for Ubuntu. In this guide the default cases are used where applicable.

  • GRUB selection menu

    GRUB selection menu.

    Fig. 5.1 Select Try or Install Ubuntu at GRUB selection menu.

  • Select Install Ubuntu

    Welcome screen of the Ubuntu installer.

    Fig. 5.2 Install Ubuntu select.

  • Select your Keyboard layout –> Continue

    Select keyboard layout page.

    Fig. 5.3 Select keyboard layout.

  • Updates and other software (default state) –> Continue

    Updates and other software page.

    Fig. 5.4 Leave Updates and other software as default.

  • Installation type –> Erase disk and install Ubuntu –> InstallNow

    Install type page.

    Fig. 5.5 Select Erase disk and install Ubuntu at installation type page.

  • Confirm Write the changes to disks? dialog –> Continue

    Write the changes to disks? dialog.

    Fig. 5.6 Confirm Write the changes to disks? dialog.

  • Where are you –> Continue

    Where are you page.

    Fig. 5.7 Select where you are.

  • Create credentials –> Continue

    Credentials page.

    Fig. 5.8 Fill in the credentials.

    Hint

    In this guide the default user used is rte. It’s recommended to supply a password.

  • Restart –> RestartNow

    Restart.

    Fig. 5.9 Restart guest.

  • Press enter –> ENTER

    Press enter required.

    Fig. 5.10 Press ENTER.

  • Login (in this example with user rte and the supplied password)

    Login into guest.

    Fig. 5.11 Login into guest.

  • OPTIONAL Update guest –> InstallNow

    Optional: Update guest.

    Fig. 5.12 Update guest.

  • Installation finished!

6. Running Ubuntu guest

After successfully installing Ubuntu, you need to shutdown Ubuntu.

  • Shutdown Ubuntu

Important

You need to shutdown the guest (do NOT reboot Ubuntu!). If this is not possible inside the guest, please use the ./vmshtdn.sh script! If shutdown is blocked, you need to close the setup windows before (e.g. using tab keys to select the finish button).

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

    gedit /hv/VMs/vm1/vmconfig.sh
    
    comment "cdrom_iso" with #
    
  • Start the Ubuntu guest

    ./vmrun.sh
    

Hint

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

7. Ubuntu and Real-time guest in parallel

In the final step, we will run Ubuntu and Real-Time Linux in parallel.

  • Shutdown Ubuntu, do NOT reboot!

  • Run the Real-Time Linux guest

    cd /hv/lx
    sudo ./lx.sh
    ./dbgcon.sh
    
  • Open a second shell (right click on desktop and select ‘Open Terminal here’ or press CRTL + ALT + T)

  • Start the Ubuntu guest

    cd /hv/VMs/vm1
    ./vmrun.sh
    
  • Log into Real-Time Linux and run the Real-time demo:

    vmf64 login: root
    password:  root
    RealtimeDemo