Pages

Thursday, June 23, 2011

RHEL Virtual Guest Network Connection

 I liked to use a network bridge to virtual machines direct access to real network, without using the default virtbr0(NATed) networking.  I did following to change the host and Virtual Machine configurations


First, I choose em3 of the quad ports NIC for bridging.


--ifcfg-em3--

DEVICE="em3"
HWADDR="84:2B:2B:73:B2:53"
NM_CONTROLLED="no"
ONBOOT="yse"
BRIDGE=br0

--ifcfg-br0

DEVICE=br0
TYPE=Bridge
BOOTPROTO=none
ONBOOT=yes
DELAY=0
--



#iptables -I FORWARD -m physdev --physdev-is-bridged -j ACCEPT
# service iptables save# service iptables restart


# service network restart

#virsh edit vm_system_name
Change interface type='network' to interface type='bridge'.
Change source network='default' to source bridge='br0'.


Or in virtual machine manager, go into Hardware tab to remove NIC and add a new NIC. 


This all worked out right.


Than, I thought of using the first two NICs that had been setup with bonding to do the bridging.


I changed to ifcfg-bond0 with all IP info remarked ,and added "BRIDGE=br0", and moved IP address info into ifcfg-br0.  Again, it worked.  This is what I liked since it has redundancy.





No comments:

Post a Comment