[libvirt-users] Functionality of virsh net-edit

Cole Robinson crobinso at redhat.com
Mon Jun 14 14:37:57 UTC 2010


On 06/12/2010 03:37 AM, Arseny Klimovsky wrote:
> Hi,
> 
> I am using version libvirt on debian lenny from backports repository,
> version 0.7.6-1~bpo50+1, amd64.
> 
> Th functionality of "virsh net-edit" command is not very clearly
> documented, and I think it should change a configuration of a running
> network. But I see it doesn't.
> So, I want to add new host, for example:
> 
> #I have old configuration
> root at xxx:/etc/libvirt/qemu/networks# virsh net-edit default
> Network default XML configuration edited.
> #Here I added new line: new host definition
> 
> root at xxx:/etc/libvirt/qemu/networks# cat default.xml
> #Here I see that new line
> 
> root at xxx:/etc/libvirt/qemu/networks# virsh net-dumpxml default
> root at xxx:/etc/libvirt/qemu/networks# virsh net-edit default
> #Here I see exactly the old network definition
> 
> Is this behaviour expected?
> 
> If yes, how to just add new host on a running network?
> 

net-dumpxml (also used by net-edit) by default shows the current config
of the network. Changes made with net-edit on a running network won't
take effect until the network is restarted, so net-dumpxml won't show
the changed config right away for a running network.

Libvirt doesn't support changing the configuration of a running network,
so any changes will require a network restart with net-destroy;
net-start. This should be documented better.

- Cole




More information about the libvirt-users mailing list