qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-discuss] host only networking i386 works. arm does not


From: John Davis
Subject: [Qemu-discuss] host only networking i386 works. arm does not
Date: Mon, 28 Dec 2015 21:02:07 -0500

Hello

I've found a couple of methods on host only networking.  The method for i386 works, but I can't get the same method working for arm.  It appears that I need to use a network device other than e1000.  I'm using archlinux and on the host I do this:

#!/bin/bash

# Do this to setup host only networking
brctl addbr br0
ip addr add 172.16.0.1/24 broadcast 172.16.0.255 dev br0
ip link set br0 up
ip tuntap add dev tap0 mode tap
ip link set tap0 up promisc on
brctl addif br0 tap0
dnsmasq --interface=br0 --bind-interfaces --dhcp-range=172.16.0.10,172.16.0.20

For i386 I use this method to start the vm and later I can ssh between the host and guest.

$ qemu-system-i386 hda.img -m 512 -netdev tap,id=t0,ifname=tap0,script=no,downscript=no -device e1000,netdev=t0,id=nic0

For arm I tried to use the same method with three variants.  The first fail to start the vm.

This one fails since it does not have a e1000 device.
# qemu-system-arm -M vexpress-a9 -kernel vmlinuz-3.2.0-4-vexpress -initrd initrd.img-3.2.0-4-vexpress -append "root=/dev/mmcblk0p2" -drive if=sd,cache=unsafe,file=hda.img -netdev tap,id=t0,ifname=tap0,script=no,downscript=no -device e1000,netdev=t0,id=nic0


This one fails for the same reason, but when the image boots without specifying any network options, dmesg shows that
eth0 is associated with the smsc911x device.
#qemu-system-arm -M vexpress-a9 -kernel vmlinuz-3.2.0-4-vexpress -initrd initrd.img-3.2.0-4-vexpress -append "root=/dev/mmcblk0p2" -drive if=sd,cache=unsafe,file=hda.img -netdev tap,id=t0,ifname=tap0,script=no,downscript=no -device smsc911x,netdev=t0,id=nic0


This one boots, but it prints a message about the tap device and later ip link only shows the loopback device.
qemu-system-arm -M vexpress-a9 -kernel vmlinuz-3.2.0-4-vexpress -initrd initrd.img-3.2.0-4-vexpress -append "root=/dev/mmcblk0p2" -drive if=sd,cache=unsafe,file=hda.img -net nic -net tap,ifname=tap1,script=no

Any pointers is appreciated


--
John F. Davis
6 Kandes Court
Durham, NC 27713
919-888-8358

独树一帜



reply via email to

[Prev in Thread] Current Thread [Next in Thread]