Networking and Samba from a quest OS running on qemu
I'm trying to test some software on a big endian system to ensure compatibility. My plan is to use qemu on Ubuntu 12.04 to emulate a MIPS system. So far I've been able to create the quest system successfully, but I haven't been able to network it with the host system. I can access the outside world from the guest system (e.g. wget or apt-get), but my attempts at setting up samba have failed.
According to this, in QEmu 1.1 and newer the network bridge helper can set tun/tap up for you without the need for additional scripting. I'm trying to use that since I've seen different versions of the scripts. Right now qemu-system-mips -version reports the following:
I've compiled from the 1.4.1 source and used the version from apt-get. Both report the same thing. I'm working under the assumption that I have version 1.1 or later despite what -version is telling me. Anyway, the next instruction was to turn on the setuid attribute for the default network helper:
Next I created a bridge.conf file in /etc/qemu/ and /usr/local/etc/qemu with -rw-r--r-- for permissions. The contents of the file are:
If I start QEmu with the following command:
or with
or with
I get the following error:
Fair enough, I didn't create the br0 bridge. I've tried creating one with a script I don't understand, but then my quest MIPS QEmu system no longer connects to anything. It sees br0, but it doesn't get an IP address. Clearly I'm doing something wrong here:
Is there an easier way to do this? Personally, I would be fine just using the SMB server on \10.0.2.4\qemu that's described here, but that hasn't worked for me either (115 errors when I try to mount the share, presumably because of networking trouble).
Update
Once I create the bridge, I see the following output from ifconfig on the host machine:
Checking the brctl show output, I see the following:
Now I start the quest system in QEmu. If I run ifconfig, I see the following:
And the bridge looks like this:
Unfortunately with this setup, the quest system has lost the limited "user mode" networking it once had (i.e. wget and apt-get no longer work). The only IP address I see is for the bridge, so I'm not sure how the quest will appear on the network. The host still appears, at the same IP address as br0.
Update
Here is the output from iptables -L