1

I'm working on a project using libvirt with qemu and openvswitch on Debian 10. I would like to be able to modify the configuration of a network card of a domain in bash with the update-device command of virsh.

For that I took an example from this article.

The initial configuration of the network interface is as follows:

<interface type='bridge'>
  <source bridge='waldorf0'/>
  <virtualport type='openvswitch'/>
  <model type='virtio'/>
</interface>

After the domain define and start, I get the mac address assigned to the interface and i product this file :

<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>

After I execute this command :

virsh update-device domain int_conf.xml --live --persistent

It returns :

error: Failed to update device from int_conf.xml
error: Operation not supported: unnable to change config on 'bridge' network type

If you have an idea to work around this problem in order to dynamically tag vlan on interfaces. Thank you in advance

Nicolas
  • 21
  • 5
  • What libvirt version? Is this a standard libvirt package from debian? Is that error message a direct copy of what you are seeing? It contains a typo 'unnable' which I don't see in libvirt git – Cole Robinson Dec 15 '19 at 20:06
  • I'm sorry I solved the problem. This was because the XML file I used with the update-device command accidentally deleted parameters. Thanks anyway. – Nicolas Dec 16 '19 at 14:25

1 Answers1

1

I solved the problem. This was because the XML file I used with the update-device command accidentally deleted parameters. I use the dumpxml command to get the exact configuration of the interface.

Nicolas
  • 21
  • 5