Assign individual NIC to KVM guest
Posted
by
Bin S
on Server Fault
See other posts from Server Fault
or by Bin S
Published on 2012-11-08T09:24:22Z
Indexed on
2012/11/08
11:06 UTC
Read the original article
Hit count: 233
kvm-virtualization
|nic
I have a server with 6 NICs installed and is running Ubuntu 12.04LTS. I want to setup 4 guest VMs using kvm. Now I want to assign 2 NICs for the host(1 Public IP and 1 private IP), and 1 NIC each to 4 guest VM(all private IP). How do I do this?
/etc/network/interfaces
I am having trouble with my configuration file shown below:
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.1.109
netmask 255.255.255.0
gateway 192.168.1.5
auto eth1
iface eth1 inet static
address 192.168.1.117
netmask 255.255.255.0
auto eth2
iface eth2 inet manual
auto br0
iface br0 inet static
address 192.168.1.118
netmask 255.255.255.0
bridge_ports eth2
bridge_fd 9
bridge_hello 2
bridge_maxage 12
bridge_stp off
auto eth3
iface eth3 inet manual
auto br1
iface br1 inet static
address 192.168.1.119
netmask 255.255.255.0
bridge_ports eth3
bridge_fd 9
bridge_hello 2
bridge_maxage 12
bridge_stp off
auto eth4
iface eth4 inet manual
auto br2
iface br2 inet static
address 192.168.1.123
netmask 255.255.255.0
bridge_ports eth4
bridge_fd 9
bridge_hello 2
bridge_maxage 12
bridge_stp off
auto eth5
iface eth5 inet manual
auto br3
iface br3 inet static
address 192.168.1.124
netmask 255.255.255.0
bridge_ports eth5
bridge_fd 9
bridge_hello 2
bridge_maxage 12
bridge_stp off
© Server Fault or respective owner