mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-23 09:47:44 +00:00
doc: update documentation to the latest TAP name (no acrn_ prefix)
Update the documentation, and associated scripts to reflect the fact that the TAP device used by 'acrn-dm' no longer use the "acrn_" prefix. Tracked-On: #2509 Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
This commit is contained in:
committed by
David Kinder
parent
a459ac97f8
commit
435b29af5f
@@ -316,20 +316,20 @@ Setting up AGLs
|
||||
|
||||
# create a unique tap device for each VM
|
||||
tap=tap2
|
||||
tap_exist=$(ip a | grep acrn_"$tap" | awk '{print $1}')
|
||||
tap_exist=$(ip a | grep "$tap" | awk '{print $1}')
|
||||
if [ "$tap_exist"x != "x" ]; then
|
||||
echo "tap device existed, reuse acrn_$tap"
|
||||
echo "tap device existed, reuse $tap"
|
||||
else
|
||||
ip tuntap add dev acrn_$tap mode tap
|
||||
ip tuntap add dev $tap mode tap
|
||||
fi
|
||||
|
||||
# if acrn-br0 exists, add VM's unique tap device under it
|
||||
br_exist=$(ip a | grep acrn-br0 | awk '{print $1}')
|
||||
if [ "$br_exist"x != "x" -a "$tap_exist"x = "x" ]; then
|
||||
echo "acrn-br0 bridge aleady exists, adding new tap device to it..."
|
||||
ip link set acrn_"$tap" master acrn-br0
|
||||
ip link set dev acrn_"$tap" down
|
||||
ip link set dev acrn_"$tap" up
|
||||
ip link set "$tap" master acrn-br0
|
||||
ip link set dev "$tap" down
|
||||
ip link set dev "$tap" up
|
||||
fi
|
||||
|
||||
#for memsize setting
|
||||
@@ -385,11 +385,11 @@ Setting up AGLs
|
||||
# create a unique tap device for each VM
|
||||
tap=tap1
|
||||
|
||||
tap_exist=$(ip a | grep acrn_"$tap" | awk '{print $1}')
|
||||
tap_exist=$(ip a | grep "$tap" | awk '{print $1}')
|
||||
if [ "$tap_exist"x != "x" ]; then
|
||||
echo "tap device existed, reuse acrn_$tap"
|
||||
echo "tap device existed, reuse $tap"
|
||||
else
|
||||
ip tuntap add dev acrn_$tap mode tap
|
||||
ip tuntap add dev $tap mode tap
|
||||
fi
|
||||
|
||||
|
||||
@@ -398,9 +398,9 @@ Setting up AGLs
|
||||
br_exist=$(ip a | grep acrn-br0 | awk '{print $1}')
|
||||
if [ "$br_exist"x != "x" -a "$tap_exist"x = "x" ]; then
|
||||
echo "acrn-br0 bridge aleady exists, adding new tap device to it..."
|
||||
ip link set acrn_"$tap" master acrn-br0
|
||||
ip link set dev acrn_"$tap" down
|
||||
ip link set dev acrn_"$tap" up
|
||||
ip link set "$tap" master acrn-br0
|
||||
ip link set dev "$tap" down
|
||||
ip link set dev "$tap" up
|
||||
fi
|
||||
|
||||
#for memsize setting
|
||||
|
@@ -44,20 +44,20 @@ mac_seed=${mac:9:8}-${vm_name}
|
||||
|
||||
# create a unique tap device for each VM
|
||||
tap=tap_$6
|
||||
tap_exist=$(ip a | grep acrn_"$tap" | awk '{print $1}')
|
||||
tap_exist=$(ip a | grep "$tap" | awk '{print $1}')
|
||||
if [ "$tap_exist"x != "x" ]; then
|
||||
echo "tap device existed, reuse acrn_$tap"
|
||||
echo "tap device existed, reuse $tap"
|
||||
else
|
||||
ip tuntap add dev acrn_$tap mode tap
|
||||
ip tuntap add dev $tap mode tap
|
||||
fi
|
||||
|
||||
# if acrn-br0 exists, add VM's unique tap device under it
|
||||
br_exist=$(ip a | grep acrn-br0 | awk '{print $1}')
|
||||
if [ "$br_exist"x != "x" -a "$tap_exist"x = "x" ]; then
|
||||
echo "acrn-br0 bridge aleady exists, adding new tap device to it..."
|
||||
ip link set acrn_"$tap" master acrn-br0
|
||||
ip link set dev acrn_"$tap" down
|
||||
ip link set dev acrn_"$tap" up
|
||||
ip link set "$tap" master acrn-br0
|
||||
ip link set dev "$tap" down
|
||||
ip link set dev "$tap" up
|
||||
fi
|
||||
|
||||
#check if the vm is running or not
|
||||
@@ -180,20 +180,20 @@ mac_seed=${mac:9:8}-${vm_name}
|
||||
|
||||
# create a unique tap device for each VM
|
||||
tap=tap_$6
|
||||
tap_exist=$(ip a | grep acrn_"$tap" | awk '{print $1}')
|
||||
tap_exist=$(ip a | grep "$tap" | awk '{print $1}')
|
||||
if [ "$tap_exist"x != "x" ]; then
|
||||
echo "tap device existed, reuse acrn_$tap"
|
||||
echo "tap device existed, reuse $tap"
|
||||
else
|
||||
ip tuntap add dev acrn_$tap mode tap
|
||||
ip tuntap add dev $tap mode tap
|
||||
fi
|
||||
|
||||
# if acrn-br0 exists, add VM's unique tap device under it
|
||||
br_exist=$(ip a | grep acrn-br0 | awk '{print $1}')
|
||||
if [ "$br_exist"x != "x" -a "$tap_exist"x = "x" ]; then
|
||||
echo "acrn-br0 bridge aleady exists, adding new tap device to it..."
|
||||
ip link set acrn_"$tap" master acrn-br0
|
||||
ip link set dev acrn_"$tap" down
|
||||
ip link set dev acrn_"$tap" up
|
||||
ip link set "$tap" master acrn-br0
|
||||
ip link set dev "$tap" down
|
||||
ip link set dev "$tap" up
|
||||
fi
|
||||
|
||||
#Use MMC name + serial for ADB serial no., same as native android
|
||||
|
@@ -14,7 +14,7 @@ ACRN Network Setup
|
||||
|
||||
The ACRN Service OS is based on `Clear Linux OS`_ and it uses `systemd-networkd`_
|
||||
to set up the Service OS networking. A few files are responsible for setting up the
|
||||
ACRN bridge (``acrn-br0``), the TAP device (``acrn_tap0``), and how these are all
|
||||
ACRN bridge (``acrn-br0``), the TAP device (``tap0``), and how these are all
|
||||
connected. Those files are installed in ``/usr/lib/systemd/network``
|
||||
on the target device and can also be found under ``tools/acrnbridge`` in the source code.
|
||||
|
||||
|
@@ -313,9 +313,7 @@ script example shows how to set this up (verified in Ubuntu 16.04 and 18.04 as t
|
||||
#setup bridge for uos network
|
||||
br=$(brctl show | grep acrn-br0)
|
||||
br=${br-:0:6}
|
||||
ip tuntap add dev acrn_tap0 mode tap
|
||||
|
||||
taps=$(ifconfig | grep acrn_ | awk '{print $1}')
|
||||
ip tuntap add dev tap0 mode tap
|
||||
|
||||
# if bridge not existed
|
||||
if [ "$br"x != "acrn-br0"x ]; then
|
||||
@@ -324,17 +322,11 @@ script example shows how to set this up (verified in Ubuntu 16.04 and 18.04 as t
|
||||
brctl addif acrn-br0 enp3s0
|
||||
ifconfig enp3s0 0
|
||||
dhclient acrn-br0
|
||||
# add existing tap devices under the bridge
|
||||
for tap in $taps; do
|
||||
ip tuntap add dev acrn_$tap mode tap
|
||||
brctl addif acrn-br0 $tap
|
||||
ip link set dev $tap down
|
||||
ip link set dev $tap up
|
||||
done
|
||||
fi
|
||||
|
||||
brctl addif acrn-br0 acrn_tap0
|
||||
ip link set dev acrn_tap0 up
|
||||
# Add TAP device to the bridge
|
||||
brctl addif acrn-br0 tap0
|
||||
ip link set dev tap0 up
|
||||
|
||||
.. note::
|
||||
The SOS network interface is called ``enp3s0`` in the script above. You will need
|
||||
|
Reference in New Issue
Block a user