Skip to content
PDF

Provisioning a Virtual Machine Workload#

Before a Virtual Machine workload can be provisioned, it is required to set up the virtual machine on the node. In more detail, what needs to be done is:

  1. Creating a virtual machine on the node
  2. Installing an operating system on the virtual machine
  3. Obtaining the virtual machine IMG and XML files
  4. Provisioning the Virtual Machine workload in the Management System

In this version, Nerve Blue does not provide a GUI based method for installing an OS on a virtual machine and obtaining the virtual machine IMG and XML configuration files. Therefore, this chapter focuses on the manual process. Three tools are required for the instructions below, assuming Windows is used on the workstation:

  • an X Server application like Xming
  • an SSH client like PuTTY
  • a file transfer client like WinSCP

Also the workstation needs to be connected to the management port of the Nerve Device and the IP address of the network adapter of the workstation needs to be configured in the correct range. This information is device specific. Consult the device guide for information on your Nerve Device.

The instructions below are split up into multiple parts to make them easier to follow. The subsections of the instructions are connected and every subheading is a requirement for the next paragraph.

Note

The virtual machine generated in this chapter is a fresh installation and will be generated on the Nerve Device directly.

Copying the ISO File to the Nerve Device#

First, it is necessary to copy the ISO file of the OS to the Nerve Device for the installation on the virtual machine.

Note

The instructions below are hardware specific. The MFN 100 is used as an example in the screenshots. See the device guide for specific information on your Nerve Device.

  1. Open a file transfer client like WinSCP.
  2. Enter the IP address for host access of your Nerve Device under Host Name.
  3. Enter the credentials for host access to the Nerve Device below under User name and Password.

    !WinSCP Host Login

  4. Navigate to the /tmp/ directory on the right side of the WinSCP window. It is located in the root directory.

    !WinSCP TMP Folder

  5. Copy the ISO file of the OS that is to be installed on the virtual machine to the tmp folder on the Nerve Device.

Creating a Virtual Machine on a Node#

Using the Virtual Machine Manager is recommended to create a virtual machine and install the OS from the ISO file. Note that the virtual machine in this chapter is a fresh installation and will be generated on the Nerve Device directly.

  1. Run Xming or an alternative.
  2. Open an SSH client like PuTTY.
  3. Enter the IP address for host access of your Nerve Device under Host Name (or IP address) to log in to the host of the Nerve Device.

    !PuTTY Host Login

  4. Expand Connection > SSH > X11 on the left side.

  5. Tick the checkbox next to Enable X11 forwarding.

    !Enable X11 Forwarding

  6. Click Open.

  7. Log in with the credentials for host access of the Nerve Device.
  8. Enter virt-manager.

    !Open Virtual Machine Manager

    The interface of the Virtual Machine Manager will open.

    !Open Virtual Machine Manager

Inserting the Installation File (ISO)#

The creation of the virtual machine can now be initiated with the installation of the OS following right after. Note that the Virtual Machine Manager requires the virtual insertion of the ISO file in the beginning while resources for the virtual machine are defined later.

  1. Select File > New Virtual Machine or click the symbol.

    !New Virtual Machine

  2. Select Local install media (ISO image or CDROM).

  3. Click Forward.

    !Local Install

  4. Click Browse... in the next window.

  5. In the new window select Browse Local.

    !Browse Local

  6. Navigate to the tmp folder by clicking the left arrow next to admin. It is located in the root directory.

  7. Double-click the tmp folder.

    !TMP Folder

  8. Select the ISO file of the OS that you have copied before.

  9. Click Open.

Defining Resources for the Virtual Machine#

Next, the amount of memory, the number of CPUs and the size of the logical volume assigned to the virtual machine need to be defined.

  1. Click Forward.
  2. Define how much memory and how many CPUs to assign to this virtual machine.
  3. Select Forward.

    !Memory and CPU

  4. Click Select or create custom storage.

  5. Select Manage....

    !Custom Storage

  6. Click the + icon in the lower-left corner to add a new logical volume group (Add Pool).

    !Add Pool

  7. Enter a name for the storage pool type.

  8. Click Forward.
  9. Click Browse.
  10. Select Home on the left side.
  11. Click Open in the lower-right corner.

    !Storage Pool Type

  12. Select Finish.

  13. Select the new pool you have just created on the left side.
  14. Click the + symbol next to Volumes.

    !Create New Volume

  15. Enter the following information in the new window:

    Item Description
    Name Enter a name for the storage volume used by the virtual machine.
    Format Select raw from the drop-down menu.
    Max Capacity Choose the storage capacity of the storage volume.

    !Storage Volume

    Note

    The value in the screenshot is a placeholder. Please adjust the capacity according to the virtual machine you are generating.

  16. Click Finish.

Installing the Operating System#

Now the virtual machine will be initiated and the installation of the OS will be started.

  1. Select the image that was created in the Choose Storage Volume window.
  2. Click Choose Volume.

    !Choose Volume

  3. Click Forward to initialize the installation of the OS on the virtual machine.

    !Choose Volume

  4. Enter a name for the virtual machine.

  5. Click Finish. The virtual machine will be initiated and the installation of the OS will be started.

    !Initiate Installation

  6. Complete the installation of the OS. Please follow the steps provided by the vendor.

  7. After the installation is completed, right-click the virtual machine in the main Virtual Machine Manager window.
  8. Select Shut Down > Shut Down to shut down the VM.

    !Shut Down VM

Copying the IMG File to a Local Workstation#

With the generation of the VM, the IMG file of the VM has also been generated on the Nerve Device. Now you can copy the IMG file to your local workstation.

  1. Switch to the SSH client window.
  2. Enter sudo chmod o+r /home/admin/<yourvm>.img.

    Note

    The IMG file is called vm.img in this example. Please replace the placeholder name of the image in the command with the name of your IMG file.

  3. Open a file transfer client like WinSCP.

  4. Enter the IP address for host access of your Nerve Device under Host Name.
  5. Enter the credentials for host access to the Nerve Device below under User name and Password.

    !WinSCP Host Login

  6. Copy <yourvm>.img to your local workstation.

    !Copy IMG File

The virtual machine has now been generated on the Nerve Device and the IMG file of the virtual machine is now on your local workstation.

Note

Do not deploy the virtual machine from the process above to the same Nerve Device through the Management System. The virtual machine will be present twice. The deployment of the virtual machine from the process above should be done to different nodes.

Obtaining the XML file#

When the IMG was generated on the Nerve Device, an XML file for the IMG file was generated as well. It also has to be obtained manually.

  1. Switch to the SSH client window.
  2. Enter sudo chmod o+r /etc/libvirt/libxl/<yourvm>.xml.

    Note

    The XML file is called vm.xml in the screenshots of this example. Please replace the placeholder name of the XML file in the command with the name of your XML file.

  3. Open a file transfer client like WinSCP.

  4. Enter the IP address for host access of your Nerve Device under Host Name.
  5. Enter the credentials for host access to the Nerve Device below under User name and Password.

    !WinSCP Host Login

  6. Change the path to /etc/libvirt/libxl/ on the Nerve Device. You can find the etc directory in the root directory.

  7. Copy the <yourvm>.xml file to your local workstation.

    !Copy XML File

With this you have all the necessary files to provision a Virtual Machine workload for this virtual machine.

Provisioning a Virtual Machine Workload#

The following instructions cover the basic requirements for provisioning a Virtual Machine workload. Optional settings will be left out. Extended options are addressed in the last section of this chapter.
There are two further types of workloads that can be provisioned: CODESYS workloads and Docker workloads. The process for each workload is highlighted in its respective chapter.

  1. Log in to the Management System.
  2. Select Workloads in the left-hand menu.
  3. Select + in the upper-right corner.
  4. Select the virtual machine symbol (Virtual machine workload) in the middle of the three symbols that expanded.

    !Virtual Machine Workload

  5. In the new window, enter a name for your workload.

    Note

    Do not use codesys as a name for a Virtual Machine workload. Deploying a VM workload named codesys will interfere with the system.

  6. Select + next to Versions to add a new version of the workload.

    !New Version

  7. In the next window, enter the following information:

    Item description
    Name In the new window, enter a Name for the version of this workload.
    Release name Enter a Release name for the version of this workload.
    Virtual machine image Click the upward arrow symbol here to add the virtual machine image. The image has to be an IMG or RAW file.
    Virtual machine xml Click the upward arrow symbol here to add the virtual machine XML file.
    Number of virtual CPUs Enter the number of virtual CPUs you would like to use for this virtual machine.
    System memory to reserve Assign how much system memory you would like to reserve for this workload.

    !Version Settings

  8. Select Save in the lower-left corner.

The workload has now been provisioned and is ready to be deployed in the Deploy menu.

Note

While some settings are not required to provision a Virtual Machine workload in the Management System, you will have to fill out additional settings for the workload to perform as desired. Depending on the virtual machine you want to deploy, you may have to define new interfaces. Please keep this in mind and make sure to learn the details about your virtual machine.

Settings for Virtual Machine Workloads#

In the instructions above, all optional settings have been left out. Below is an overview of all the options with an explanation to each option.

Setting Description
VERSION SPECIFIC INFO Name
A name for your workload version. This could be a reminder for a certain configuration.
Example: "Unlimited" as a name for a virtual machine that has unlimited access to CPU resources.

Release name
A release name for your workload version. This could be a version number. Example: 1.0.1
VIRTUAL MACHINE FILES TO UPLOAD Two files need to be added here:

Virtual machine image
Upload the virtual machine image with the file extension RAW or IMG here. Do this by clicking the upward arrow symbol and selecting the file in the file browser. This is the first of the two files you generated in the process before.

Virtual machine xml
Upload the virtual machine XML file here. Do this by clicking the upward arrow symbol and selecting the file in the file browser. This is the second of the two files you generated in the process before.

Please be aware that the settings defined under Virtual machine specific info are going to overwrite parts of this XML file.
Virtual machine specific info Number of virtual CPUs
Define the number of virtual CPUs you would like to assign to this virtual machine. The CPUs are then reserved exclusively for the Virtual Machine workload and cannot be used by other processes. This setting is mandatory and the workload cannot be provisioned if it is left blank.

System memory to reserve
Assign how much system memory you would like to reserve for this workload.
The memory assigned here will be reserved exclusively for this Virtual Machine workload and will not be available for any other processes. This setting is mandatory and the workload cannot be provisioned if it is left blank.

Add new data disk
Click here to add a new data disk for the virtual machine. This data disk functions like an extra hard drive for data separate from the virtual machine. Enter a Data disk name and define the Disk size.

Add PCI passthrough
Click here to add a PCI passthrough to the virtual machine. Enter the PCI address of the interface you would like to pass through to be directly used by the virtual machine. Please note that the PCIe address is specific to a certain hardware. If you use this option, you should probably limit the installation targets to Nodes with this specific hardware by using selectors. See the labels chapter for more information on selectors.

Add new interface
Click here to add a new interface. You can choose between a bridged interface and a NAT-interface. For NAT interfaces you can define port mappings for TCP and UDP.

The names of the interfaces here have to match the names of the pre-defined network interfaces. Also, make sure to not use reserved ports for the workload. Please refer to the networking chapter for more detailed information.
SELECTOR Labels
If you have defined labels and assigned them to nodes, you can add them as selectors to the workload. When deploying a workload, the list of nodes will be filtered automatically to the specified label.
Mark as released Tick this checkbox if you want to mark this workload as released. Once marked as released, the workload cannot be edited anymore.