2012-04-20 3 views
0

가상 관리자에서 볼 수 있듯이 Xen 하이퍼 바이저에는 네트워크 구성을위한 두 가지 모드가 있습니다. 1 NAT 2 라우팅 됨. 둘 다 IP 서브넷을 요청합니다. 그러나 나는 Xen의 DHCP에 의해 할당되는 대신 모든 IP를 할당 할 수있는 네트워크를 구성하려고합니다.Xen 호스트 전용 어댑터 구성

오라클 가상 박스를 사용했습니다. 호스트 전용 어댑터를 사용할 수있는 옵션이 있습니다. 그런 식으로 젠을 사용하고 싶습니다. 내가 게스트 컴퓨터에 물리적 네트워크 인터페이스를 공유 할 즉

(VM)

난에 CentOS 6.2 x86_64의에 젠 하이퍼 바이저 3.x를 사용하고

I했던이 문제를 해결하기 위해 다음과 같은 나를 위해 일했다.

Disabling Xen's network scripts 
If using Xen it is recommended to disable its network munging by editing /etc/xen/xend-config.sxp and changing the line 
(network-script network-bridge) 

To be 

(network-script /bin/true) 

Disabling NetworkManager 

As of the time of writing (Fedora 12), NetworkManager still does not support bridging, so it is necessary to use "classic" network initscripts for the bridge, and to explicitly mark them as independent from NetworkManager (the "NM_CONTROLLED=no" lines in the scripts below). 

If desired, you can also completely disable the NetworkManager: 

# chkconfig NetworkManager off 
# chkconfig network on 
# service NetworkManager stop 
# service network start 

Creating network initscripts 

In the /etc/sysconfig/network-scripts directory it is neccessary to create 2 config files. The first (ifcfg-eth0) defines your physical network interface, and says that it will be part of a bridge: 

# cat > ifcfg-eth0 <<EOF 
DEVICE=eth0 
HWADDR=00:16:76:D6:C9:45 
ONBOOT=yes 
BRIDGE=br0 
NM_CONTROLLED=no 
EOF 

Obviously change the HWADDR to match your actual NIC's address. You may also wish to configure the device's MTU here using e.g. MTU=9000. 

The second config file (ifcfg-br0) defines the bridge device: 

# cat > ifcfg-br0 <<EOF 
DEVICE=br0 
TYPE=Bridge 
BOOTPROTO=dhcp 
ONBOOT=yes 
DELAY=0 
NM_CONTROLLED=no 
EOF 

WARNING: The line TYPE=Bridge is case-sensitive - it must have uppercase 'B' and lower case 'ridge' 

After changing this restart networking (or simply reboot) 

# service network restart 
젠 들어

Visit for more details

+0

당신은 시트릭스 '의 XenServer를 사용하고 있습니까? – Robbietjuh

답변

1

이는 다리를 네트워킹의 특별한 경우이다.

CentOS Dom0에서 더미 브리지를 만든 다음 VM을 해당 브리지에 연결합니다. CentOS는 Documention (http://www.centos.org/docs/5/html/5.2/Virtualization/sect-Virtualization-Virtualized_network_devices-Laptop_network_configuration.html)

에서

를 dummy0 네트워크 인터페이스를 생성하고 지정 정적 IP 주소.

이 예에서는 우리 환경에서 라우팅 문제를 피하기 위해 10.1.1.1을 선택했습니다.

DEVICE=dummy0 
BOOTPROTO=none 
ONBOOT=yes 
USERCTL=no 
IPV6INIT=no 
PEERDNS=yes 
TYPE=Ethernet 
NETMASK=255.255.255.0 
IPADDR=10.1.1.1 
ARP=yes 
: 더미 장치 지원은/etc/sysconfig/network-scripts에 /이 ifcfg-를 dummy0을 /를 dummy0 편집 네트워킹 구성 만들려면

alias dummy0 dummy 
options dummy numdummies=1 

을 /etc/modprobe.conf에 다음과 같은 행을 추가 사용하려면

그런 다음 단지를 dummy0 브리지 장치에 VM을 연결할 수 있습니다

추가 참조 http://wiki.xen.org/wiki/HostConfiguration/Networking

관련 문제