Since I managed to figure it out I thought I should post my solution to the 
problem in case there are others with the same question (at least for the 
qemu-arm-virt device).

Start qemu with the following command:
sudo ./simulate --extra-qemu-args="-netdev 
tap,id=mynet0,ifname=tap0,script=no,downscript=no -device 
virtio-net,netdev=mynet0,mac=52:55:00:d1:55:01,disable-modern=on,disable-legacy=off"

This thread that suggested adding ",disable-modern=on,disable-legacy=off" might 
be of interest when figuring out what previously went wrong: 
https://qemu-devel.nongnu.narkive.com/otcGnLuw/bug-virtio-net-linux-driver-fails-to-probe-on-mips-malta-since-hw-virtio-pci-fix-virtio-behaviour

When the VM has booted, add an ip to the "eth0" device that should now be 
visible. Do this by editing the /etc/network/interfaces file and adding:

auto eth0
iface eth0 inet static
address XXX.XXX.XXX.XXX (replace with the IP of your choice, this will be the 
guest IP)
netmask 255.255.255.0

Then save the changes and run:

ifup eth0

Then add an ip to the device that was added to the host when running the 
simulate script:

sudo ip addr add YYY.YYY.YYY.YYY/24 dev tap0 (replace with the IP of your 
choice, this will be the host IP)
sudo ip link set dev tap0 up

It should now be possible to reach the VM from the host with IP XXX.XXX.XXX.XXX 
and reach the host from the VM with IP YYY.YYY.YYY.YYY. At least ping from host 
to vm and from vm to host worked for me.

/Olof
_______________________________________________
Devel mailing list -- devel@sel4.systems
To unsubscribe send an email to devel-leave@sel4.systems

Reply via email to