会挽雕弓如满月,西|

园龄:粉丝:关注:

KVM虚拟机添加物理网卡

将宿主机上的网络接口 eth1 直接添加到虚拟机

命令方式

  • 添加操作
virsh attach-interface ubuntu --type direct --model virtio --source eth1 --persistent
  • 取消操作
virsh detach-interface ubuntu --type direct --mac 00:00:00:00:00:00 --persistent

说明,--persistent 在虚拟机开机时等于--live --config, 在关机时等于--config

xml方式

    <interface type='direct'>
      <mac address='52:54:00:fd:db:10'/>
      <source dev='ens2f1' mode='vepa'/>
      <model type='virtio'/>
    </interface>

macvtap介绍

macvtap介绍

本文作者:武平宁

本文链接:https://www.cnblogs.com/dewan/p/18271751

版权声明:本作品采用知识共享署名-非商业性使用-禁止演绎 2.5 中国大陆许可协议进行许可。

posted @   武平宁  阅读(50)  评论(0编辑  收藏  举报
点击右上角即可分享
微信分享提示
评论
收藏
关注
推荐
深色
回顶
收起