Karl Forner - 2014-06-12

I apologize in advance for my ignorance on networking.

What I want to do is to setup networking to that my osX qemu VM can be accessed from the host (e.g. for osx internal screen sharing or ssh), and so that the VM can access the internet.

My host OS an ubuntu 12.04, connected to a wifi network.

I tried many things, but never managed to have both host to guest and internet.

From what I read, vde and slirpvde should do the trick, but all these switches, tap, nat, plugs, wires confuse me.
And the iptables, ipforwarding , dnsmasquerade etc... do not help.

What I naively last tried was:

vde_switch -d
slirpvde -dhcp -n 10.0.2.0

then launching qemu with options -net nic,model=virtio -net vde

The problem is that:
- slirpvde output says 10.0.5.20, but that does not seem to be true. When I set it in the guest that does not work. Instead if I set the dns server that my host uses, the guest has access to internet.

  • I can not connect from the host to the guest.

Could you help me, or point me towards some documentation. I searched a lot and tried many things.

Thanks,