You are not logged in.

#1 Yesterday 13:27:00

dlogan
Member
Registered: Yesterday
Posts: 2

Multi network inside QEMU (between VMs)

Hello! Sorry for bad english

Im newbie in qemu big_smile Im trying make one virtual network for few virtual machines in qemu (for testing).
What I need:
- dhcp, visibility between virtual machines and run out of the box
Best solution for me is, for example, debian as a "router" with 2 cards (-nic user for wan and other -nic for "internal network") and VMs with "internal network".
Im trying it with using network manager (because it is easy-managed) but - -nic user - works fine but making bridge doesnt work and I dont know how to make dhcp working with NM.
In host machine I use wifi network so bridge is unavailable on my adapter (ax200 or ax201).
I tried with several option in qemu -nic (socket, mcast, etc) and in every time vms cant obtain ip config.

How can I make its working?

Offline

#2 Yesterday 14:02:40

-thc
Member
Registered: 2017-03-15
Posts: 1,101

Re: Multi network inside QEMU (between VMs)

QEMU user networking (SLIRP) should have everything you need - DHCP and connectivity, NM can be left alone.

Offline

#3 Yesterday 16:27:00

dlogan
Member
Registered: Yesterday
Posts: 2

Re: Multi network inside QEMU (between VMs)

-thc wrote:

QEMU user networking (SLIRP) should have everything you need - DHCP and connectivity, NM can be left alone.

-netdev user,id=net0 \
-device e1000,netdev=net0

Just tried this. It doesnt make the same network for 2 VMs.

Last edited by dlogan (Yesterday 16:29:12)

Offline

#4 Yesterday 18:19:08

-thc
Member
Registered: 2017-03-15
Posts: 1,101

Re: Multi network inside QEMU (between VMs)

Yep - that's on me. I thought SLIRP would be sufficient and the easiest way.

Looks like you have to use "socket" or "tap" to connect multiple VMs. "socket" networks need to be configured manually. "tap" needs a bridge on the host. And you need a VM or a host service for DHCP. This will get complicated.

Offline

Board footer

Powered by FluxBB