首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >libvirt & openvswitch VLAN动态标记

libvirt & openvswitch VLAN动态标记
EN

Server Fault用户
提问于 2019-12-13 08:44:07
回答 1查看 2.2K关注 0票数 1

我正在使用libvirt和qemu以及Debian 10上的openvswitch进行一个项目,我希望能够使用virsh的更新设备命令修改bash中域网卡的配置。

为此,我以这篇文章为例。

网络接口的初始配置如下:

代码语言:javascript
复制
<interface type='bridge'>
  <source bridge='waldorf0'/>
  <virtualport type='openvswitch'/>
  <model type='virtio'/>
</interface>

在域定义和启动之后,我获得分配给接口的mac地址,并生成以下文件:

代码语言:javascript
复制
<interface type='bridge'>
   <mac address='52:54:XX:XX:XX:XX'/>
   <source bridge='waldorf0'/>
   <virtualport type='openvswitch'/>
   <model type='virtio'/>
   <vlan>
       <tag id='2'/>
   </vlan>
 </interface>

执行此命令后:

代码语言:javascript
复制
virsh update-device domain int_conf.xml --live --persistent

它返回:

代码语言:javascript
复制
error: Failed to update device from int_conf.xml
error: Operation not supported: unnable to change config on 'bridge' network type

如果您有一个想法来解决这个问题,以便在接口上动态标记vlan。提前谢谢你

EN

回答 1

Server Fault用户

回答已采纳

发布于 2019-12-16 14:28:46

我解决了问题。这是因为我与update设备命令一起使用的XML文件意外删除了参数。我使用dumpxml命令来获得接口的确切配置。

票数 1
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/995434

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档