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 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> Sent: Friday, July 1, 2022 6:37 AM To: KUZU KAZUKI (葛生 一樹) <kuzu.kazuki@xxxxxxxxxxxxxxxx>; Zhao Jiancong(Jerry) (趙 健淙) <chou.kensou@xxxxxxxxxxxxxxxx> Cc: SUDA SEIYA (須田 聖也) <suda.seiya@xxxxxxxxxxxxxxxx>; 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 (which when unpacked is ext4) https://download.automotivelinux.org/AGL/snapshots/master/latest/qemux86-64/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 * For x86: i3.metal (ubuntu/images/hvm-ssd/ubuntu-jammy-22.04-amd64-server-20220420) * 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 * 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 * 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/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. [cid:image001.png@01D88D5D.D7F32220] Sincerely, Alex Silva -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#9928): https://lists.automotivelinux.org/g/agl-dev-community/message/9928 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] -=-=-=-=-=-=-=-=-=-=-=-