[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-arm
Subject:    Re: networking running snapshots of arm64 on amd64 host
From:       Valery Seys <valery () vslash ! com>
Date:       2021-04-11 19:28:52
Message-ID: e03930f9-e706-bcda-c828-7c746ba2abb4 () vslash ! com
[Download RAW message or body]



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/

_______________________________________________
freebsd-arm@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arm
To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org"


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic