Bridged Networking or User mode? Replace ebtables & iptables with iptables-nft to allow bridged networking. #72
Here are the two types of networking
The image has the same IP as your Docker IP
The image will run on the container's own internal network, like 10.0.2.15 or something or 192.168.122.11x
After that, you can ssh OR docker exec into the Docker and then ssh into the QEMU image.
which is better?
Realistically, they both appear exactly the same.
If anyone wants to test it out:
The actual bug is ebtalbes + dnsmasq doesn't work virsh networking.
It's a strange bug, I though related to polkit, however, I found it incompatible with ebtables.
Possibly just with Arch, that the default network doesn't get installed.
Easy fix: replace iptables and ebtables with iptables-nft. If not, virsh hangs, sudo virsh hangs.
On the other hand, QEMU and Docker networking is really, really easy to debug. If bridged network is added, you'd have to start the bridge every time, I also think you need
The text was updated successfully, but these errors were encountered:
If you use the two -net command strings above in the xml file while using virt-manager you can switch between bridged and userMode networking. Haven't done bridged in the dockerfile but it wouldn't be much more than whats already here.
Use virt-manager without docker
Try the networking commands above
Otherwise you can just add more ports to the QEMU command using the -e EXTRA env variable and also forwarding it again as a normal -p 111:2222 to the docker command.
Couldn't get this working. Trying to have a port shared so that the host can access a server running on the mac on port 8080.
@mikob No problem!
Here is a worked example for anyone else reading, as written here: #162 (comment)
On the host
docker run -it \ --device /dev/kvm \ -p 50922:10022 \ -e ADDITIONAL_PORTS='hostfwd=tcp::10023-:80,' \ -p 10023:10023 \ sickcodes/docker-osx:auto
Inside the container:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" brew install nginx sudo sed -i -e 's/8080/80/' /usr/local/etc/nginx/nginx.conf # sudo nginx -s stop sudo nginx
nginx should appear on the host at port 10023