qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-discuss] User networking - bind to concrete interface/IP


From: Alex
Subject: Re: [Qemu-discuss] User networking - bind to concrete interface/IP
Date: Fri, 15 Jan 2016 19:07:45 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1

You could suggest this enhancement to qemu developers. In the meantime, looks like you'll have to dig into networking! There are several options, depending on where you want to implement it (qemu+host or just host): network namespaces, or cgroups with policy routing, or good old tap interfaces with bridging.

On 15/01/16 16:18, address@hidden wrote:
Using other types of networking (non-user mode) involves too much of 
configuration and used features. I know less about networking stuff, 
unfortunately and have no experience to configure it. It especially is harder 
because i need only few ports being forwarded to Virtual Machines (ports are 
unique so i bind them to all interfaces), others should be available for host 
machine only. I am not using iptables, netfilter and conntrack right now.

Was hoping such thing exists, because at other parts qemu is rather 
configurable.

Current qemu network configuration looks like:

-netdev user,id=netdev1,hostfwd=tcp::6110-:6110 -device 
rtl8139,netdev=netdev1,id=netdev1

15.01.2016, 15:31, "Alex" <address@hidden>:
There doesn't seem to be such an option for user mode network.
You've considered multiple tap interfaces on the host, of course? It
seems like a perfect fit to your requirements.

On 15/01/16 14:52, address@hidden wrote:
  Hello.

  I have an issue.

  I have multiple QEMU virtual machines with User networking and have multiple 
network interfaces (eth0, eth0:1, eth0:2, eth0:3 and so on) with one public 
IPv4 address per interface.

  QEMU seems to always bind to eth0 interface (default). So virtual machine is 
always using static IP of eth0 interface.

  What i want is to bind each virtual machine to own interface.

  For example:

  Virtual Machine 1: qemu-system-i386 -netdev user,id=netdev1,interface=eth0 
-device rtl8139,netdev=netdev1,id=netdev1
  Virtual Machine 2: qemu-system-i386 -netdev user,id=netdev1,interface=eth0:1 
-device rtl8139,netdev=netdev1,id=netdev1
  Virtual Machine 3: qemu-system-i386 -netdev user,id=netdev1,interface=eth0:2 
-device rtl8139,netdev=netdev1,id=netdev1

  and so on.

  So my question is:

  Is there any way to bind qemu virtual machine's User networking to concrete 
interface?

  Thanks in advance for any answers,

  Alex.

--
/--Regards, Alex/


--
/--Regards, Alex/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]