[Freedombox-discuss] How to access a FreedomBox web interface under qemu?

A. F. Cano afc54 at comcast.net
Thu Jun 9 04:23:16 BST 2022


hello,

I have recently downloaded an image of FreedomBox testing and put it on a
128GB SD card.  With this command:

sudo qemu-system-x86_64  -drive file=/dev/sdf,media=disk -m 4G -smp 2

it boots and after a while I get a "freedombox login:" prompt in the
qemu window.  Of course since it's not set up there's no way to login.

Before the prompt it says to point a browser to one of these:

http://freedombox.local/		"Server Ip address could not be found"
http://10.0.2.25/			"Took too long to respond"
http://[fec0::a001:f28f:79a4:5e86]/	"This site can't be reached"

I tried all of them and get the results above.

This is on a Debian testing host with 8 cores and 32GB of RAM.

Not surprising really since ifconfig on the host doesn't show any IP
address for the VM.

I have found many pages that suggest modifying /etc/network/interfaces
to set up bridges, or to set up kvm options that I don't see.  the only
options in the VM window are "Machine" and "View".  Machine has the
options to Pause, Reset, Power Down and Quit.  View has nothing related
to networking or IP addresses.

Since Debian now uses NetworkManager for everything, I'm reluctant to
manually configure bridges.  On previous occasions I've ended up with
totally messed up networking rendering the machine inaccesible.

What options do I need to pass to qemu to run this FreedomBox just as it
would run on native hardware? Ideally, I would like to duplicate the 3
network interfaces on the apu1d4 so that this image could be a direct
drop-in replacement if something happens to the main one.

This would mean that the first interface (WAN) enp1s0 would be directed/
bridged to the main interface of the host, which is itself connected to
a switch and the real FreedomBox.  The second interface (enp2s0) should
be visible to the host so a web browser there could connect to it.
Likewise for the third: enp3s0.

In the real FreedomBox enp2s0 and enp3s0 (the local interfaces) are
assigned static IP addresses.  Ideally I should be able to configure
these with the same IP addresses as the real FreedomBox and qemu would
bridge these to make them visible through NAT as something unique that
wouldn't conflict with the real interfaces on the real FreedomBox.

Can someone provide some pointers as to how to do this?  Qemu has so
many options that I'm totally confused.  I would think that this is a
matter of qemu configuration and it shouldn't be necessary to mess with
the native networking of the host, like many how-to pages suggest.

Thank you very much for any help.  I would really like to have a backup
FreedomBox ready to go as a plug-in replacement in case of trouble in
the main one.

Augustine



More information about the Freedombox-discuss mailing list