I want to automatically add a DNS CNAME entry using the dnsmasq namespace. Since this seems too complex to be handled by virsh net-edit
, my idea is to use virsh net-dumpxml
, apply the modifications and re-import the network. While the export works, the import throws an error.
$ virsh net-update --xml network.yml
error: command 'net-update' requires <network> option
error: command 'net-update' requires <command> option
error: command 'net-update' requires <section> option
It seems that net-update
doesn't work that way, so I tried it with net-create
$ virsh net-create --file network.yml
error: Failed to create network from network.yml
error: Requested operation is not valid: network is already active as 'mynet.internal'
According to the help, there is no switch to override an existing network.