首页 > 其他 > 详细

KVM:虚拟机网卡模式改为bridge

时间:2017-10-19 19:23:57      阅读:294      评论:0      收藏:0      [点我收藏+]

kvm中虚拟机网卡默认为nat模式,如果想调整为bridge,只需要进行下面简单的几步:

[root@node160 ~]# virsh edit CentOS-7.3-X86_64
将xml配置文件中的:

    <interface type=‘network‘>
      <mac address=‘52:54:00:e4:7c:77‘/>
      <source network=‘default‘/>
      <model type=‘virtio‘/>
      <address type=‘pci‘ domain=‘0x0000‘ bus=‘0x00‘ slot=‘0x03‘ function=‘0x0‘/>
    </interface>

修改为:

    <interface type=‘bridge‘>
      <mac address=‘52:54:00:e4:7c:77‘/>
      <source bridge=‘br0‘/>
      <model type=‘virtio‘/>
      <address type=‘pci‘ domain=‘0x0000‘ bus=‘0x00‘ slot=‘0x03‘ function=‘0x0‘/>
    </interface>


本文出自 “冰冻vs西瓜” 博客,请务必保留此出处http://molewan.blog.51cto.com/287340/1974226

KVM:虚拟机网卡模式改为bridge

原文:http://molewan.blog.51cto.com/287340/1974226

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!