Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace bridged networking with QEMU user networking emulation #22

Open
64kramsystem opened this issue Jan 27, 2021 · 0 comments
Open

Comments

@64kramsystem
Copy link

The current network setup is bridged, which is very brittle (due to differences between operating systems; for example, Ubuntu doesn't ship the bridge utilities by default), and also unnecessarily complex (besides the inherent complexity, up/down scripts are required).

Using the QEMU built-in user is trivial, and much more stable, since it doesn't require any change on the host system.

Change the etc/network/interfaces to be:

iface lo inet loopback

auto eth0
iface eth0 inet static
        address 10.0.2.15
        netmask 255.255.255.0
        broadcast 10.0.2.255
        gateway 10.0.2.2

Then, in the startup script, replace this:

  -netdev type=tap,script=scripts/ifup.sh,downscript=scripts/ifdown.sh,id=net0 \
  -device virtio-net-device,netdev=net0

with:

  -device virtio-net-device,netdev=usernet \
  -netdev user,id=usernet,hostfwd=tcp::10000-:22 \

and drop the ifup/down scripts.

And don't forget to update the README 😄.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant