Re: networking running snapshots of arm64 on amd64 host

Valery Seys <[email protected]>
Newsgroups gmane.os.freebsd.devel.arm
Message-ID <[email protected]>

On 11/04/2021 17:15, tech-lists wrote:
> Hi,
> 
> I downloaded this snapshot:
> https://download.freebsd.org/ftp/releases/VM-IMAGES/13.0-RC5/aarch64/Latest/FreeBSD-13.0-RC5-arm64-aarch64.qcow2.xz 
> 
> 
> then spun it up as per https://wiki.freebsd.org/arm64/QEMU like this:
> 
> # qemu-system-aarch64 -m 4096M -cpu cortex-a57 -M virt  \
>          -bios edk2-aarch64-code.fd -serial telnet::4444,server
>          -nographic \
>          -drive if=none,file=VMDISK,id=hd0 \
>          -device virtio-blk-device,drive=hd0 \
>          -device virtio-net-device,netdev=net0 \
>          -netdev user,id=net0
> 
> and it spins up fine. I can log into it over telnet to localhost on port
> 4444. But it has no routing, even if I go into /etc/rc.conf and apply a
> valid ip, netmask and default gateway. What i'd like to know is,
> 
> 1. is networking meant to work, from within the running vm?
> 2. if yes, how?
> 
> thanks,
Hi,

==> on the host system:
1) you need to load some modules:
- if_bridge.ko
- bridgestp.ko
- if_tap.ko
- aio.ko

2) then add these sysctl:
sysctl net.link.tap.user_open=1
sysctl net.link.tap.up_on_open=1

3) create your interface (CAUTION: interface must be set before the vm starts):
- ifconfig br0 create
- ifconfig tap0 create
- chmod 0660 /dev/tap0

4) Finaly
$ ifconfig tap0 inet a.b.c.d netmask 0xffffff00 broadcast a.b.c.255 mtu 1492 up
- OR if we want a bridge tied to our own if :
$ ifconfig br0 addm re0 addm tap0 up

5) add the 'tap' option to qemu:
qemu- ... -net nic,model=.... -net tap,name=tap0

from my old notes, that probably comes from:

==> https://wiki.freebsd.org/qemu


v/

_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arm
To unsubscribe, send any mail to "[email protected]"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.