3. Part B - Hypervisor Target Configuration¶
The following shell scripts are available on the hypervisor to setup and establish a remote debug connection:
/hv/rtos-32/realtimedemo-debug.sh
starts debug monitor that awaits requests from a remote debugger on a Windows machine with installed EC-Win, Visual Studio, and RTE Visual Studio Plugin./hv/hvctl/brvnetset.sh
creates a virtual network bridge on Linux host to forward debuggerTCP/IP/UDP
packets fromLAN1
toRTOS-32 VM
. It is required to start this script if you need to perform remote debugging of aRTOS-32
app from another machine./hv/hvctl/brvnetclr.sh
deletes bridge, after theRTOS-32 VM
has been stopped./hv/hvctl/brvnetconfig.sh
contains the configuration values for the bridge. This file must be edit to adjust at least the$IP$
address.
Hint
The files are supplied in default state. At least /hv/hvctl/brvnetconfig.sh
needs adjustments.
3.1. Adjust brvnetconfig.sh
¶
First step: determine, which network adapter should be bridged. Search for <link>
entry and get the adapter name.
In this case it’s enp2s0
. The current $IP$
address of enp2s0
is inet 172.17.10.53
.
rtv@rtv-TEST:~$ ifconfig -a
enp2s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 172.17.10.53 netmask 255.255.0.0 broadcast 172.17.255.255
inet6 2a02:590:801:2c00:7170:3747:f835:a1cb prefixlen 64 scopeid 0x0<global>
inet6 fe80::fe6f:c5f8:c5cd:e3cd prefixlen 64 scopeid 0x20<link>
inet6 2a02:590:801:2c00:96b0:b8a:2c58:6c91 prefixlen 64 scopeid 0x0<global>
ether 90:1b:0e:18:c9:83 txqueuelen 1000 (Ethernet)
RX packets 116751 bytes 22127837 (22.1 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 74453 bytes 551331072 (551.3 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
enp3s5: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 74:ea:3a:81:4b:1d txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 201 bytes 14798 (14.7 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 201 bytes 14798 (14.7 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
vnet0: flags=99<UP,BROADCAST,NOTRAILERS,RUNNING> mtu 1500
inet 192.168.157.1 netmask 255.255.255.0 broadcast 192.168.157.255
ether 00:60:c8:00:00:00 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 59 bytes 10381 (10.3 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Next step: Adjust brvnetconfig.sh
with the detected values of ifconfig
:
Values:
netif="enp2s0"
vnetbrip="172.17.10.53"
#vnetbrmac=
comment in and adjust value only if there are collisions with ‘same’MAC-IDs
on the network.
#!/bin/bash
# Ethernet network interface to bridge with VM.
# ethernet interface to bridge with vnet
netif="enp2s0"
# Default gateway
# How to determine the default gateway:
# Use the command ip route ls
# default via 172.17.5.2 dev enp2s0 proto dhcp metric 100
# 172.17.0.0/16 dev enp2s0 proto kernel scope link src 172.17.10.4 metric 100
# The default gateway here is "172.17.5.2"
defaultgw="172.17.5.2" # default gateway
# Bridge settings
# The bridge replaces the former network device used by the hypervisor to connect to the network.
# See above results provided by the ifconfig -a command
# enp2s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
# inet 172.17.10.53 netmask 255.255.0.0 broadcast 172.17.255.255
# In this example, the bridge IP address is 172.17.10.53 and the network mask is 255.255.0.0
vnetbrip="172.17.10.53"
vnetbrnm="255.255.0.0"
# the values below are default values, typically not to be changed
vnetip="192.168.157.1"
vnetnm="255.255.255.0"
#vnetbrmac="54:52:00:ac:30:10 # by default, the MAC address of the physical network is used
vnet="vnet0"
vnetbr="vnetbr"