Hi ! You can but do not need to change PACKAGE_CLASSES away from package_rpm . The tool on the target in the rpm case is 'dnf' (like on fedora) . But to use the rpm or dpkg repo, you'll have to postprocess your build: - bitbake package-index - share the directory tmp/deploy/ with a webserver -- simple case: cd tmp/deploy ; python3 -m http.server -- on the target, configure /etc/zypp/repos manually or set in your conf/ local.conf before the build: PACKAGE_FEED_BASE_PATHS="rpm" PACKAGE_FEED_URIS="http://192.168.7.1:8000/" Likewise is the operation for dpkg/apt . Both have the same general steps in the end. Best, Jan-Simon Am Dienstag, 9. August 2022, 10:24:06 CEST schrieb KUZU KAZUKI (葛生 一樹): > Hello Alex, > > Sorry for the late reply. > > I was able to use the apt-get command in AGL by adding a few lines to > local.conf and building it. However, although some commands ("dpkg -l", > "apt-get remove", etc.) were available, it seemed necessary to set up a > repository to install the software. As the appropriate repository is > unknown, I tried listing the repository for ubuntu in > /etc/apt/sources.list, but this did not work. > > If the aim is not to make apt available, but to install specific software, > it can be included in the image by setting up some files at build time. As > an example, the following description could be added to enable python3. - > conf/local.conf: > IMAGE_INSTALL_append = " python3" > - conf/bblayers.conf: > BBLAYERS += " ${METADIR}/external/meta-openembedded/meta-python" > I am trying to build and will let you know the results later. > > For reference, the following lines are added to local.conf when using the > apt-get command. EXTRA_IMAGE_FEATURES_append = " package-management" > PACKAGE_CLASSES = "package_deb" > IMAGE_ROOTFS_EXTRA_SPACE = "2097152" > IMAGE_INSTALL_append = " apt" > > And I hope that your network settings are working well. > > > Best Regard, > Kuzu, > Panasonic Automotive Systems Co., Ltd. > > From: Alex Silva -X (alexsil - AEROTEK ULC at Cisco) <alexsil@xxxxxxxxx> > Sent: Tuesday, August 2, 2022 10:55 PM > To: KUZU KAZUKI (葛生 一樹) <kuzu.kazuki@xxxxxxxxxxxxxxxx>; > agl-dev-community@xxxxxxxxxxxxxxxxxxxxxxxxx; Zhao Jiancong(Jerry) (趙 健淙) > <chou.kensou@xxxxxxxxxxxxxxxx> Cc: SUDA SEIYA (須田 聖也) > <suda.seiya@xxxxxxxxxxxxxxxx> > Subject: Re: Question about AGL hosted on QEMU on an > Ubuntu VM (nested virtualization) > > Hello Kuzu! > > Thanks for the response! > > Well I guess AWS is indeed a place where IP resources are strictly > controlled, for it didn’t work indeed: > > HOST VM (IP: 172.31.44.235) > alexsil@ip-172-31-44-235:~$ cat /etc/qemu/bridge.conf > allow br-tmp > alexsil@ip-172-31-44-235:~$ sudo ip link add name br-tmp type bridge > alexsil@ip-172-31-44-235:~$ sudo ip link set dev br-tmp up > alexsil@ip-172-31-44-235:~$ sleep 1 > alexsil@ip-172-31-44-235:~$ sudo ip addr add 172.31.44.10/24 dev br-tmp > alexsil@ip-172-31-44-235:~$ ip link show br-tmp > 5: br-tmp: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state > UNKNOWN mode DEFAULT group default qlen 1000 link/ether 76:46:c1:5f:7a:9f > brd ff:ff:ff:ff:ff:ff > > alexsil@ip-172-31-44-235:~$ ifconfig > br-tmp: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 > inet 172.31.44.10 netmask 255.255.255.0 broadcast 0.0.0.0 > inet6 fe80::7446:c1ff:fe5f:7a9f prefixlen 64 scopeid 0x20<link> > ether fe:23:ea:49:52:80 txqueuelen 1000 (Ethernet) > RX packets 383 bytes 59217 (59.2 KB) > RX errors 0 dropped 0 overruns 0 frame 0 > TX packets 148 bytes 16279 (16.2 KB) > TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 > enp0s2 Link encap:Ethernet HWaddr 52:54:00:12:34:56 > inet addr:172.31.44.20 Bcast:172.31.44.255 Mask:255.255.255.0 > inet6 addr: fe80::5054:ff:fe12:3456/64 Scope:Link > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > RX packets:193 errors:0 dropped:0 overruns:0 frame:0 > TX packets:382 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:1000 > RX bytes:21338 (20.8 KiB) TX bytes:97881 (95.5 KiB) > .... > > alexsil@ip-172-31-44-235:~$ ping 172.31.44.20 > PING 172.31.44.20 (172.31.44.20) 56(84) bytes of data. > 64 bytes from 172.31.44.20: icmp_seq=1 ttl=64 time=3.53 ms > 64 bytes from 172.31.44.20: icmp_seq=2 ttl=64 time=0.721 ms > 64 bytes from 172.31.44.20: icmp_seq=3 ttl=64 time=0.582 ms > 64 bytes from 172.31.44.20: icmp_seq=4 ttl=64 time=0.542 ms > 64 bytes from 172.31.44.20: icmp_seq=5 ttl=64 time=0.527 ms > 64 bytes from 172.31.44.20: icmp_seq=6 ttl=64 time=1.50 ms > ^C > --- 172.31.44.20 ping statistics --- > 6 packets transmitted, 6 received, 0% packet loss, time 5083ms > rtt min/avg/max/mdev = 0.527/1.233/3.529/1.080 ms > alexsil@ip-172-31-44-235:~$ ssh root@172.31.44.20<mailto:root@172.31.44.20> > The authenticity of host '172.31.44.20 (172.31.44.20)' can't be established. > ECDSA key fingerprint is > SHA256:RnamotqKWh0Nys4Bo4CGwgYThaynqgiEiHtEij7HKYo. Are you sure you want > to continue connecting (yes/no/[fingerprint])? yes Warning: Permanently > added '172.31.44.20' (ECDSA) to the list of known hosts. Last login: Mon > Aug 1 15:47:41 2022 > root@qemuarm:~# pwd > /home/root > root@qemuarm:~# logout > Connection to 172.31.44.20 closed. > alexsil@ip-172-31-44-235:~$ arp > Address HWtype HWaddress Flags Mask > Iface 172.31.37.250 ether 06:05:1f:93:38:7d C > enp3s0 169.254.237.95 ether 52:54:00:12:34:56 C > br-tmp 172.31.32.1 ether 06:d8:14:d5:2e:3b C > enp3s0 172.31.44.20 ether 52:54:00:12:34:56 > C br-tmp alexsil@ip-172-31-44-235:~$ ssh > root@172.31.44.20<mailto:root@172.31.44.20> Last login: Mon Aug 1 15:54:41 > 2022 from 172.31.44.10 > ..... > root@qemuarm:~# logout > Connection to 172.31.44.20 closed. > alexsil@ip-172-31-44-235:~$ > > AGL > root@qemuarm:~# ifconfig enp0s2 172.31.44.20 netmask 255.255.255.0 > root@qemuarm:~# ip route add default via 172.31.44.10 dev enp0s2 > root@qemuarm:~# route -n > Kernel IP routing table > Destination Gateway Genmask Flags Metric Ref Use > Iface 0.0.0.0 10.0.2.2 0.0.0.0 UG 0 0 > 0 enp0s1 10.0.2.0 0.0.0.0 255.255.255.0 U 0 0 > 0 enp0s1 10.0.2.2 0.0.0.0 255.255.255.255 UH 0 0 > 0 enp0s1 172.31.44.0 0.0.0.0 255.255.255.0 U 0 > 0 0 enp0s2 root@qemuarm:~# ifconfig > ..... > enp0s2 Link encap:Ethernet HWaddr 52:54:00:12:34:56 > inet addr:172.31.44.20 Bcast:172.31.44.255 Mask:255.255.255.0 > inet6 addr: fe80::5054:ff:fe12:3456/64 Scope:Link > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > RX packets:193 errors:0 dropped:0 overruns:0 frame:0 > TX packets:382 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:1000 > RX bytes:21338 (20.8 KiB) TX bytes:97881 (95.5 KiB) > ..... > root@qemuarm:~# ping 172.31.44.235 -c 5. (HOST VM) > PING 172.31.44.235 (172.31.44.235): 56 data bytes > 64 bytes from 172.31.44.235: seq=0 ttl=64 time=51.479 ms > 64 bytes from 172.31.44.235: seq=1 ttl=64 time=3.499 ms > 64 bytes from 172.31.44.235: seq=2 ttl=64 time=1.260 ms > 64 bytes from 172.31.44.235: seq=3 ttl=64 time=1.255 ms > 64 bytes from 172.31.44.235: seq=4 ttl=64 time=1.930 ms > > --- 172.31.44.235 ping statistics --- > 5 packets transmitted, 5 packets received, 0% packet loss > round-trip min/avg/max = 1.255/11.884/51.479 ms > root@qemuarm:~# ping 172.31.37.250 -c 5. (TEST VM) > PING 172.31.37.250 (172.31.37.250): 56 data bytes > 64 bytes from 172.31.37.250: seq=0 ttl=255 time=44.282 ms > 64 bytes from 172.31.37.250: seq=1 ttl=255 time=4.060 ms > 64 bytes from 172.31.37.250: seq=2 ttl=255 time=8.343 ms > 64 bytes from 172.31.37.250: seq=3 ttl=255 time=1.289 ms > 64 bytes from 172.31.37.250: seq=4 ttl=255 time=2.526 ms > > --- 172.31.37.250 ping statistics --- > 5 packets transmitted, 5 packets received, 0% packet loss > round-trip min/avg/max = 1.289/12.100/44.282 ms > > TEST (any other VM that is not the host) VM (IP: 172.31.37.250) > alexsil@ip-172-31-37-250:~$ ifconfig > ens5: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 9001 > inet 172.31.37.250 netmask 255.255.240.0 broadcast 172.31.47.255 > inet6 fe80::405:1fff:fe93:387d prefixlen 64 scopeid 0x20<link> > inet6 2600:1f14:b6d:e2aa:638b:8c7c:712b:d1b6 prefixlen 128 scopeid > 0x0<global> ether 06:05:1f:93:38:7d txqueuelen 1000 (Ethernet) > RX packets 222464 bytes 111756458 (111.7 MB) > RX errors 0 dropped 0 overruns 0 frame 0 > TX packets 124531 bytes 12376502 (12.3 MB) > TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 > > alexsil@ip-172-31-37-250:~$ sudo arp -s 172.31.44.20 52:54:00:12:34:56. > (tried to add the route towards the AGL including its IP and MAC address) > [sudo] password for alexsil: > alexsil@ip-172-31-37-250:~$ arp > Address HWtype HWaddress Flags Mask > Iface 172.31.32.1 ether 06:d8:14:d5:2e:3b C > ens5 172.31.44.20 ether 52:54:00:12:34:56 CM > ens5 172.31.44.235 ether 06:c8:03:45:33:bd C > ens5 > > alexsil@ip-172-31-37-250:~$ ping 172.31.44.20 > PING 172.31.44.20 (172.31.44.20) 56(84) bytes of data. > ^C > --- 172.31.44.20 ping statistics --- > 105 packets transmitted, 0 received, 100% packet loss, time 106501ms > > (different terminal while this ran, showing the test VM never gets a > response indeed to its ping, this command on host VM shows no traffic from > test VM ever reaching it if we specify the AGL IP) > alexsil@ip-172-31-37-250:~$ sudo tcpdump -i ens5 > ~/tcpdump_nic.txt > tcpdump: verbose output suppressed, use -v[v]... for full protocol decode > listening on ens5, link-type EN10MB (Ethernet), snapshot length 262144 > bytes ^C153 packets captured > 156 packets received by filter > 0 packets dropped by kernel > alexsil@ip-172-31-37-250:~$ cat ~/tcpdump_nic.txt | grep "ICMP" > 16:08:26.932072 IP 172.31.37.250 > 172.31.44.20: ICMP echo request, id 37, > seq 90, length 64 16:08:27.955983 IP 172.31.37.250 > 172.31.44.20: ICMP > echo request, id 37, seq 91, length 64 16:08:28.979955 IP 172.31.37.250 > > 172.31.44.20: ICMP echo request, id 37, seq 92, length 64 16:08:29.611686 > IP6 fe80::4d8:14ff:fed5:2e3b > ip6-allnodes: ICMP6, router advertisement, > length 56 16:08:30.003958 IP 172.31.37.250 > 172.31.44.20: ICMP echo > request, id 37, seq 93, length 64 16:08:31.027941 IP 172.31.37.250 > > 172.31.44.20: ICMP echo request, id 37, seq 94, length 64 > > I’m trying IPTABLES now to see if I can somehow route (on host VM) any > incoming traffic (from test VM) to AGL. Gonna try it today. > > Sincerely, > > Alex Silva > > From: KUZU KAZUKI (葛生 一樹) > <kuzu.kazuki@xxxxxxxxxxxxxxxx<mailto:kuzu.kazuki@xxxxxxxxxxxxxxxx>> Date: > Wednesday, July 27, 2022 at 4:13 AM > To: Alex Silva -T (alexsil - AEROTEK ULC at Cisco) > <alexsil@xxxxxxxxx<mailto:alexsil@xxxxxxxxx>>, > agl-dev-community@xxxxxxxxxxxxxxxxxxxxxxxxx<mailto:agl-dev-community@lists. > automotivelinux.org> > <agl-dev-community@xxxxxxxxxxxxxxxxxxxxxxxxx<mailto:agl-dev-community@lists > .automotivelinux.org>>, Zhao Jiancong(Jerry) (趙 健淙) > <chou.kensou@xxxxxxxxxxxxxxxx<mailto:chou.kensou@xxxxxxxxxxxxxxxx>> Cc: > SUDA SEIYA (須田 聖也) > <suda.seiya@xxxxxxxxxxxxxxxx<mailto:suda.seiya@xxxxxxxxxxxxxxxx>> Subject: > RE: Question about AGL hosted on QEMU on an Ubuntu VM > (nested virtualization) Hello Alex, > > Thank you. > I could enjoy my holiday! > > >> 1. How can we reach the AGL IP from a different VM (not the hosting > >> Ubuntu VM)? > The OS that does not host AGL Guest does not belong to the same network as > bridge. Therefore, if you want to communicate to AGL Guest in this > situation, you will need to forward network packets, etc. I am sorry, but I > am not familiar with networking and can only think that perhaps iptable > etc. could be used. > > Another way is to configure bridge to belong to the same network as Ubuntu > Host. For example, if the Ubuntu Host is 192.168.0.10/24, set bridge to > 192.168.0.20 and AGL Guest to 192.168.0.30. I have been able to ping AGL > Guest from an OS that does not host AGL Guest (e.g. 192.168.11) in this way > in my private home. However, it failed in places where IP resources are > strictly controlled. > >> 2. How can we install software packages/dependencies (python, pip, > >> pytest, etc) on AGL? > AGL is built using the yocto system. > In order to use package managers like apt/yum, it is a good idea to > incorporate them when building AGL. This story requires more knowledge > about yocto than AGL. > You may also need to prepare recipes for some packages. > I have never integrated apt into AGL, so I am sorry, I don't know the > details. I will try a few things. > > Hope this helps you. > > > Best Regard, > Kuzu, > Panasonic Automotive Systems Co., Ltd. > > From: Alex Silva -T (alexsil - AEROTEK ULC at Cisco) > <alexsil@xxxxxxxxx<mailto:alexsil@xxxxxxxxx>> Sent: Tuesday, July 26, 2022 > 7:49 AM > To: > agl-dev-community@xxxxxxxxxxxxxxxxxxxxxxxxx<mailto:agl-dev-community@lists. > automotivelinux.org>; KUZU KAZUKI (葛生 一樹) > <kuzu.kazuki@xxxxxxxxxxxxxxxx<mailto:kuzu.kazuki@xxxxxxxxxxxxxxxx>>; Zhao > Jiancong(Jerry) (趙 健淙) > <chou.kensou@xxxxxxxxxxxxxxxx<mailto:chou.kensou@xxxxxxxxxxxxxxxx>> Cc: > SUDA SEIYA (須田 聖也) > <suda.seiya@xxxxxxxxxxxxxxxx<mailto:suda.seiya@xxxxxxxxxxxxxxxx>> Subject: > Re: Question about AGL hosted on QEMU on an Ubuntu VM > (nested virtualization) > > Sorry Kuzu, forgot the second question, just added bellow. > > And again, appreciate all the responses you’ve given me already! > > Sincerely, > > Alex Silva > > From: > agl-dev-community@xxxxxxxxxxxxxxxxxxxxxxxxx<mailto:agl-dev-community@lists. > automotivelinux.org> > <agl-dev-community@xxxxxxxxxxxxxxxxxxxxxxxxx<mailto:agl-dev-community@lists > .automotivelinux.org>> on behalf of Alex Silva -T (alexsil - AEROTEK ULC at > Cisco) via lists.automotivelinux.org > <alexsil=cisco.com@xxxxxxxxxxxxxxxxxxxxxxxxx<mailto:alexsil=cisco.com@lists > .automotivelinux.org>> Date: Monday, July 25, 2022 at 9:43 AM > To: KUZU KAZUKI (葛生 一樹) > <kuzu.kazuki@xxxxxxxxxxxxxxxx<mailto:kuzu.kazuki@xxxxxxxxxxxxxxxx>>, > agl-dev-community@xxxxxxxxxxxxxxxxxxxxxxxxx<mailto:agl-dev-community@lists. > automotivelinux.org> > <agl-dev-community@xxxxxxxxxxxxxxxxxxxxxxxxx<mailto:agl-dev-community@lists > .automotivelinux.org>>, Zhao Jiancong(Jerry) (趙 健淙) > <chou.kensou@xxxxxxxxxxxxxxxx<mailto:chou.kensou@xxxxxxxxxxxxxxxx>> Cc: > SUDA SEIYA (須田 聖也) > <suda.seiya@xxxxxxxxxxxxxxxx<mailto:suda.seiya@xxxxxxxxxxxxxxxx>> Subject: > Re: Question about AGL hosted on QEMU on an Ubuntu VM > (nested virtualization) Hello Kuzu! > > Hope you had a good time last week (holiday). > > Have two more questions: > > 1. How can we reach the AGL IP from a different VM (not the hosting > Ubuntu VM)? * I figured adding a route (AGL IP: 192.168.1.20, hosting VM > IP: 172.31.44.235) would do the trick, but so far it has not worked: > alexsil@ip-172-31-37-250:~$ ifconfig > ens5: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 9001 > inet 172.31.37.250 netmask 255.255.240.0 broadcast 172.31.47.255 > inet6 fe80::405:1fff:fe93:387d prefixlen 64 scopeid 0x20<link> > inet6 2600:1f14:b6d:e2aa:638b:8c7c:712b:d1b6 prefixlen 128 scopeid > 0x0<global> ether 06:05:1f:93:38:7d txqueuelen 1000 (Ethernet) > RX packets 29903 bytes 29463121 (29.4 MB) > RX errors 0 dropped 0 overruns 0 frame 0 > TX packets 8105 bytes 869243 (869.2 KB) > 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 38 bytes 3818 (3.8 KB) > RX errors 0 dropped 0 overruns 0 frame 0 > TX packets 38 bytes 3818 (3.8 KB) > TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 > > alexsil@ip-172-31-37-250:~$ sudo ip route add 192.168.1.20/32 via > 172.31.44.235 dev ens5 alexsil@ip-172-31-37-250:~$ ip r > default via 172.31.32.1 dev ens5 proto dhcp src 172.31.37.250 metric 100 > 172.31.32.0/20 dev ens5 proto kernel scope link src 172.31.37.250 metric 100 > 172.31.32.1 dev ens5 proto dhcp scope link src 172.31.37.250 metric 100 > 172.31.43.76 dev ens5 proto dhcp scope link src 172.31.37.250 metric 100 > 192.168.1.20 via 172.31.44.235 dev ens5 > alexsil@ip-172-31-37-250:~$ route -n > Kernel IP routing table > Destination Gateway Genmask Flags Metric Ref Use > Iface 0.0.0.0 172.31.32.1 0.0.0.0 UG 100 0 > 0 ens5 172.31.32.0 0.0.0.0 255.255.240.0 U 100 0 > 0 ens5 172.31.32.1 0.0.0.0 255.255.255.255 UH 100 0 > 0 ens5 172.31.43.76 0.0.0.0 255.255.255.255 UH 100 0 > 0 ens5 192.168.1.20 172.31.44.235 255.255.255.255 UGH 0 0 > 0 ens5 alexsil@ip-172-31-37-250:~$ ping 192.168.1.20 > PING 192.168.1.20 (192.168.1.20) 56(84) bytes of data. > ^C > --- 192.168.1.20 ping statistics --- > 5 packets transmitted, 0 received, 100% packet loss, time 4078ms > > alexsil@ip-172-31-37-250:~$ ping 172.31.44.235 > PING 172.31.44.235 (172.31.44.235) 56(84) bytes of data. > 64 bytes from 172.31.44.235: icmp_seq=1 ttl=64 time=0.170 ms > 64 bytes from 172.31.44.235: icmp_seq=2 ttl=64 time=0.161 ms > 64 bytes from 172.31.44.235: icmp_seq=3 ttl=64 time=0.137 ms > 64 bytes from 172.31.44.235: icmp_seq=4 ttl=64 time=0.134 ms > ^C > --- 172.31.44.235 ping statistics --- > 4 packets transmitted, 4 received, 0% packet loss, time 3059ms > rtt min/avg/max/mdev = 0.134/0.150/0.170/0.015 ms > alexsil@ip-172-31-37-250:~$ > > > 1. How can we install software packages/dependencies (python, pip, > pytest, etc) on AGL? I can’t seem to do it with apt install (ubuntu), dnf > (RHL), rpm (even if I find an rpm file, it fails due to dependencies) or > yum (for installing it I need to use rpm but again it has dependencies thus > back at square one). > > root@qemuarm:/home/alexsil/agl-demo/qa_pack# apt install python3-pip > > -sh: apt: command not found > > root@qemuarm:/home/alexsil/agl-demo/qa_pack# dnf --version > > 4.11.1 > > Installed: dnf-0:4.11.1-r0.0.armv7vet2hf_neon_vfpv4 at Wed Jul 6 02:23:41 > 2022 > > Built : AGL https://lists.automotivelinux.org/g/agl-dev-community at > Mon Jun 29 03:06:40 2020 > > > > Installed: rpm-1:4.17.0-r0.0.armv7vet2hf_neon_vfpv4 at Wed Jul 6 02:22:15 > 2022 > > Built : AGL https://lists.automotivelinux.org/g/agl-dev-community at > Mon Jun 29 03:06:40 2020 > > root@qemuarm:/home/alexsil/agl-demo/qa_pack# dnf install python3-pip > > Error: There are no enabled repositories in "/etc/yum.repos.d", > "/etc/yum/repos.d", "/etc/distro.repos.d". > > root@qemuarm:/home/alexsil/agl-demo/qa_pack# yum repolist all > > -sh: yum: command not found > > > > root@qemuarm:/home/alexsil/Downloads# wget > https://vault.centos.org/centos/8/AppStream/x86_64/os/Packages/python3-pyte > st-3.4.2-11.el8.noarch.rpm > > Connecting to vault.centos.org (65.8.158.19:443) > > saving to 'python3-pytest-3.4.2-11.el8.noarch.rpm' > > python3-pytest-3.4.2 100% > |************************************************************************** > ********| 1360k 0:00:00 ETA > > 'python3-pytest-3.4.2-11.el8.noarch.rpm' saved > > root@qemuarm:/home/alexsil/Downloads# ls -lat > > total 1372 > > -rw-r--r-- 1 root alexsil 1393528 Jul 25 16:27 > python3-pytest-3.4.2-11.el8.noarch.rpm > > drwxr-sr-x 2 root alexsil 4096 Jul 25 16:27 . > > drwxr-sr-x 5 alexsil alexsil 4096 Jul 25 16:06 .. > > root@qemuarm:/home/alexsil/Downloads# rpm -i > python3-pytest-3.4.2-11.el8.noarch.rpm > > warning: python3-pytest-3.4.2-11.el8.noarch.rpm: Header V3 RSA/SHA256 > Signature, key ID 8483c65d: NOKEY > > error: Failed dependencies: > > /usr/libexec/platform-python is needed by > python3-pytest-3.4.2-11.el8.noarch > > platform-python-setuptools is needed by > python3-pytest-3.4.2-11.el8.noarch > > python(abi) = 3.6 is needed by python3-pytest-3.4.2-11.el8.noarch > > python3-attrs is needed by python3-pytest-3.4.2-11.el8.noarch > > python3-pluggy is needed by python3-pytest-3.4.2-11.el8.noarch > > python3-py >= 1.4.29 is needed by python3-pytest-3.4.2-11.el8.noarch > > I tried using rpm with dependencies but it requires yum, which AGL doesn’t > have and which I can’t install for it fails due to dependencies. > https://www.golinuxcloud.com/download-rpm-package-and-all-dependencies-cent > os/ > > Sincerely, > > Alex Silva > > From: KUZU KAZUKI (葛生 一樹) > <kuzu.kazuki@xxxxxxxxxxxxxxxx<mailto:kuzu.kazuki@xxxxxxxxxxxxxxxx>> Date: > Friday, July 15, 2022 at 1:30 AM > To: Alex Silva -T (alexsil - AEROTEK ULC at Cisco) > <alexsil@xxxxxxxxx<mailto:alexsil@xxxxxxxxx>>, > agl-dev-community@xxxxxxxxxxxxxxxxxxxxxxxxx<mailto:agl-dev-community@lists. > automotivelinux.org> > <agl-dev-community@xxxxxxxxxxxxxxxxxxxxxxxxx<mailto:agl-dev-community@lists > .automotivelinux.org>>, Zhao Jiancong(Jerry) (趙 健淙) > <chou.kensou@xxxxxxxxxxxxxxxx<mailto:chou.kensou@xxxxxxxxxxxxxxxx>> Cc: > SUDA SEIYA (須田 聖也) > <suda.seiya@xxxxxxxxxxxxxxxx<mailto:suda.seiya@xxxxxxxxxxxxxxxx>> Subject: > RE: Question about AGL hosted on QEMU on an Ubuntu VM > (nested virtualization) Hello Alex, > > In my environment, I was able to create a snapshot of the AWS instance even > after starting and stopping the AGL VM. It is possible that there is > something else causing that. > > The reason why AGL can connect to the intranet is because it is using the > user mode network. The ifconfig results you have run within the AGL show > that it is using both user mode network and bridge as I described last > time. I believe enp0s1 is the IF used for user mode network and is used for > communication to the outside of the AGL. > > By the way, I will be on holiday for a week next week. > I won't be back until 25 July, so I am sorry I won't be able to respond to > you during this time. > > > Best Regard, > Kuzu, > Panasonic Automotive Systems Co., Ltd. > > > -----Original Message----- > From: Alex Silva -T (alexsil - AEROTEK ULC at Cisco) > <alexsil@xxxxxxxxx<mailto:alexsil@xxxxxxxxx>> Sent: Thursday, July 14, 2022 > 7:40 AM > To: > agl-dev-community@xxxxxxxxxxxxxxxxxxxxxxxxx<mailto:agl-dev-community@lists. > automotivelinux.org>; Zhao Jiancong(Jerry) (趙 健淙) > <chou.kensou@xxxxxxxxxxxxxxxx<mailto:chou.kensou@xxxxxxxxxxxxxxxx>>; KUZU > KAZUKI (葛生 一樹) > <kuzu.kazuki@xxxxxxxxxxxxxxxx<mailto:kuzu.kazuki@xxxxxxxxxxxxxxxx>> Cc: > SUDA SEIYA (須田 聖也) > <suda.seiya@xxxxxxxxxxxxxxxx<mailto:suda.seiya@xxxxxxxxxxxxxxxx>> Subject: > Re: Question about AGL hosted on QEMU on an Ubuntu VM > (nested virtualization) > > Hello Kuzu, > > > > After some retesting, I realized that with the CURRENT setup (your original > instructions), I can: > > 1. Ping between AGL <-> Ubuntu > > a. Ping from AGL to Ubuntu, ping from Ubuntu to AGL. > > 2. Transfer files between them (scp > root@192.168.1.20:/home/root/testfile.txt<mailto:root@192.168.1.20:/home/ro > ot/testfile.txt> <mailto:root@192.168.1.20:/home/root/testfile.txt> ) > > a. Testfile.txt being created on AGL > b. scp being run from hosting Ubuntu > > 3. Run nslookup from either Ubuntu and AGL > > a. Meaning AGL can indeed connect to the intranet just fine > > 4. Reboot the Ubuntu VM and not lose connectivity > > a. I’ve tried (and failed) to create a snapshot image of my > Ubuntu instance (keep getting “Client.VolumeNotAvailable: Amazon EC2 is > taking too long to create the snapshots. You might've reached the limit on > the number of concurrent snapshots you can create. Wait a few minutes, and > then retry your request” which I’m not sure if it’s due to this being bare > metal instance), which causes the VM to reboot. This has happened like 4 > times already, yet each time the VM comes back on and I can reconnect just > fine, so seems this setup will not cause us to lose connectivity upon > rebooting. b. I do not of course keep AGL powered on the entire time: > I bring it up, do my testing, and power it off right away. > > > > Here, let me show you: > > > > UBUNTU: > > alexsil@ip-172-31-44-235:~$ sudo ip link add name br-tmp type bridge > > alexsil@ip-172-31-44-235:~$ sudo ip link set dev br-tmp up > > alexsil@ip-172-31-44-235:~$ sleep 1 > > alexsil@ip-172-31-44-235:~$ sudo ip addr add 192.168.1.10/24 dev br-tmp > > alexsil@ip-172-31-44-235:~$ sudo ip link show br-tmp > > 5: br-tmp: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state > UNKNOWN mode DEFAULT group default qlen 1000 > > link/ether de:14:45:ea:0c:7b brd ff:ff:ff:ff:ff:ff > > alexsil@ip-172-31-44-235:~$ ifconfig > > br-tmp: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 > > inet 192.168.1.10 netmask 255.255.255.0 broadcast 0.0.0.0 > > inet6 fe80::dc14:45ff:feea:c7b prefixlen 64 scopeid 0x20<link> > > ether de:14:45:ea:0c:7b txqueuelen 1000 (Ethernet) > > RX packets 0 bytes 0 (0.0 B) > > RX errors 0 dropped 0 overruns 0 frame 0 > > TX packets 42 bytes 5446 (5.4 KB) > > TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 > > > > enp3s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 9001 > > inet 172.31.44.235 netmask 255.255.240.0 broadcast 172.31.47.255 > > inet6 fe80::4c8:3ff:fe45:33bd prefixlen 64 scopeid 0x20<link> > > inet6 2600:1f14:b6d:e2aa:add1:9dfb:d2e4:ad99 prefixlen 128 scopeid > 0x0<global> > > ether 06:c8:03:45:33:bd txqueuelen 1000 (Ethernet) > > RX packets 93214 bytes 120353007 (120.3 MB) > > RX errors 0 dropped 0 overruns 0 frame 0 > > TX packets 20155 bytes 1769132 (1.7 MB) > > TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 > > alexsil@ip-172-31-44-235:~$ ping 192.168.1.20 > > PING 192.168.1.20 (192.168.1.20) 56(84) bytes of data. > > 64 bytes from 192.168.1.20: icmp_seq=1 ttl=64 time=7.73 ms > > 64 bytes from 192.168.1.20: icmp_seq=2 ttl=64 time=2.08 ms > > 64 bytes from 192.168.1.20: icmp_seq=3 ttl=64 time=0.524 ms > > ^C > > --- 192.168.1.20 ping statistics --- > > 3 packets transmitted, 3 received, 0% packet loss, time 2003ms > > rtt min/avg/max/mdev = 0.524/3.446/7.730/3.095 ms > > alexsil@ip-172-31-44-235:~$ scp > root@192.168.1.20:/home/root/testfile.txt<mailto:root@192.168.1.20:/home/ro > ot/testfile.txt> . > > The authenticity of host '192.168.1.20 (192.168.1.20)' can't be established. > > ECDSA key fingerprint is SHA256:RnamotqKWh0Nys4Bo4CGwgYThaynqgiEiHtEij7HKYo. > > Are you sure you want to continue connecting (yes/no/[fingerprint])? yes > > Warning: Permanently added '192.168.1.20' (ECDSA) to the list of known > hosts. > > testfile.txt > 100% 20 0.3KB/s 00:00 > > alexsil@ip-172-31-44-235:~$ cat testfile.txt > > testing scp command > > > > AGL: > > "testfile.txt" [New] 1L, 20B written > > root@qemuarm:~# pwd > > /home/root > > root@qemuarm:~# ls -lat > > total 24 > > drwx------ 2 root root 4096 Jul 13 21:58 . > > -rw------- 1 root root 1754 Jul 13 21:58 .viminfo > > -rw-r--r-- 1 root root 523 Jul 13 21:58 .testfile.txt.un~ > > -rw-r--r-- 1 root root 20 Jul 13 21:58 testfile.txt > > -rw------- 1 root root 684 Jul 12 21:33 .bash_history > > drwxr-xr-x 5 root root 4096 Jul 6 23:02 .. > > root@qemuarm:~# ifconfig > > enp0s1 Link encap:Ethernet HWaddr 52:54:00:12:34:58 > > inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0 > > inet6 addr: fe80::5054:ff:fe12:3458/64 Scope:Link > > inet6 addr: fec0::5054:ff:fe12:3458/64 Scope:Site > > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > > RX packets:40 errors:0 dropped:0 overruns:0 frame:0 > > TX packets:100 errors:0 dropped:0 overruns:0 carrier:0 > > collisions:0 txqueuelen:1000 > > RX bytes:3872 (3.7 KiB) TX bytes:11271 (11.0 KiB) > > > > enp0s2 Link encap:Ethernet HWaddr 52:54:00:12:34:56 > > inet addr:169.254.161.191 Bcast:169.254.255.255 Mask:255.255.0.0 > > inet6 addr: fe80::5054:ff:fe12:3456/64 Scope:Link > > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > > RX packets:34 errors:0 dropped:0 overruns:0 frame:0 > > TX packets:71 errors:0 dropped:0 overruns:0 carrier:0 > > collisions:0 txqueuelen:1000 > > RX bytes:3913 (3.8 KiB) TX bytes:19550 (19.0 KiB) > > root@qemuarm:~# ifconfig enp0s2 192.168.1.20 netmask 255.255.255.0 > > root@qemuarm:~# ip route add default via 192.168.1.10 dev enp0s2 > > RTNETLINK answers: File exists > > root@qemuarm:~# route -n > > Kernel IP routing table > > Destination Gateway Genmask Flags Metric Ref Use > Iface > > 0.0.0.0 10.0.2.2 0.0.0.0 UG 0 0 0 > enp0s1 > > 10.0.2.0 0.0.0.0 255.255.255.0 U 0 0 0 > enp0s1 > > 10.0.2.2 0.0.0.0 255.255.255.255 UH 0 0 0 > enp0s1 > > 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 > enp0s2 > > root@qemuarm:~# nslookup youtube.com > > Server: ::1 > > Address 1: ::1 localhost > > > > Name: youtube.com > > Address 1: 172.217.14.238 sea30s02-in-f14.1e100.net > > Address 2: 2607:f8b0:400a:806::200e sea09s28-in-x0e.1e100.net > > root@qemuarm:~# cat testfile.txt > > testing scp command > > > > From that, does anything look off/wrong? > > > > I ask because in theory I thought I would not be able to connect to intranet > from AGL (no complaints really, just saying if it’s working due to > something I’m missing I would like to know what that is). > > > > Sincerely, > > > > Alex Silva > > > > From: > agl-dev-community@xxxxxxxxxxxxxxxxxxxxxxxxx<mailto:agl-dev-community@lists. > automotivelinux.org> > <agl-dev-community@xxxxxxxxxxxxxxxxxxxxxxxxx<mailto:agl-dev-community@lists > .automotivelinux.org>> on behalf of KUZU KAZUKI (葛生 一樹) > <kuzu.kazuki@xxxxxxxxxxxxxxxx<mailto:kuzu.kazuki@xxxxxxxxxxxxxxxx>> Date: > Sunday, July 10, 2022 at 11:33 PM > To: Alex Silva -T (alexsil - AEROTEK ULC at Cisco) > <alexsil@xxxxxxxxx<mailto:alexsil@xxxxxxxxx>>, Zhao Jiancong(Jerry) (趙 健淙) > <chou.kensou@xxxxxxxxxxxxxxxx<mailto:chou.kensou@xxxxxxxxxxxxxxxx>>, > agl-dev-community@xxxxxxxxxxxxxxxxxxxxxxxxx<mailto:agl-dev-community@lists. > automotivelinux.org> > <agl-dev-community@xxxxxxxxxxxxxxxxxxxxxxxxx<mailto:agl-dev-community@lists > .automotivelinux.org>> Cc: SUDA SEIYA (須田 聖也) > <suda.seiya@xxxxxxxxxxxxxxxx<mailto:suda.seiya@xxxxxxxxxxxxxxxx>> Subject: > Re: Question about AGL hosted on QEMU on an Ubuntu VM > (nested virtualization) > > Hello Alex, > > > > I am glad to hear that you were able to ping between ubuntu and agl. > > > > For additional questions, please see below. > > >> 1. Does this happen to you (losing network connectivity on host Ubuntu)? > > I did not experience any network connectivity loss on ubuntu in my local > environment, but it could happen in some envieonment. > > If you know how to solve this, you could script the solution and use a > command such as "nohup" to complete the setup even if the ssh connection is > broken. > >> 2. Is there any way to do this (the network bridge) but by allowing AGL > >> to also connect to Internet WAN? > There are two posible methods that come to mind quickly. > > Method 1: Set the bridge's network to be the same as the host's network. > > a. Set the bridge's IP and Ubuntu's network interface (eno1) to the > same value (althouht set to a different value for host only network). > > b. Set the AGL network interface (enp0s3) to the IP on the ubuntu > network. (In my environment this was already assigned at VM startup). > > This allows AGL to communicate with the internet while maintaining > communication with Ubuntu. > > However, I have succeeded with this method locally, but not on AWS. > > Method 2: Configure two interfaces at QEMU start-up: user mode network > and host only mode > > a. Set the network options at QEMU start-up as follows. > > -device virtio-net-pci,netdev=net-user,mac=52:54:00:12:10:20 -netdev > user,id=net-user -netdev bridge,br=br-tmp,id=net-bridge -device > virtio-net-pci,netdev=net-bridge,mac=52:54:00:12:71:32 > > b. bridge side (interface with no inet configured. Probably enp0s4) > IP. > > Then you can use the bridge side for communication from Ubuntu to AGL > and the NAT side for communication from AGL to the Internet. > >> 3. Do you think this setup would work if the host Ubuntu machine is > >> itself a VM? > First of all, when launching a VM on a VM environment, a nested VM must > be supported. > > And, it is not clear to me whether the previous network settings will > work well when using a nested VM. > > As far as Ubuntu instances on AWS bare metal servers rather than nested > VMs are concerned, I was able to build a host only network when I tried it > in my environment. > > However, after a few days, the connection to the Ubuntu instance was > lost and restarting the instance did not fix it, so the image had to be > rolled back. > > The cause is unknown and could be due to other tasks, but there is also > possibility that the network configuration is the cause. > > I am not sure if this is correct as I am not familiar with networks, but > my understanding is that manual configuration using the ip command etc. is > reset by turning the PC back on (or in the case of AWS, by stopping the > instance and starting it again). > > Also, I am aware that the settings using nmcli etc. will continue even > if the PC is restarted, so I am not using them at the moment. > > > > Best Regard, > > Kuzu, > > > > Panasonic Automotive Systems Co., Ltd. > > > > > > From: > agl-dev-community@xxxxxxxxxxxxxxxxxxxxxxxxx<mailto:agl-dev-community@lists. > automotivelinux.org> > <agl-dev-community@xxxxxxxxxxxxxxxxxxxxxxxxx<mailto:agl-dev-community@lists > .automotivelinux.org>> On Behalf Of Alex Silva -T (alexsil - AEROTEK ULC at > Cisco) via lists.automotivelinux.org Sent: Saturday, July 9, 2022 1:11 AM > To: KUZU KAZUKI (葛生 一樹) > <kuzu.kazuki@xxxxxxxxxxxxxxxx<mailto:kuzu.kazuki@xxxxxxxxxxxxxxxx>>; > agl-dev-community@xxxxxxxxxxxxxxxxxxxxxxxxx<mailto:agl-dev-community@lists. > automotivelinux.org>; Zhao Jiancong(Jerry) (趙 健淙) > <chou.kensou@xxxxxxxxxxxxxxxx<mailto:chou.kensou@xxxxxxxxxxxxxxxx>> Cc: > SUDA SEIYA (須田 聖也) > <suda.seiya@xxxxxxxxxxxxxxxx<mailto:suda.seiya@xxxxxxxxxxxxxxxx>>; > agl-dev-community@xxxxxxxxxxxxxxxxxxxxxxxxx<mailto:agl-dev-community@lists. > automotivelinux.org> Subject: Re: Question about AGL > hosted on QEMU on an Ubuntu VM (nested virtualization) > > > > Hello Kuzu, > > > > I was able to get it to work just like you! > > * Removed the ip=dhcp as instructed > * My mistake was using the same IP on AGL and on the bridge (somehow > didn’t notice that you used 192.168.1.10 for bridge and 192.168.1.20 for > AGL, I was using the same one, no wonder it was not working) * Just > like you indicate, I can ping from AGL->Ubuntu and from Ubuntu->AGL, but I > cannot connect to Internet WAN from AGL once the bridge is set up (before > the bridge I could). > > > > Can’t thank you enough for the patience and help! > > > > Now, if I may push my luck here: > > 1. I did notice that I lose network connectivity on the host (Ubuntu) > shortly after setting up the bridge (right around the time I’m adding the > route to AGL), and to get it back I must do this on Ubuntu: > > a. sudo ip link set dev br-tmp down > b. sudo service network-manager restart > c. After that I have network connectivity restored and can > bring up the connection and connect (from Ubuntu) to both AGL and Internet > WAN. Does this happen to you (losing network connectivity on host Ubuntu)? > > 2. Is there any way to do this (the network bridge) but by allowing AGL > to also connect to Internet WAN? 3. Do you think this setup would work > if the host Ubuntu machine is itself a VM? > > a. I fear that the loss of network connectivity detailed above > would indeed cause me to lose my access to the VM forever, since unlike my > local Ubuntu which I can keep working on without network connectivity, I > cannot do the same on an AWS hosted VM, and if I indeed need to bring down > the bridge and restart network manager, a reboot from the AWS console may > not restore connectivity (that would reset network manager, but not bring > down the bridge connection) > > > > Sincerely, > > > > Alex Silva > > > > From: KUZU KAZUKI (葛生 一樹) <kuzu.kazuki@xxxxxxxxxxxxxxxx > <mailto:kuzu.kazuki@xxxxxxxxxxxxxxxx> > Date: Wednesday, July 6, 2022 at > 9:21 PM > To: Alex Silva -T (alexsil - AEROTEK ULC at Cisco) <alexsil@xxxxxxxxx > <mailto:alexsil@xxxxxxxxx> >, > agl-dev-community@xxxxxxxxxxxxxxxxxxxxxxxxx<mailto:agl-dev-community@lists. > automotivelinux.org> <mailto:agl-dev-community@xxxxxxxxxxxxxxxxxxxxxxxxx> > <agl-dev-community@xxxxxxxxxxxxxxxxxxxxxxxxx > <mailto:agl-dev-community@xxxxxxxxxxxxxxxxxxxxxxxxx> >, Zhao > Jiancong(Jerry) (趙 健淙) <chou.kensou@xxxxxxxxxxxxxxxx > <mailto:chou.kensou@xxxxxxxxxxxxxxxx> > Cc: SUDA SEIYA (須田 聖也) > <suda.seiya@xxxxxxxxxxxxxxxx <mailto:suda.seiya@xxxxxxxxxxxxxxxx> >, > agl-dev-community@xxxxxxxxxxxxxxxxxxxxxxxxx<mailto:agl-dev-community@lists. > automotivelinux.org> <mailto:agl-dev-community@xxxxxxxxxxxxxxxxxxxxxxxxx> > <agl-dev-community@xxxxxxxxxxxxxxxxxxxxxxxxx > <mailto:agl-dev-community@xxxxxxxxxxxxxxxxxxxxxxxxx> > Subject: RE: > Question about AGL hosted on QEMU on an Ubuntu VM > (nested virtualization) > > Hello Alex, > > > > From the results of the run you sent us, it appears that the IP of the > bridge and the IP of the AGL guest are the same. > > In this case, the ubuntu host tries to communicate with the bridge instead > of the AGL guest. > > For this reason, please change the IP of the AGL guest and try to > communicate with it. > > > > For your information, the results of my run are shown below. > > ========================================= > > 1. Start AGL using bridge. > > ----------------------------------------- > > $ ip addr show eno1 > > 2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP > group default qlen 1000 > > link/ether f8:32:e4:6e:69:a1 brd ff:ff:ff:ff:ff:ff > > inet 10.68.11.80/24 brd 10.68.11.255 scope global dynamic noprefixroute > eno1 > > valid_lft 86090sec preferred_lft 86090sec > > inet6 fe80::35ab:30bd:d7a4:d5b4/64 scope link noprefixroute > > valid_lft forever preferred_lft forever > > $ brctl show br-tmp > > bridge name bridge id STP enabled interfaces > > br-tmp can't get info No such device > > $ > > $ sudo ip link add name br-tmp type bridge > > $ sudo ip link set dev br-tmp up > > $ sleep 1 > > $ ip addr show br-tmp > > 14: br-tmp: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state > UNKNOWN group default qlen 1000 > > link/ether 8e:5e:00:e6:5f:61 brd ff:ff:ff:ff:ff:ff > > inet 192.168.1.10/24 scope global br-tmp > > valid_lft forever preferred_lft forever > > inet6 fe80::8c5e:ff:fee6:5f61/64 scope link > > valid_lft forever preferred_lft forever > > $ > > $ cat /etc/qemu/bridge.conf > > allow br-tmp > > $ sudo qemu-system-x86_64 -enable-kvm -cpu kvm64 -cpu > qemu64,+ssse3,+sse4.1,+sse4.2,+popcnt -m 2048 -machine q35 -netdev > bridge,br=br-tmp,id=net0 -device virtio-net-pci,netdev=net0 -show-cursor > -usb -usbdevice tablet -device virtio-rng-pci -vga virtio -vnc :0 -soundhw > hda -serial mon:vc -serial mon:stdio -serial null -kernel bzImage -append > 'root=/dev/vda rw console=tty0 mem=2048M oprofile.timer=1 > console=ttyS0,115200n8 verbose fstab=no' -drive > file=agl-demo-platform-crosssdk-qemux86-64.ext4,if=virtio,format=raw > -snapshot > > qemu-system-x86_64: -usbdevice tablet: '-usbdevice' is deprecated, please > use '-device usb-...' instead > > qemu-system-x86_64: warning: host doesn't support requested feature: > CPUID.80000001H:ECX.svm [bit 2] > > Home directory not accessible: Permission denied > > pulseaudio: pa_context_connect() failed > > pulseaudio: Reason: Connection refused > > pulseaudio: Failed to initialize PA contextaudio: Could not init `pa' audio > driver > > Home directory not accessible: Permission denied > > > > Automotive Grade Linux > 13.90.0+snapshot-8c489602f218bcf21de0d3c9f8cf620ea5f06430 qemux86-64 ttyS1 > > > > qemux86-64 login: root > > root@qemux86-64:~# ifconfig > > enp0s3 Link encap:Ethernet HWaddr 52:54:00:12:91:69 > > inet6 addr: fe80::5054:ff:fe12:9169/64 Scope:Link > > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > > RX packets:2 errors:0 dropped:0 overruns:0 frame:0 > > TX packets:20 errors:0 dropped:0 overruns:0 carrier:0 > > collisions:0 txqueuelen:1000 > > RX bytes:388 (388.0 B) TX bytes:3500 (3.4 KiB) > > > > lo Link encap:Local Loopback > > inet addr:127.0.0.1 Mask:255.0.0.0 > > inet6 addr: ::1/128 Scope:Host > > UP LOOPBACK RUNNING MTU:65536 Metric:1 > > RX packets:10 errors:0 dropped:0 overruns:0 frame:0 > > TX packets:10 errors:0 dropped:0 overruns:0 carrier:0 > > collisions:0 txqueuelen:1000 > > RX bytes:1594 (1.5 KiB) TX bytes:1594 (1.5 KiB) > > > > root@qemux86-64:~# ifconfig enp0s3 192.168.1.20 netmask 255.255.255.0 > > root@qemux86-64:~# > > ========================================= > > 2. Ping from ubuntu host (using another terminal) > > ----------------------------------------- > > $ ping 192.168.1.20 -c 3 > > PING 192.168.1.20 (192.168.1.20) 56(84) bytes of data. > > 64 bytes from 192.168.1.20: icmp_seq=1 ttl=64 time=0.288 ms > > 64 bytes from 192.168.1.20: icmp_seq=2 ttl=64 time=0.288 ms > > 64 bytes from 192.168.1.20: icmp_seq=3 ttl=64 time=0.260 ms > > > > --- 192.168.1.20 ping statistics --- > > 3 packets transmitted, 3 received, 0% packet loss, time 2036ms > > rtt min/avg/max/mdev = 0.260/0.278/0.288/0.023 ms > > ========================================= > > > > One change to the command is to remove the option “ip=dhcp”. > > If “ip=dhcp” is present, the console cannot be operated until the timeout is > reached. > > (The console can still be operated with the option if you wait long enough > for the timeout). > > > > The environment I have created is called a 'host only network'. > > This means that AGL can communicate with the host, but not directly with the > Internet on the WAN side. > > > > > > I hope the above helps you. > > > > Best Regard, > > Kuzu, > > > > Panasonic Automotive Systems Co., Ltd. > > > > From: Alex Silva -T (alexsil - AEROTEK ULC at Cisco) <alexsil@xxxxxxxxx > <mailto:alexsil@xxxxxxxxx> > Sent: Thursday, July 7, 2022 12:17 AM > To: > agl-dev-community@xxxxxxxxxxxxxxxxxxxxxxxxx<mailto:agl-dev-community@lists. > automotivelinux.org> <mailto:agl-dev-community@xxxxxxxxxxxxxxxxxxxxxxxxx> ; > KUZU KAZUKI (葛生 一樹) <kuzu.kazuki@xxxxxxxxxxxxxxxx > <mailto:kuzu.kazuki@xxxxxxxxxxxxxxxx> >; Zhao Jiancong(Jerry) (趙 健淙) > <chou.kensou@xxxxxxxxxxxxxxxx <mailto:chou.kensou@xxxxxxxxxxxxxxxx> > Cc: > SUDA SEIYA (須田 聖也) <suda.seiya@xxxxxxxxxxxxxxxx > <mailto:suda.seiya@xxxxxxxxxxxxxxxx> >; > agl-dev-community@xxxxxxxxxxxxxxxxxxxxxxxxx<mailto:agl-dev-community@lists. > automotivelinux.org> <mailto:agl-dev-community@xxxxxxxxxxxxxxxxxxxxxxxxx> > Subject: Re: Question about AGL hosted on QEMU on an > Ubuntu VM (nested virtualization) > > > > Hey Kuzu, > > > > Failed to add: I tried moving files between AGL and Ubuntu as you mentioned, > had “connection refused”, so definitely it’s not pinging/connecting to AGL, > really hope the error is in how I’m running qemu… > > > > Without bridge: > > qemu-system-x86_64 -device virtio-net-pci,netdev=net0,mac=52:54:00:12:35:02 > -netdev user,id=net0,hostfwd=tcp::2222-:22 -drive > file=agl-demo-platform-crosssdk-qemux86-64.ext4,if=virtio,format=raw > -show-cursor -usb -usbdevice tablet -device virtio-rng-pci -vga virtio -vnc > :0 -soundhw hda -machine q35 -cpu kvm64 -cpu > qemu64,+ssse3,+sse4.1,+sse4.2,+popcnt -enable-kvm -m 2048 -serial mon:vc > -serial mon:stdio -serial null -kernel bzImage -append 'root=/dev/vda rw > console=tty0 mem=2048M ip=dhcp oprofile.timer=1 console=ttyS0,115200n8 > verbose fstab=no' > > > > With bridge (had to use sudo or bridge would fail, and would no longer > accept hostfwd argument): > > sudo qemu-system-x86_64 -device > virtio-net-pci,netdev=net0,mac=52:54:00:12:35:02 -netdev > bridge,br=agl-bridge,id=net0 -drive > file=agl-demo-platform-crosssdk-qemux86-64.ext4,if=virtio,format=raw > -show-cursor -usb -usbdevice tablet -device virtio-rng-pci -vga virtio -vnc > :0 -soundhw hda -machine q35 -cpu kvm64 -cpu > qemu64,+ssse3,+sse4.1,+sse4.2,+popcnt -enable-kvm -m 2048 -serial mon:vc > -serial mon:stdio -serial null -kernel bzImage -append 'root=/dev/vda rw > console=tty0 mem=2048M ip=dhcp oprofile.timer=1 console=ttyS0,115200n8 > verbose fstab=no' > > > > > > Sincerely, > > > > Alex Silva > > > > From: > agl-dev-community@xxxxxxxxxxxxxxxxxxxxxxxxx<mailto:agl-dev-community@lists. > automotivelinux.org> <mailto:agl-dev-community@xxxxxxxxxxxxxxxxxxxxxxxxx> > <agl-dev-community@xxxxxxxxxxxxxxxxxxxxxxxxx > <mailto:agl-dev-community@xxxxxxxxxxxxxxxxxxxxxxxxx> > on behalf of Alex > Silva -T (alexsil - AEROTEK ULC at Cisco) via lists.automotivelinux.org > <alexsil=cisco.com@xxxxxxxxxxxxxxxxxxxxxxxxx > <mailto:alexsil=cisco.com@xxxxxxxxxxxxxxxxxxxxxxxxx> > Date: Tuesday, July > 5, 2022 at 11:36 AM > To: KUZU KAZUKI (葛生 一樹) <kuzu.kazuki@xxxxxxxxxxxxxxxx > <mailto:kuzu.kazuki@xxxxxxxxxxxxxxxx> >, Zhao Jiancong(Jerry) (趙 健淙) > <chou.kensou@xxxxxxxxxxxxxxxx <mailto:chou.kensou@xxxxxxxxxxxxxxxx> > Cc: > SUDA SEIYA (須田 聖也) <suda.seiya@xxxxxxxxxxxxxxxx > <mailto:suda.seiya@xxxxxxxxxxxxxxxx> >, > agl-dev-community@xxxxxxxxxxxxxxxxxxxxxxxxx<mailto:agl-dev-community@lists. > automotivelinux.org> <mailto:agl-dev-community@xxxxxxxxxxxxxxxxxxxxxxxxx> > <agl-dev-community@xxxxxxxxxxxxxxxxxxxxxxxxx > <mailto:agl-dev-community@xxxxxxxxxxxxxxxxxxxxxxxxx> > Subject: Re: > Question about AGL hosted on QEMU on an Ubuntu VM > (nested virtualization) > > Hello Kuzu, > > > > No worries, you had indeed told m about how to start QEMU, I’m thinking > maybe that’s part of the problem. > > > > Look, I tried your instructions again on local Ubuntu (not VM), and this is > what I got: > > > > 1. I was able to set up the bridge (specifying IP 192.168.1.10) without > losing connectivity AFTER removing the previous one (virbr0) I had: > > ~/agl-demo$ sudo ip link add name agl-bridge type bridge > > ~/agl-demo$ sudo ip link set dev agl-bridge up > > ~/agl-demo$ sleep 1 > > ~/agl-demo$ sudo ip addr add 192.168.1.10/24 dev agl-bridge > > ~/agl-demo$ sudo ip link show > > 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode > DEFAULT group default qlen 1000 > > link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 > > 2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state > UP mode DEFAULT group default qlen 1000 > > link/ether fc:aa:14:52:c0:db brd ff:ff:ff:ff:ff:ff > > 3: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state > DOWN mode DEFAULT group default qlen 1000 > > link/ether 52:54:00:81:81:a7 brd ff:ff:ff:ff:ff:ff > > 4: virbr0-nic: <BROADCAST,MULTICAST> mtu 1500 qdisc fq_codel master virbr0 > state DOWN mode DEFAULT group default qlen 1000 > > link/ether 52:54:00:81:81:a7 brd ff:ff:ff:ff:ff:ff > > 25: agl-bridge: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue > state UNKNOWN mode DEFAULT group default qlen 1000 > > link/ether d2:e6:4f:7a:79:4d brd ff:ff:ff:ff:ff:ff > > ~/agl-demo$ echo "allow agl-bridge" >> /etc/qemu/bridge.conf > > ~/agl-demo$ cat /etc/qemu/bridge.conf > > allow agl-bridge > > ~/agl-demo$ ifconfig > > agl-bridge: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 > > inet 192.168.1.10 netmask 255.255.255.0 broadcast 0.0.0.0 > > inet6 fe80::d8c1:75ff:fe85:d4aa prefixlen 64 scopeid 0x20<link> > > ether da:c1:75:85:d4:aa txqueuelen 1000 (Ethernet) > > RX packets 0 bytes 0 (0.0 B) > > RX errors 0 dropped 0 overruns 0 frame 0 > > TX packets 100 bytes 10188 (10.1 KB) > > TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 > > > > enp1s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 > > inet 192.168.1.64 netmask 255.255.255.0 broadcast 192.168.1.255 > > inet6 fe80::b15e:618d:6a9d:3abb prefixlen 64 scopeid 0x20<link> > > ether fc:aa:14:52:c0:db txqueuelen 1000 (Ethernet) > > RX packets 2626410 bytes 3352132863 (3.3 GB) > > RX errors 0 dropped 0 overruns 0 frame 0 > > TX packets 817090 bytes 149491929 (149.4 MB) > > 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 91312 bytes 8251360 (8.2 MB) > > RX errors 0 dropped 0 overruns 0 frame 0 > > TX packets 91312 bytes 8251360 (8.2 MB) > > TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 > > > > virbr0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 > > ether 52:54:00:81:81:a7 txqueuelen 1000 (Ethernet) > > RX packets 1153 bytes 382373 (382.3 KB) > > RX errors 0 dropped 0 overruns 0 frame 0 > > TX packets 371 bytes 57329 (57.3 KB) > > TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 > > ~/agl-demo$ sudo nmcli conn show --active > > NAME UUID TYPE DEVICE > > Wired connection 1 6d8112e2-024f-3370-8ec5-4ea54021f108 ethernet enp1s0 > > agl-bridge 9b71d812-798d-4015-9b97-77a3fe8bdb4a bridge > agl-bridge > > virbr0 67904cdb-d46a-4cf6-b6c8-a69407b7d83a bridge virbr0 > > ~/agl-demo$ sudo ip link set dev virbr0 down > > ~/agl-demo$ sudo brctl delbr virbr0 > > ~/agl-demo$ sudo nmcli conn show --active > > NAME UUID TYPE DEVICE > > Wired connection 1 6d8112e2-024f-3370-8ec5-4ea54021f108 ethernet enp1s0 > > agl-bridge 9b71d812-798d-4015-9b97-77a3fe8bdb4a bridge > agl-bridge > > > > > > 2. I can ping the IP address of the bridge just fine, but this happens > with QEMU powered on or off as well (and even with QEMU launched without > specifying the bridge), so how can I know I’m actually reaching AGL? > > > > sudo qemu-system-x86_64 -device > virtio-net-pci,netdev=net0,mac=52:54:00:12:35:02 -netdev > bridge,br=agl-bridge,id=net0 -drive > file=agl-demo-platform-crosssdk-qemux86-64.ext4,if=virtio,format=raw > -show-cursor -usb -usbdevice tablet -device virtio-rng-pci -vga virtio -vnc > :0 -soundhw hda -machine q35 -cpu kvm64 -cpu > qemu64,+ssse3,+sse4.1,+sse4.2,+popcnt -enable-kvm -m 2048 -serial mon:vc > -serial mon:stdio -serial null -kernel bzImage -append 'root=/dev/vda rw > console=tty0 mem=2048M ip=dhcp oprofile.timer=1 console=ttyS0,115200n8 > verbose fstab=no' > > … > > qemux86-64 login: root > > Last login: Tue Jul 5 16:31:48 UTC 2022 on ttyS1 > > root@qemux86-64:~# ifconfig > > enp0s3 Link encap:Ethernet HWaddr 52:54:00:12:35:02 > > inet addr:169.254.52.77 Bcast:169.254.255.255 Mask:255.255.0.0 > > inet6 addr: fe80::5054:ff:fe12:3502/64 Scope:Link > > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > > RX packets:177 errors:0 dropped:0 overruns:0 frame:0 > > TX packets:85 errors:0 dropped:0 overruns:0 carrier:0 > > collisions:0 txqueuelen:1000 > > RX bytes:7951 (7.7 KiB) TX bytes:20676 (20.1 KiB) > > > > lo Link encap:Local Loopback > > inet addr:127.0.0.1 Mask:255.0.0.0 > > inet6 addr: ::1/128 Scope:Host > > UP LOOPBACK RUNNING MTU:65536 Metric:1 > > RX packets:63 errors:0 dropped:0 overruns:0 frame:0 > > TX packets:63 errors:0 dropped:0 overruns:0 carrier:0 > > collisions:0 txqueuelen:1000 > > RX bytes:4218 (4.1 KiB) TX bytes:4218 (4.1 KiB) > > > > root@qemux86-64:~# ifconfig enp0s3 192.168.1.10 netmask 255.255.255.0 > > root@qemux86-64:~# ip route add default via 192.168.1.10 dev enp0s3 > > root@qemux86-64:~# route -n > > Kernel IP routing table > > Destination Gateway Genmask Flags Metric Ref Use > Iface > > 0.0.0.0 192.168.1.10 0.0.0.0 UG 0 0 0 > enp0s3 > > 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 > enp0s3 > > root@qemux86-64:~# ifconfig > > enp0s3 Link encap:Ethernet HWaddr 52:54:00:12:35:02 > > inet addr:192.168.1.10 Bcast:192.168.1.255 Mask:255.255.255.0 > > inet6 addr: fe80::5054:ff:fe12:3502/64 Scope:Link > > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > > RX packets:225 errors:0 dropped:0 overruns:0 frame:0 > > TX packets:105 errors:0 dropped:0 overruns:0 carrier:0 > > collisions:0 txqueuelen:1000 > > RX bytes:9967 (9.7 KiB) TX bytes:28296 (27.6 KiB) > > > > lo Link encap:Local Loopback > > inet addr:127.0.0.1 Mask:255.0.0.0 > > inet6 addr: ::1/128 Scope:Host > > UP LOOPBACK RUNNING MTU:65536 Metric:1 > > RX packets:143 errors:0 dropped:0 overruns:0 frame:0 > > TX packets:143 errors:0 dropped:0 overruns:0 carrier:0 > > collisions:0 txqueuelen:1000 > > RX bytes:8138 (7.9 KiB) TX bytes:8138 (7.9 KiB) > > > > second terminal (where I set up the bridge) > > ~/agl-demo$ ping 192.168.1.10 > > PING 192.168.1.10 (192.168.1.10) 56(84) bytes of data. > > 64 bytes from 192.168.1.10: icmp_seq=1 ttl=64 time=0.060 ms > > 64 bytes from 192.168.1.10: icmp_seq=2 ttl=64 time=0.064 ms > > 64 bytes from 192.168.1.10: icmp_seq=3 ttl=64 time=0.061 ms > > 64 bytes from 192.168.1.10: icmp_seq=4 ttl=64 time=0.062 ms > > ^C > > --- 192.168.1.10 ping statistics --- > > 4 packets transmitted, 4 received, 0% packet loss, time 3053ms > > rtt min/avg/max/mdev = 0.060/0.061/0.064/0.001 ms > > > > 3. With QEMU specifying the bridge, I cannot ping either Ubuntu or > reach the internet from AGL > > > > root@qemux86-64:~# cat /etc/resolv.conf > > # Generated by Connection Manager > > nameserver 10.0.2.3 > > nameserver ::1 > > nameserver 127.0.0.1 > > root@qemux86-64:~# nslookup youtube.com > > Server: 10.0.2.3 > > Address 1: 10.0.2.3 > > > > nslookup: can't resolve 'youtube.com' > > root@qemux86-64:~# ping 192.168.1.64 > > PING 192.168.1.64 (192.168.1.64): 56 data bytes > > ^C > > --- 192.168.1.64 ping statistics --- > > 27 packets transmitted, 0 packets received, 100% packet loss > > > > 4. Without the bridge, I can ping Ubuntu (192.168.1.64) and reach the > internet from AGL > > > > qemu-system-x86_64 -device virtio-net-pci,netdev=net0,mac=52:54:00:12:35:02 > -netdev user,id=net0,hostfwd=tcp::2222-:22 -drive > file=agl-demo-platform-crosssdk-qemux86-64.ext4,if=virtio,format=raw > -show-cursor -usb -usbdevice tablet -device virtio-rng-pci -vga virtio -vnc > :0 -soundhw hda -machine q35 -cpu kvm64 -cpu > qemu64,+ssse3,+sse4.1,+sse4.2,+popcnt -enable-kvm -m 2048 -serial mon:vc > -serial mon:stdio -serial null -kernel bzImage -append 'root=/dev/vda rw > console=tty0 mem=2048M ip=dhcp oprofile.timer=1 console=ttyS0,115200n8 > verbose fstab=no' > > … > > root@qemux86-64:~# cat /etc/resolv.conf > > # Generated by Connection Manager > > nameserver 10.0.2.3 > > nameserver ::1 > > nameserver 127.0.0.1 > > root@qemux86-64:~# nslookup youtube.com > > Server: 10.0.2.3 > > Address 1: 10.0.2.3 > > > > Name: youtube.com > > Address 1: 142.251.46.238 sfo03s27-in-f14.1e100.net > > Address 2: 2607:f8b0:4005:802::200e sfo07s26-in-x0e.1e100.net > > root@qemux86-64:~# ping 192.168.1.64 > > PING 192.168.1.64 (192.168.1.64): 56 data bytes > > 64 bytes from 192.168.1.64: seq=0 ttl=255 time=0.274 ms > > 64 bytes from 192.168.1.64: seq=1 ttl=255 time=0.602 ms > > ^C > > --- 192.168.1.64 ping statistics --- > > 2 packets transmitted, 2 packets received, 0% packet loss > > round-trip min/avg/max = 0.274/0.438/0.602 ms > > > > > > Could it be that I’m somehow specifying the parameters incorrectly? > > > > Without bridge: > > qemu-system-x86_64 -device virtio-net-pci,netdev=net0,mac=52:54:00:12:35:02 > -netdev user,id=net0,hostfwd=tcp::2222-:22 -drive > file=agl-demo-platform-crosssdk-qemux86-64.ext4,if=virtio,format=raw > -show-cursor -usb -usbdevice tablet -device virtio-rng-pci -vga virtio -vnc > :0 -soundhw hda -machine q35 -cpu kvm64 -cpu > qemu64,+ssse3,+sse4.1,+sse4.2,+popcnt -enable-kvm -m 2048 -serial mon:vc > -serial mon:stdio -serial null -kernel bzImage -append 'root=/dev/vda rw > console=tty0 mem=2048M ip=dhcp oprofile.timer=1 console=ttyS0,115200n8 > verbose fstab=no' > > > > With bridge (had to use sudo or bridge would fail, and would no longer > accept hostfwd argument): > > sudo qemu-system-x86_64 -device > virtio-net-pci,netdev=net0,mac=52:54:00:12:35:02 -netdev > bridge,br=agl-bridge,id=net0 -drive > file=agl-demo-platform-crosssdk-qemux86-64.ext4,if=virtio,format=raw > -show-cursor -usb -usbdevice tablet -device virtio-rng-pci -vga virtio -vnc > :0 -soundhw hda -machine q35 -cpu kvm64 -cpu > qemu64,+ssse3,+sse4.1,+sse4.2,+popcnt -enable-kvm -m 2048 -serial mon:vc > -serial mon:stdio -serial null -kernel bzImage -append 'root=/dev/vda rw > console=tty0 mem=2048M ip=dhcp oprofile.timer=1 console=ttyS0,115200n8 > verbose fstab=no' > > > > I do appreciate your help, really do (and yeah, I’ll try to attend > tomorrow’s meeting). > > > > Sincerely, > > > > Alex Silva > > > > From: KUZU KAZUKI (葛生 一樹) <kuzu.kazuki@xxxxxxxxxxxxxxxx > <mailto:kuzu.kazuki@xxxxxxxxxxxxxxxx> > Date: Monday, July 4, 2022 at 9:59 > PM > To: Alex Silva -T (alexsil - AEROTEK ULC at Cisco) <alexsil@xxxxxxxxx > <mailto:alexsil@xxxxxxxxx> >, Zhao Jiancong(Jerry) (趙 健淙) > <chou.kensou@xxxxxxxxxxxxxxxx <mailto:chou.kensou@xxxxxxxxxxxxxxxx> > Cc: > SUDA SEIYA (須田 聖也) <suda.seiya@xxxxxxxxxxxxxxxx > <mailto:suda.seiya@xxxxxxxxxxxxxxxx> >, > agl-dev-community@xxxxxxxxxxxxxxxxxxxxxxxxx<mailto:agl-dev-community@lists. > automotivelinux.org> <mailto:agl-dev-community@xxxxxxxxxxxxxxxxxxxxxxxxx> > <agl-dev-community@xxxxxxxxxxxxxxxxxxxxxxxxx > <mailto:agl-dev-community@xxxxxxxxxxxxxxxxxxxxxxxxx> > Subject: RE: > Question about AGL hosted on QEMU on an Ubuntu VM (nested virtualization) > > Hello Alex, > > > > I am so sorry to forgot to tell you to change the startup options for QEMU. > > > > In order to use the created bridge with QEMU, I configured the network > options as follows: > > -netdev bridge,br=br-tmp,id=net0 -device virtio-net-pci,netdev=net0 > > After creating br-tmp according to the previously sent instructions, please > change the QEMU network settings to the above and try again. > > This should also work on a local workstation, so it may be a good idea to > try it out before the cloud. > > > > What about discussing directly in this week AGL Virtualization Expert Group > meeting with following details. > > - Location: Zoom > (https://zoom.us/j/855006400?pwd=OER2bGVaVm91VjhKYm83Rk1hZTg2dz09 > <https://zoom.us/j/855006400?pwd=OER2bGVaVm91VjhKYm83Rk1hZTg2dz09> ) > > - Time: 2022/7/6 12:00 (UTC) > > > > Looking forward to seeing you in the Virt-EG! > > > > Best Regard, > > Kuzu, > > Panasonic Automotive Systems Co., Ltd. > > > > From: Alex Silva -T (alexsil - AEROTEK ULC at Cisco) <alexsil@xxxxxxxxx > <mailto:alexsil@xxxxxxxxx> > Sent: Tuesday, July 5, 2022 6:53 AM > To: KUZU KAZUKI (葛生 一樹) <kuzu.kazuki@xxxxxxxxxxxxxxxx > <mailto:kuzu.kazuki@xxxxxxxxxxxxxxxx> >; Zhao Jiancong(Jerry) (趙 健淙) > <chou.kensou@xxxxxxxxxxxxxxxx <mailto:chou.kensou@xxxxxxxxxxxxxxxx> > Cc: > SUDA SEIYA (須田 聖也) <suda.seiya@xxxxxxxxxxxxxxxx > <mailto:suda.seiya@xxxxxxxxxxxxxxxx> >; > agl-dev-community@xxxxxxxxxxxxxxxxxxxxxxxxx<mailto:agl-dev-community@lists. > automotivelinux.org> <mailto:agl-dev-community@xxxxxxxxxxxxxxxxxxxxxxxxx> > Subject: Re: Question about AGL hosted on QEMU on an Ubuntu VM (nested > virtualization) > > > > Hello Kuzu, > > > > I followed these steps on my Ubuntu workstation (local machine, not a VM), > and had the problem of every time I started QEMU, the ethernet connection > would be lost and I had to delete the new bridge to recover (even > restarting network manager would be of no use otherwise). > > > > Why I tried it first on a local workstation: in case the network connection > became affected, and it did. > > > > I had to follow a different guide to get the bridge working (works perfectly > with a local Ubuntu workstation). > > > > Works there just fine: > > root@qemux86-64:~# ifconfig > > eth0 Link encap:Ethernet HWaddr 52:54:00:12:35:02 > > inet addr:192.168.122.64 Bcast:192.168.122.255 > Mask:255.255.255.0 > > inet6 addr: fe80::5054:ff:fe12:3502/64 Scope:Link > > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > > RX packets:131 errors:0 dropped:0 overruns:0 frame:0 > > TX packets:90 errors:0 dropped:0 overruns:0 carrier:0 > > collisions:0 txqueuelen:1000 > > RX bytes:10157 (9.9 KiB) TX bytes:12945 (12.6 KiB) > > > > lo Link encap:Local Loopback > > inet addr:127.0.0.1 Mask:255.0.0.0 > > inet6 addr: ::1/128 Scope:Host > > UP LOOPBACK RUNNING MTU:65536 Metric:1 > > RX packets:11 errors:0 dropped:0 overruns:0 frame:0 > > TX packets:11 errors:0 dropped:0 overruns:0 carrier:0 > > collisions:0 txqueuelen:1000 > > RX bytes:1670 (1.6 KiB) TX bytes:1670 (1.6 KiB) > > > > root@qemux86-64:~# ls -lat /etc/resolv.conf > > lrwxrwxrwx 1 root root 24 Jun 29 2020 /etc/resolv.conf -> > /etc/resolv-conf.connman > > root@qemux86-64:~# cat /etc/resolv.conf > > # Generated by Connection Manager > > nameserver 192.168.122.1 > > nameserver ::1 > > nameserver 127.0.0.1 > > root@qemux86-64:~# > > > > I can indeed ping “192.168.122.64” from Ubuntu just fine. > > > > However, I cannot do the same in my needed setup: where host Ubuntu is an > AWS hosted VM itself. > > > > This is what the bridge looks like in my local Ubuntu (my bridge is > “virbr0”): > > al666940@al666940-To-be-filled-by-O-E-M:~/agl-demo$ sudo nmcli connection > show > > NAME UUID TYPE DEVICE > > Wired connection 1 6d8112e2-024f-3370-8ec5-4ea54021f108 ethernet enp1s0 > > virbr0 2658fd55-b813-4a02-9cd8-c769d68d047b bridge virbr0 > > > > And this is what it looks like on my AWS hosted VM Ubuntu: > > alexsil@ip-172-31-36-149:~$ sudo nmcli connection show > > [sudo] password for alexsil: > > NAME UUID TYPE DEVICE > > agl-bridge 343bf396-720d-42b4-a655-df5313980cec bridge -- > > bridge-agl-bridge 7e945a36-32ef-4676-a4fc-519468f04861 ethernet -- > > > > And of course, if I try to start it: > > alexsil@ip-172-31-36-149:~$ sudo nmcli conn up agl-bridge > > Error: Connection activation failed: Activation failed because the device is > unmanaged > > > > I think that’s the main roadblock. > > > > I tried creating the interface using > /etc/netplan/01-network-manager-all.yaml, but after applying it the > networking failed and indeed I lost connectivity forever (have to recreate > the whole thing again). > > > > Sincerely, > > > > Alex Silva > > > > From: KUZU KAZUKI (葛生 一樹) <kuzu.kazuki@xxxxxxxxxxxxxxxx > <mailto:kuzu.kazuki@xxxxxxxxxxxxxxxx> > Date: Thursday, June 30, 2022 at > 11:25 PM > To: Alex Silva -T (alexsil - AEROTEK ULC at Cisco) <alexsil@xxxxxxxxx > <mailto:alexsil@xxxxxxxxx> >, Zhao Jiancong(Jerry) (趙 健淙) > <chou.kensou@xxxxxxxxxxxxxxxx <mailto:chou.kensou@xxxxxxxxxxxxxxxx> > Cc: > SUDA SEIYA (須田 聖也) <suda.seiya@xxxxxxxxxxxxxxxx > <mailto:suda.seiya@xxxxxxxxxxxxxxxx> >, > agl-dev-community@xxxxxxxxxxxxxxxxxxxxxxxxx > <mailto:agl-dev-community@xxxxxxxxxxxxxxxxxxxxxxxxx> > <agl-dev-community@xxxxxxxxxxxxxxxxxxxxxxxxx > <mailto:agl-dev-community@xxxxxxxxxxxxxxxxxxxxxxxxx> > Subject: RE: > Question about AGL hosted on QEMU on an Ubuntu VM (nested virtualization) > > Hello Alex, > > > > I could ping AGL VM from host Ubuntu usnig bridge. > > You can reproduce the connection as follow: > > > > 1. Check the ubuntu host IP (in my environment, 10.0.0.201). > > 2. Configure a bridge on the ubuntu host and assign a different network > than the above IP. > > # ip link add name br-tmp type bridge > > # ip link set dev br-tmp up > > # sleep 1 > > # ip addr add 192.168.1.10/24 dev br-tmp > > # ip link show br-tmp > > 3. Allow qemu to use br-tmp. > > # echo "allow br-tmp" >> /etc/qemu/bridge.conf > > 4. Start an AGL VM with the following options instead of "user" network > options: > > -netdev bridge,br=br-tmp,id=net0 -device virtio-net-pci,netdev=net0 > > 5. In the AGL VM, configure the ip address and default gateway as follows: > > # ifconfig enp0s2 192.168.1.20 netmask 255.255.255.0 > > # ip route add default via 192.168.1.10 dev enp0s2 > > # route -n > > 6. You can now ping the AGL guest from the Ubuntu host. > > # ping 192.168.1.20 > > # spc root@192.168.1.20:/xxxx <mailto:root@192.168.1.20:/xxxx> yyy > > > > Please check if you can ping using the above way. > > > > Best Regards, > > Kuzu > > > > From: Alex Silva -T (alexsil - AEROTEK ULC at Cisco) <alexsil@xxxxxxxxx > <mailto:alexsil@xxxxxxxxx> > Sent: Friday, July 1, 2022 6:37 AM > To: KUZU KAZUKI (葛生 一樹) <kuzu.kazuki@xxxxxxxxxxxxxxxx > <mailto:kuzu.kazuki@xxxxxxxxxxxxxxxx> >; Zhao Jiancong(Jerry) (趙 健淙) > <chou.kensou@xxxxxxxxxxxxxxxx <mailto:chou.kensou@xxxxxxxxxxxxxxxx> > Cc: > SUDA SEIYA (須田 聖也) <suda.seiya@xxxxxxxxxxxxxxxx > <mailto:suda.seiya@xxxxxxxxxxxxxxxx> >; > agl-dev-community@xxxxxxxxxxxxxxxxxxxxxxxxx > <mailto:agl-dev-community@xxxxxxxxxxxxxxxxxxxxxxxxx> Subject: Re: Question > about AGL hosted on QEMU on an Ubuntu VM (nested virtualization) > > > > Hello Kuzu, > > > > I managed to share files using option 1, thanks a whole bunch! > > > > As for making the AGL reachable (pingable) to other VM’s, that is indeed > very important. Any chance you can share how the network bridge was set up? > I’ll run with that and figure how if at all can be implemented on AS VM’s > (hey, if AGL can be set up on AWS hosetd VM, then we can surely enable a > bridge on that as well). > > > > Sincerely, > > > > Alex Silva > > > > From: KUZU KAZUKI (葛生 一樹) <kuzu.kazuki@xxxxxxxxxxxxxxxx > <mailto:kuzu.kazuki@xxxxxxxxxxxxxxxx> > Date: Tuesday, June 28, 2022 at > 8:32 PM > To: Alex Silva -T (alexsil - AEROTEK ULC at Cisco) <alexsil@xxxxxxxxx > <mailto:alexsil@xxxxxxxxx> >, Zhao Jiancong(Jerry) (趙 健淙) > <chou.kensou@xxxxxxxxxxxxxxxx <mailto:chou.kensou@xxxxxxxxxxxxxxxx> > Cc: > SUDA SEIYA (須田 聖也) <suda.seiya@xxxxxxxxxxxxxxxx > <mailto:suda.seiya@xxxxxxxxxxxxxxxx> >, > agl-dev-community@xxxxxxxxxxxxxxxxxxxxxxxxx > <mailto:agl-dev-community@xxxxxxxxxxxxxxxxxxxxxxxxx> > <agl-dev-community@xxxxxxxxxxxxxxxxxxxxxxxxx > <mailto:agl-dev-community@xxxxxxxxxxxxxxxxxxxxxxxxx> > Subject: RE: > Question about AGL hosted on QEMU on an Ubuntu VM (nested virtualization) > > Hello Alex, > > > > Thank you for asking. > > > > If you want to copy files between an AGL VM and an ubuntu host, you have two > options. > > - Start AGL VM without the snapshot option and copy files from the console > of AGL VM using scp. > > - Rewrite ext4 file using loop device as following: > > $ lodev=$(losetup -f) > > $ sudo losetup $lodev agl-demo-polatform-crosssdk-qemuarm64.ext4 > > $ sudo mount $lodev /mnt > > $ cp filename /mnt/target_location > > $ sudo umount /mnt > > $ sudo losetup -d $lodev > > > > > > About how to ping the AGL VM from other AWS hosted VM's, I continue to check > that. > > Currently, I assume that the qemu networking configuration option are not > suitable for that purpose. > > Specifying "user" in the net option sets up a NAT network in the QEMU > network system. > > Therefore, ping from the AGL VM to the host OS is possible, but not in the > reverse direction. > > > > A possible one way to ping the AGL VM from the host OS is to use a bridge. > > I have confirmed that pinging from the host OS to the AGL VM can be done > using bridge on local Raspberry Pi, but this has not been confirmed so far > on AWS. > > > > Also in case of not reponsing your email in time, let me CC the community > group to see if any other member can help you also. > > > > Best Regards, > > Kuzu > > > > From: Alex Silva -T (alexsil - AEROTEK ULC at Cisco) <alexsil@xxxxxxxxx > <mailto:alexsil@xxxxxxxxx> > Sent: Monday, June 27, 2022 11:33 PM > To: Zhao Jiancong(Jerry) (趙 健淙) <chou.kensou@xxxxxxxxxxxxxxxx > <mailto:chou.kensou@xxxxxxxxxxxxxxxx> >; KUZU KAZUKI (葛生 一樹) > <kuzu.kazuki@xxxxxxxxxxxxxxxx <mailto:kuzu.kazuki@xxxxxxxxxxxxxxxx> > Cc: > SUDA SEIYA (須田 聖也) <suda.seiya@xxxxxxxxxxxxxxxx > <mailto:suda.seiya@xxxxxxxxxxxxxxxx> > Subject: Re: Question about AGL > hosted on QEMU on an Ubuntu VM (nested virtualization) > > > > Hello Jerry, > > > > Another question that I have is, well, how exactly do you enable file > sharing between AGL and the hosting computer? > > > > I ask because to do that, as far as I know, using QEMU and KVM, one has to > create a VM first. > > > > And since AGL doesn’t seem to come with an ISO, but a prebuilt image and > kernel (for QEMU), can’t exactly create (or start) a VM out of those. > > https://download.automotivelinux.org/AGL/snapshots/master/latest/qemux86-64/ > deploy/images/qemux86-64/agl-demo-platform-crosssdk-qemux86-64.ext4.xz > <https://download.automotivelinux.org/AGL/snapshots/master/latest/qemux86-6 > 4/deploy/images/qemux86-64/agl-demo-platform-crosssdk-qemux86-64.ext4.xz> > (which when unpacked is ext4) > > https://download.automotivelinux.org/AGL/snapshots/master/latest/qemux86-64/ > deploy/images/qemux86-64/bzImage > <https://download.automotivelinux.org/AGL/snapshots/master/latest/qemux86-6 > 4/deploy/images/qemux86-64/bzImage> > > > > Thus, can’t seem to figure how to enable file sharing with a prebuilt image. > > > > Sincerely, > > > > Alex Silva > > > > From: Alex Silva -T (alexsil - AEROTEK ULC at Cisco) <alexsil@xxxxxxxxx > <mailto:alexsil@xxxxxxxxx> > Date: Wednesday, June 22, 2022 at 7:54 AM > To: Zhao Jiancong(Jerry) (趙 健淙) <chou.kensou@xxxxxxxxxxxxxxxx > <mailto:chou.kensou@xxxxxxxxxxxxxxxx> >, KUZU KAZUKI (葛生 一樹) > <kuzu.kazuki@xxxxxxxxxxxxxxxx <mailto:kuzu.kazuki@xxxxxxxxxxxxxxxx> > Cc: > SUDA SEIYA (須田 聖也) <suda.seiya@xxxxxxxxxxxxxxxx > <mailto:suda.seiya@xxxxxxxxxxxxxxxx> > Subject: Re: Question about AGL > hosted on QEMU on an Ubuntu VM (nested virtualization) > > Hello Jerry, > > > > Thanks for the reply! > > > > 1. I use a bare-metal instance type (deployed on a dedicated host), > running Ubuntu server 22.04, to host AGL via QEMU > > a. For x86: i3.metal > (ubuntu/images/hvm-ssd/ubuntu-jammy-22.04-amd64-server-20220420) b. > For 64-bit ARM: r6g.metal > (ubuntu/images/hvm-ssd/ubuntu-jammy-22.04-arm64-server-20220420) > > 2. The VM hosting AGL via QEMU (let’s call it “QEMU VM”) can ping other > VM’s and other VM’s can ping this VM just fine > > a. Communication between AGKL hosting VM and other VM’s works > both ways > > 3. The AGL instance itself can ping other VM’s just fine, BUT other > VM’s cannot ping the AGL instance itself > > a. Communication works only one way (Ping from AGL instance to > other cloud instance: OK) > > > > I fear I may have to do some complex routing or network bridge setup, due to > the private IP I see when running ifconfig within AGL: > > root@qemux86-64:~# ifconfig > > eth0 Link encap:Ethernet HWaddr 52:54:00:12:35:02 > > inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0 > > inet6 addr: fec0::5054:ff:fe12:3502/64 Scope:Site > > inet6 addr: fe80::5054:ff:fe12:3502/64 Scope:Link > > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > > RX packets:186 errors:0 dropped:0 overruns:0 frame:0 > > TX packets:371 errors:0 dropped:0 overruns:0 carrier:0 > > collisions:0 txqueuelen:1000 > > RX bytes:18723 (18.2 KiB) TX bytes:37344 (36.4 KiB) > > > > lo Link encap:Local Loopback > > inet addr:127.0.0.1 Mask:255.0.0.0 > > inet6 addr: ::1/128 Scope:Host > > UP LOOPBACK RUNNING MTU:65536 Metric:1 > > RX packets:11 errors:0 dropped:0 overruns:0 frame:0 > > TX packets:11 errors:0 dropped:0 overruns:0 carrier:0 > > collisions:0 txqueuelen:1000 > > RX bytes:1670 (1.6 KiB) TX bytes:1670 (1.6 KiB) > > > > I appreciate the assistance really. > > > > Sincerely, > > > > Alex Silva > > > > From: Zhao Jiancong(Jerry) (趙 健淙) <chou.kensou@xxxxxxxxxxxxxxxx > <mailto:chou.kensou@xxxxxxxxxxxxxxxx> > Date: Tuesday, June 21, 2022 at > 6:41 PM > To: Alex Silva -T (alexsil - AEROTEK ULC at Cisco) <alexsil@xxxxxxxxx > <mailto:alexsil@xxxxxxxxx> >, KUZU KAZUKI (葛生 一樹) > <kuzu.kazuki@xxxxxxxxxxxxxxxx <mailto:kuzu.kazuki@xxxxxxxxxxxxxxxx> > Cc: > SUDA SEIYA (須田 聖也) <suda.seiya@xxxxxxxxxxxxxxxx > <mailto:suda.seiya@xxxxxxxxxxxxxxxx> > Subject: RE: Question about AGL > hosted on QEMU on an Ubuntu VM (nested virtualization) > > Hi Alex, > > CC: @KUZU KAZUKI (葛生 一樹) <mailto:kuzu.kazuki@xxxxxxxxxxxxxxxx> > > > > Nice to meeting you. Thanks for using virtual AGL. > > > > Let me confirm several things. > > * Which AWS server type are you using? Graviton or Non-graviton? > Baremetal or normal EC2? * Do you mean the communication is only in > single direction? > > * Ping from AGL instance to other cloud instance: OK > * Ping from other cloud instance to AGL instance: NOK > > > > Sincerely, > > Jerry > > Panasonic Automotive > > From: Alex Silva -T (alexsil - AEROTEK ULC at Cisco) <alexsil@xxxxxxxxx > <mailto:alexsil@xxxxxxxxx> > Sent: Wednesday, June 22, 2022 8:43 AM > To: Zhao Jiancong(Jerry) (趙 健淙) <chou.kensou@xxxxxxxxxxxxxxxx > <mailto:chou.kensou@xxxxxxxxxxxxxxxx> > Subject: Question about AGL hosted > on QEMU on an Ubuntu VM (nested virtualization) > > > > Hello Jerry, > > > > I’m Alex Silva, working with Cisco, and was trying to use AGL (hosted on an > Ubuntu VM in AWS, via QEMU). > > > > Long story short: I need to be able to ping (reach) the AGL instance from > other AWS hosted VM’s. > > > > I followed the instructions here to deploy AGL Linux on Ubuntu via QEMU > > https://docs.automotivelinux.org/en/master/#0_Getting_Started/1_Quickstart/U > sing_Ready_Made_Images/#_top > <https://docs.automotivelinux.org/en/master/#0_Getting_Started/1_Quickstart > /Using_Ready_Made_Images/#_top> > > > > And I managed to have AGL up and running on both AMD and ARM architectures. > > > > And AGL instance seems to work and connect to other VM’s just fine (it can > ping the other Ubuntu VM’s o the network like for example “54.213.111.78”, > NSLOOKUP works, WGET works, etc), I can even see the GUI if I use Vinagre > (on gnome desktop). > > > > Automotive Grade Linux > 13.90.0+snapshot-8c489602f218bcf21de0d3c9f8cf620ea5f06430 qemux86-64 ttyS1 > > > > qemux86-64 login: root > > root@qemux86-64:~# ifconfig > > eth0 Link encap:Ethernet HWaddr 52:54:00:12:35:02 > > inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0 > > inet6 addr: fe80::5054:ff:fe12:3502/64 Scope:Link > > inet6 addr: fec0::5054:ff:fe12:3502/64 Scope:Site > > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > > RX packets:142 errors:0 dropped:0 overruns:0 frame:0 > > TX packets:303 errors:0 dropped:0 overruns:0 carrier:0 > > collisions:0 txqueuelen:1000 > > RX bytes:13701 (13.3 KiB) TX bytes:31065 (30.3 KiB) > > > > lo Link encap:Local Loopback > > inet addr:127.0.0.1 Mask:255.0.0.0 > > inet6 addr: ::1/128 Scope:Host > > UP LOOPBACK RUNNING MTU:65536 Metric:1 > > RX packets:11 errors:0 dropped:0 overruns:0 frame:0 > > TX packets:11 errors:0 dropped:0 overruns:0 carrier:0 > > collisions:0 txqueuelen:1000 > > RX bytes:1670 (1.6 KiB) TX bytes:1670 (1.6 KiB) > > > > root@qemux86-64:~# ping 54.213.111.78 > > PING 54.213.111.78 (54.213.111.78): 56 data bytes > > 64 bytes from 54.213.111.78: seq=0 ttl=255 time=0.658 ms > > 64 bytes from 54.213.111.78: seq=1 ttl=255 time=0.656 ms > > 64 bytes from 54.213.111.78: seq=2 ttl=255 time=0.626 ms > > 64 bytes from 54.213.111.78: seq=3 ttl=255 time=0.736 ms > > ^C > > --- 54.213.111.78 ping statistics --- > > 4 packets transmitted, 4 packets received, 0% packet loss > > round-trip min/avg/max = 0.626/0.669/0.736 ms > > > > HOWEVER, I can’t seem to reach the AGL instance (ping it’s IP, I can only > see it’s private one which is “10.0.2.15”) from anywhere, not even from the > VM hosting it. > > > > So I’m guessing I’m missing something rather obvious here (obvious for you > guys I hope) in my setup. > > > > I was wondering if I could ask you about it (I’m guessing you guys must be > able to connect to your AGL running instances somehow). > > > > The Confluence page directs inquiries to you, hence my email asking about > this. > > > > > > Sincerely, > > > > Alex Silva > > > > > > > > > > -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#10053): https://lists.automotivelinux.org/g/agl-dev-community/message/10053 Mute This Topic: https://lists.automotivelinux.org/mt/92058762/2167316 Group Owner: agl-dev-community+owner@xxxxxxxxxxxxxxxxxxxxxxxxx Unsubscribe: https://lists.automotivelinux.org/g/agl-dev-community/leave/4543822/2167316/883735764/xyzzy [list-automotive-discussions82@xxxxxxxxxxx] -=-=-=-=-=-=-=-=-=-=-=-