Hello,
I'm going to host several KVM virtual machines on a single computer (which has just one NIC), and each guest should have its own IP address (and the host should have its own address too). How can I do this?
Below is my attempt in /etc/network/interfaces on the host machine:
Code:
auto lo
iface lo inet loopback
auto br0
iface br0 inet static
bridge_ports eth0 tap0
address 192.168.1.150
netmask 255.255.255.0
auto br1
iface br1 inet static
bridge_ports eth0 tap1
address 192.168.1.151
netmask 255.255.255.0
auto tap0
iface tap0 inet manual
tunctl_user gustavo
auto tap1
iface tap1 inet manual
tunctl_user gustavo
auto eth0
iface eth0 inet manual
dns-nameservers 192.168.1.1
gateway 192.168.1.1
up ip link set $IFACE promisc on
down ip link set $IFACE promisc off
But when I run "sudo /etc/init.d/networking restart", I get:
Code:
* Reconfiguring network interfaces...
Waiting for br0 to get ready (MAXWAIT is 32 seconds).
* if-up.d/mountnfs[br0]: waiting for interface br1 before doing NFS mounts
* if-up.d/mountnfs[br0]: waiting for interface tap0 before doing NFS mounts
* if-up.d/mountnfs[br0]: waiting for interface tap1 before doing NFS mounts
* if-up.d/mountnfs[br0]: waiting for interface eth0 before doing NFS mounts
device eth0 is already a member of a bridge; can't enslave it to bridge br1.
Waiting for br1 to get ready (MAXWAIT is 32 seconds).
* if-up.d/mountnfs[br1]: waiting for interface tap0 before doing NFS mounts
* if-up.d/mountnfs[br1]: waiting for interface tap1 before doing NFS mounts
* if-up.d/mountnfs[br1]: waiting for interface eth0 before doing NFS mounts
Set 'tap0' persistent and owned by uid 1000
* if-up.d/mountnfs[tap0]: waiting for interface tap1 before doing NFS mounts
* if-up.d/mountnfs[tap0]: waiting for interface eth0 before doing NFS mounts
Set 'tap1' persistent and owned by uid 1000
* if-up.d/mountnfs[tap1]: waiting for interface eth0 before doing NFS mounts
[ OK ]
br0 (192.168.1.150) and br1 (192.168.1.151) seem to work, because I can access the host machine with either IP address.
What's the correct way to do it?
Thanks in advance!
Bookmarks