User Tools

Site Tools


vb:run_webhmi_as_virtual_machine

Run Virtual Box WebHMI image

It is possible to run WebHMI as virtual machine. You can download VirtualBox image at Level2 system.

You must have VirtualBox installed on your computer to be able run this machine. VirtualBox Extension Pack is required as well if you want to use USB serial adapters (RS-232 or RS-485) inside VM.

Once image was downloaded, extract archive to desired destination and open WebHMI.vbox file with VirtualBox.

This will run VirtualBox and add WebHMI virtual machine into it.

You might want to adjust Processors amount on System→Processor tab settings.

Also you might need to select correct network adapter on Network→Adapter 1 tab.

Close settings window and click Start button.

Virtual machine will be started now.

In about 10-20 seconds it will complete boot process. You should see “WebHMI server started” message in console.

By default virtual machine is connected to your network via bridged network adapter. It uses static ip address 192.168.1.1. So web interface of WebHMI will be available at address 192.168.1.1 too. You can change this address later via Network Settings interface.

Open http://192.168.1.1 in your browser. You should now see WebHMI's user interface.

Default credentials are:

Login admin
Password admin

Congratulations! You was able to run WebHMI on your computer. Have fun with it.

Adding serial ports to the virtual image

Windows 10 host system

For Windows 10 host system, a USB filter should be set up in the image properties. Please refer to the following picture:

Be sure you enabled the USB converter for the virtual machine:

Select your serial device in the connection properties, as shown below:

Troubleshooting

I can't get access to web interface

Please make sure that you physical network adapter is connected to some network. If you are using Ethernet adapter, please make sure that it is connected to switch or router or other device so your operation system will detect link on it. If you can't connect it to any device please see below Creating Virtual Network section.

192.168.1.1 is already in use in my network

There are 2 possible workarounds for this situation:

  1. Use DHCP in your network to configure second network interface in virtual machine
  2. Create virtual network in VirtualBox

Use your DHCP

WebHMI's virtual machine has second network interface setup as DHCP client. By default it is disabled.

Go to virtual machine settings, select NetworkAdapter 2. Check Enable Network Adapter. Choose “Bridged Adapter” and select your network card.

Save settings and start virtual machine. Wait for boot to complete. For second interface it takes a few seconds longer to initialize and get IP address from DHCP server. Wait until you will see message “New network interface connected”. There will be a list of all available IP addresses (192.168.1.1 plus IP from DHCP).

In this example you can get access to WebHMI's UI via http://192.168.1.131/ URL. So now you should be able login into WebHMI and adjust Network Settings to match your existent network,

Create Virtual Network

In some cases you might want to create absolutely independent network for your virtual machine. These might be security or any other reasons. Here is VirtualBox's manual about virtual networking.

For example, if you have only only one Ethernet adapter which is not connected anywhere. In this case your operation system will to send any traffic to such interface and you will be unable to use WebHMI' UI with bridged adapter. In opposite, virtual network's cable is always connected. So there will be no such problem.

To create new virtual network go to FileHost Network Manager.

Click “Create” button. This will create new network. Here you can adjust network setting if needed.

Now go to WebHM's virtual machine settings, select NetworkAdapter 2. Check Enable Network Adapter. Choose “Host-only Adapter” and select your newly created virtual network (vboxnet0).

Save settings and start virtual machine. Wait for boot to complete. For second interface it takes a few seconds longer to initialize and get IP address from DHCP server. Wait until you will see message “New network interface connected”. There will be a list of all available IP addresses (192.168.1.1 plus IP from DHCP).

In this example you can get access to WebHMI's UI via http://192.168.56.105/ URL. So now you should be able login into WebHMI and adjust Network Settings to match your existent network, Or you can continue to use this virtual network.

vb/run_webhmi_as_virtual_machine.txt · Last modified: 2022/10/25 14:18 by emozolyak

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki