centos6.6+xen 4.6 网桥配置

        我的平台是centos6.6+xen4.6。由于xen的版本较高,查到陪网桥的资料都是旧版本的xen,多余的配置比较多。自己试了试,可以上网了,虚拟机也能create。我主要是在/etc/sysconfig/network-scripts下修改了ifcfg-eth0,和ifcfg-br0两个文件,如果没有文件,添上即可。

ifcfg-eth0文件如下:

DEVICE=eth0
BRIDGE=eth1
ONBOOT=yes
NM_CONTROLLED=no
HWADDR=00:23:5A:3B:2D:B5
UUID=ce4f28ad-6a6d-4b4c-a077-70ba6b5360b0


ifcfg-br0文件如下:

DEVICE=eth1
BOOTPROTO=dhcp
DELAY=0
ONBOOT=yes
TYPE=Bridge
NM_CONTROLLED=no


写好文件之后

[root@localhost network-scripts]# service NetworkManager stop

[root@localhost network-scripts]# service network restart
Shutting down interface eth1:                              [  OK  ]
Shutting down interface eth0:                              [  OK  ]
Shutting down loopback interface:                          [  OK  ]
Bringing up loopback interface:                            [  OK  ]
Bringing up interface eth0:                                [  OK  ]
Bringing up interface eth1:  
Determining IP information for eth1... done.
                                                           [  OK  ]
[root@localhost network-scripts]#

再用ping命令试一下网络,可以上网;用ifconfig查看下网络参数;然后再用xl cre试下能否新建虚拟机,发现再无报错了,虚拟机也新建成功。

[root@localhost network-scripts]# xl list -Z
Name                                        ID   Mem VCPUs    State    Time(s)   Security Label
Domain-0                                     0  2977     2     r-----     896.3 system_u:system_r:dom0_t
1-centos6.4                                  1  1024     1     -b----      51.7 system_u:system_r:domU_t


  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值